Which function in R combines multiple vectors into a data frame?

Which function in R combines multiple vectors into a data frame?

a) rbind()
b) merge()
c) data.frame()
d) cbind()

Answer:

c) data.frame()

Explanation:

The data.frame() function is used to combine multiple vectors into a data frame in R.

Reference:

R Programming – Functions MCQ Questions and Answers

Scroll to Top