![]() |
VOOZH | about |
In this article we will see how to create a Dataframe from four given vectors in R. To create a data frame in R using the vector, we must first have a series of vectors containing data. The data.frame() function is used to create a data frame from vector in R.
Syntax:
data.frame(vectors)
Example 1. Creating dataframe from given 4 vectors.
Output:
Example 2:
Output: