From ee699808c8e9eb63cab2b3102e3cc6eb97c5ce71 Mon Sep 17 00:00:00 2001 From: jranke Date: Tue, 18 Jun 2013 14:08:11 +0000 Subject: Pending check-in of stuff started at east one month ago: - avoid returning factors in the data frame in mkin_wide_to_long - stop returning useless results with eigenvalue based solutions when observed absolute values are all very small - better test case for schaefer97 data making use of stepwise fitting - but the solution obtained in one step is better... git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@83 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- R/mkin_wide_to_long.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'R/mkin_wide_to_long.R') 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) } -- cgit v1.2.1