Difference Between data.frame & as.data.frame Functions in R (2 Examples) | Create & Convert Data

Опубликовано: 09 Октябрь 2022
на канале: Statistics Globe
1,320
29

How to apply the data.frame and as.data.frame functions in the R programming language. More details: https://statisticsglobe.com/differenc...
R code of this video:

data1 <- data.frame(x1 = 1:5, # Create data frame
x2 = 2:6,
x3 = letters[10:6])
data1 # Print data frame

mat <- matrix(1:12, ncol = 4) # Create matrix
mat # Print matrix

data2 <- as.data.frame(mat) # Convert matrix to data frame
data2 # Print data frame

data3 <- data.frame(mat) # Convert matrix to data frame
data3 # Print data frame

Follow me on Social Media:
Facebook – Statistics Globe Page:   / statisticsglobecom  
Facebook – R Programming Group for Discussions & Questions:   / statisticsglobe  
Facebook – Python Programming Group for Discussions & Questions:   / statisticsglobepython  
LinkedIn – Statistics Globe Page:   / statisticsglobe  
LinkedIn – R Programming Group for Discussions & Questions:   / 12555223  
LinkedIn – Python Programming Group for Discussions & Questions:   / 12673534  
Twitter:   / joachimschork  

Music by bensound.com


Смотрите видео Difference Between data.frame & as.data.frame Functions in R (2 Examples) | Create & Convert Data онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Statistics Globe 09 Октябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,320 раз и оно понравилось 29 людям.