Saturday, April 15, 2023

R Tutorial Playlist - Data Frame

 Data frames and matrices are very similar types of arrays. While with matrices you are limited to single type of data per entire matrix, with data frames you still have that limitation enforced only at columns. So frame can't contain different types of data within single column, but you can have different types of columns within the same data frame. So, if matrices are designed for the purpose of calculations, data frames are designed for the purpose of presentations.

a <- data.frame(names=c("Leo", "Mickey", "Donie"), age=c(25, 17, 31))

As you can see, declarations of data frame is quite simple. To data.frame function, you have to provide collections of data, that are going to be presented as columns.

For video tutorial check the link below.



No comments:

Post a Comment