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:
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”):
I solved this problem with Sys.setlocale("LC_ALL","English").
It is noted In vignette that 'dateTimeFormat' in date_to_sample_order () should be in
POSIX
date format. And format ofRunDate
in the example dataset coincides withdateTimeFormat
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, ifSys.getlocale()
not English, functiondate_to_sample_order()
with Example dataset returns NA without errors (“the specified time is invalid”):I solved this problem with
Sys.setlocale("LC_ALL","English")
.