Answered step by step
Verified Expert Solution
Link Copied!

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.2 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.
1. Pivot the rows and columns of the mbta data so that all columns are variables of the data. This
should result in 3 columns - mode, date, and number of riders in thousands (thou_riders).
2. What are the new dimensions of this data?
mbta <- mbta %>%
pivot_longer(__________) # Pivot the rows and columns of the mbta data so that all
# columns are variables of the data. This should result in
# 3 columns -`mode`,`date`, and number of riders in
# thousands (`thou_riders`).
____(mbta) # Now what is the dimensions of this new data frame

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

Write a short note on rancidity and corrosiveness.

Answered: 1 week ago

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago