data.check | R Documentation |
Check the data file and provide fixes if available
data.check(dataset, refreshRate = 85, time.unit = 1, check.only = F, ...)
dataset |
an object of the type data.frame |
refreshRate |
the refresh rate used during the motion capture (in hertz) |
time.unit |
the unit of measurement in which time is expressed in the 'time' column of the dataset given to the function. 1 = seconds, 10 = deciseconds, 100 = centiseconds, 1000 = milliseconds, ... Default to 1000 |
libraries()
### restoring missing columns
head(rtgData_bad) # dataset provided by this package
rtgChecked <- data.check(rtgData_bad) # subjName is given without quotes. When asked to type the subject name, run the next line as is
test_subject
head(rtgChecked)
### time.unit
rtgData <- data.check(rtgData) # dataset provided by this package
# time column in rtgData is in milliseconds. Note that data.check allows to specify different time units as well
head(rtgData)
# instead, should the dataset have time in seconds
# the function will return frameT as a vector of NAs
data(rtgData) # reload dataset
rtgData$time <- rtgData$time / 1000 # change time to seconds
rtgData <- data.check(rtgData)
rtgData$frameT # always check that frameT looks good
# use time.unit to fix it
data(rtgData) # reload dataset
rtgData$time <- rtgData$time / 1000 # change time to seconds
rtgData <- data.check(rtgData, time.unit = 1)
rtgData$frameT
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.