Question: Exercise 3 We're now going to explore the most common data structures deployed in R , dataframes. In this exercise, we will create a dataframe
Exercise
We're now going to explore the most common data structures deployed in R dataframes. In this exercise, we will create a dataframe from the vectors we
generated above and perform operations on our dataframe.
Q Create a dataframe called classdf using the vectors you created in Exercise Your dataframe should have two columns and six rows. Don't
change the column names ie keep them as names and grades
In : M # Write your code here. Be careful to follow the instructions!
In : M # Justintime check!
# Run this cell, if it fails, you likely have a mistake above. You will be marked on whether the full answer is
expecttrueisdata.frameclassdf
rbind and cbind
The rbind and cbind functions takes a sequence of arguments and combines them by rows or columns respectively.
It's a convenient way of adding rows or columns to a data frame.
More information on this function can be found here.
Q Add a new entry to your dataframe for a student named Joan who received a grade of Your new dataframe should still be called class df
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
