powered by
Convenience function to convert exported time labels, e.g. from character format c('time_0.1s', 'time_0.2s', ...) or related format to numeric format c(0.1, 0.2, ...).
get.times(time.char, trim.left = "time_", trim.right = "s")
times vector of times in numeric format
vector of characters containing the time
string to be trimmed from left
string to be trimmed from right
Convenience function for getting times from column headers from common data export formats.
get.times(colnames(bars)[-c(1:4)]) (sample.colnames <- paste0("X", 0:30)) get.times(sample.colnames, trim.left = "X", trim.right = "")
Run the code above in your browser using DataLab