Question: Change the code of the previous exercise (see editor) by adding names to the components. Use for my_vector the name vec, for my_matrix the name
Change the code of the previous exercise (see editor) by adding names to the components. Use for my_vector the name vec, for my_matrix the name mat and for my_df the name df.
Print out my_list so you can inspect the output.
# Vector with numerics from 1 up to 10
my_vector <- 1:10
# Matrix with numerics from 1 up to 9
my_matrix <- matrix(1:9, ncol = 3)
# First 10 elements of the built-in data frame mtcars
my_df <- mtcars[1:10,]
# Adapt list() call to give the components names
my_list <- list(my_vector, my_matrix, my_df)
# Print out my_list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
