Vidyalelo
R Programming · Q15

Data Structures in R Programming

Programming · R Programming · question 15

Q15

In R, how do you add a new column named Height to a data frame named my_data?

A.
my_data$Height <- c(160, 170, 155)
Answer
B.
add_column(my_data, "Height", c(160, 170, 155))
C.
my_data[,"Height"] <- c(160, 170, 155)
D.
append_column(my_data, "Height", c(160, 170, 155))

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board