Convert a dataframe with observations over time into long format
Source:R/mkin_wide_to_long.R
mkin_wide_to_long.RdThis function simply takes a dataframe with one independent variable and
several dependent variable and converts it into the long form as required by
mkinfit.
Value
Dataframe in long format as needed for mkinfit.
Examples
wide <- data.frame(t = c(1,2,3), x = c(1,4,7), y = c(3,4,5))
mkin_wide_to_long(wide)
#> name time value
#> 1 x 1 1
#> 2 x 2 4
#> 3 x 3 7
#> 4 y 1 3
#> 5 y 2 4
#> 6 y 3 5