blob: 45ee0a10320900469ea8e692fcd750f6ee015d85 (
plain) (
tree)
|
|
mkin_long_to_wide <- function(long_data, time = "time")
{
colnames <- unique(long_data$name)
wide_data <- data.frame(time = subset(long_data, name == colnames[1], time))
for (var in colnames) {
wide_data[var] <- subset(long_data, name == var, value)
}
return(wide_data)
}
|