Description Usage Arguments Value See Also Examples
Calculates ActiLife counts based on raw accelerometer data
1 2 |
data |
Accelerometer data, Must have at least three columns. |
hertz |
Sampling frequency in Hz |
x_axis |
Indicates the column number which has the accel data for x direction, the default is 2 |
y_axis |
Indicates the column number which has the accel data for y direction, the default is 3 |
z_axis |
Indicates the column number which has the accel data for z direction, the default is 4 |
time_column |
Optional. Indicates the column number which has the date and time. The first row will be considered as the start time of the study. You can use the "start_time" argument to provide the start time explicitly. |
start_time |
Optional. Use this to define the start time of the experiment. You can use this argument if the data does not contain a time column. |
Returns a data.table
with four columns:
The start time of the measurement
the number of counts for X axis
the number of counts for Y axis
the number of counts for Z axis
sampleXYZ
raw accelerometer data for testing counts()
function.
sampleCounts
counts calculated by activityCounts
and ActiLife
1 2 3 4 5 6 7 8 9 10 11 12 | # for tha sampleXYZ dataset, sampling frequency is 100 Hz
counts(data = sampleXYZ, hertz = 100)
# when start time is given explicitly
study_start_time <- "2017-08-22 12:30:10"
counts(data = sampleXYZ, hertz = 100 , start_time = study_start_time)
# the data has a time column, which is the first column
counts(data = sampleXYZ, hertz = 100 , time_column = 1)
# explicitly specify the X, Y and Z axis columns.
counts(data = sampleXYZ, hertz = 100 , x_axis = 2,y_axis = 3, z_axis = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.