Question: # copy original dataframe into a new one: my _ mtcars # mtcars object is one of many built - in data sets in R

# copy original dataframe into a new one: my_mtcars
# mtcars object is one of many built-in data sets in R. So you do not need to worry about creating mtcars.
my_mtcars <- mtcars
# 1: investigate my_mtcars using str function. How many variables and observations are included in this dataframe?
# 2: calculate engine displacement per cylinder and save it as a new variable 'UnitEngine' in the dataframe. Populate the two XXXX below
my_mtcars$XXXX <- my_mtcars$XXXX/my_mtcars$cyl
# 3. summarize the new variable 'UnitEngine': use summary function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!