Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Restructuring a Table Using the DATA Step: Wide to Narrow The pg2.np_2017 Camping table contains public use statistics for camping in 2017 from the

image text in transcribed
4. Restructuring a Table Using the DATA Step: Wide to Narrow The pg2.np_2017 Camping table contains public use statistics for camping in 2017 from the National Park Service. To enable statistics to be calculated for all camping locations, restructure the table as a narrow table. a. Open the p207p01.sas program in the practices folder. Highlight the PROC PRINT step and run the selected code. Note that the Tent, RV, and Backcountry columns contain visitor counts. Obs ParkName Tent RV Backcountry 1 Acadia NP 152 586 55,812 1,597 Amistad NRA 0 11,019 0 3 Aniakchak NM & PRES 0 0 235 Annella lelande AL b. To convert this wide table to a narrow table, the DATA step must create a new column named CampType with the values Tent, RV, and Backcountry, and another new column named Camp Count with the numeric counts. The DATA step includes statements to output a row for CampType='Tent'. Modify the DATA step to output additional rows for RV and Backcountry. c. Add a LENGTH statement to ensure that the values of the Camp Type column are not truncated. d. Run the DATA step. Confirm that each ParkName value has three rows corresponding to the Tent, RV, and Backcountry visitor counts

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Calculus Early Transcendentals

Authors: Michael Sullivan, Kathleen Miranda

2nd Edition

1319067484, 9781319067489

More Books

Students also viewed these Mathematics questions

Question

Organizing Your Speech Points

Answered: 1 week ago