How to reshape your data in R for analysis (Wide to long and vice versa)

preview_player
Показать описание
data(ChickWeight)
View(ChickWeight)
library(tidyr)
# From long to wide format
A =spread(data=ChickWeight, # Name of the data
key="Time", # time variable
value="weight") # Repeated-measure variable
# From wide to long format
B= gather(data=A, # Name of the data
key="Time", # time variable
value="weight", # Repeated-measure variable
3:14,factor_key=TRUE)
Рекомендации по теме
Комментарии
Автор

Sir please make videos on how to interpret results after analysis

Plantscience