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: mymtcars
# mtcars object is one of many builtin data sets in R So you do not need to worry about creating mtcars.
mymtcars mtcars
# : investigate mymtcars using str function. How many variables and observations are included in this dataframe?
# : calculate engine displacement per cylinder and save it as a new variable 'UnitEngine' in the dataframe. Populate the two XXXX below
mymtcars$XXXX mymtcars$XXXXmymtcars$cyl
# 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
