aboutsummaryrefslogtreecommitdiff
path: root/R/mkin_long_to_wide.R
blob: 45ee0a10320900469ea8e692fcd750f6ee015d85 (plain) (blame)
1
2
3
4
5
6
7
8
9
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)
}

Contact - Imprint