symbioticMe / proBatch

Tools for Batch Effects Diagnostics and Correction
15 stars 6 forks source link

Comment to date_to_sample_order() in vignettes #11

Open Freddsle opened 3 years ago

Freddsle commented 3 years ago

It is noted In vignette that 'dateTimeFormat' in date_to_sample_order () should be in POSIX date format. And format of RunDate in the example dataset coincides with dateTimeFormat in example code:

generated_sample_annotation <- date_to_sample_order(example_sample_annotation, time_column = c('RunDate','RunTime'), new_time_column = 'generated_DateTime', dateTimeFormat = c('%b_%d', '%H:%M:%S'), new_order_col = 'generated_order', instrument_col = NULL)

But it is important to note, that language of RunDate column should be the same with locale language of R-studio. Otherwise, if Sys.getlocale() not English, function date_to_sample_order() with Example dataset returns NA without errors (“the specified time is invalid”): image

I solved this problem with Sys.setlocale("LC_ALL","English").