Answered step by step
Verified Expert Solution
Question
1 Approved Answer
n this data, variables are stored in rows instead of columns. The different modes of transportation ( commuter rail, bus, subway, boat, . . .
n this data, variables are stored in rows instead of columns. The different modes of transportation commuter
rail, bus, subway, boat, are variables, providing information about each months average ridership. The
months themselves are observations You can tell which is which because as you go through time, the month
changes, but the modes of transport offered by the T do not.
As is customary, you want to represent variables in columns rather than rows.
Pivot the rows and columns of the mbta data so that all columns are variables of the data. This
should result in columns mode, date, and number of riders in thousands thouriders
What are the new dimensions of this data?
mbta mbta
pivotlonger # Pivot the rows and columns of the mbta data so that all
# columns are variables of the data. This should result in
# columns modedate and number of riders in
# thousands thouriders
mbta # Now what is the dimensions of this new data frame
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started