diff options
Diffstat (limited to 'R/mkin_wide_to_long.R')
-rw-r--r-- | R/mkin_wide_to_long.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/mkin_wide_to_long.R b/R/mkin_wide_to_long.R index 826aee2d..f1814fcb 100644 --- a/R/mkin_wide_to_long.R +++ b/R/mkin_wide_to_long.R @@ -27,8 +27,8 @@ mkin_wide_to_long <- function(wide_data, time = "t") n <- length(colnames) - 1
long_data <- data.frame(
name = rep(vars, each = length(wide_data[[time]])),
- time = rep(wide_data[[time]], n),
- value = unlist(wide_data[vars]),
+ time = as.numeric(rep(wide_data[[time]], n)),
+ value = as.numeric(unlist(wide_data[vars])),
row.names = NULL)
return(long_data)
}
|