hhabra / metabCombiner

metabCombiner R Package: Paired Untargeted Metabolomics Feature Matching & Data Concatenation
10 stars 2 forks source link

slow table collapsing in write2file() function #3

Closed hhabra closed 3 years ago

hhabra commented 4 years ago

Current method for table collapsing in write2file function too slow lines = apply(cTable, 1, function(row) base::paste(row, collapse = sep))

Faster methods necessary. One possibility: strsplit(readr::format_delim(cTable, delim = sep), split = "\n")[[1]])

Also, addition of an index column may be useful and necessary.