diff --git a/R/do_adjustRtime-functions.R b/R/do_adjustRtime-functions.R index 1fe5282c..b432daf2 100644 --- a/R/do_adjustRtime-functions.R +++ b/R/do_adjustRtime-functions.R @@ -874,7 +874,7 @@ NULL resid_ratio = 3, zero_weight = 10, bs = "tp"){ - rt_map <- rt_map[order(rt_map$obs), ] + rt_map <- rt_map[order(rt_map$obs), c("ref", "obs")] # add first row of c(0,0) to set a fix timepoint. rt_map <- rbind(c(0,0), rt_map) weights <- rep(1, nrow(rt_map)) diff --git a/vignettes/xcms.Rmd b/vignettes/xcms.Rmd index 0382314b..02abbe13 100644 --- a/vignettes/xcms.Rmd +++ b/vignettes/xcms.Rmd @@ -1203,17 +1203,13 @@ f[f != "QC"] <- NA f <- sampleData(faahko)$sample_type f[f == "QC"] <- NA -missing_filter <- PercentMissingFilter(threshold = 30, - f = f) +missing_filter <- PercentMissingFilter(threshold = 30, f = f) # Apply the filter to faakho object -filtered_faahko <- filterFeatures(object = faahko, - filter = missing_filter) +filtered_faahko <- filterFeatures(object = faahko, filter = missing_filter) # Apply the filter to res object -missing_filter <- PercentMissingFilter(threshold = 30, - f = f) -filtered_res <- filterFeatures(object = res, - filter = missing_filter) +missing_filter <- PercentMissingFilter(threshold = 30, f = f) +filtered_res <- filterFeatures(object = res, filter = missing_filter) ``` Here, no feature was removed, meaning that all the features had less than 30%