dataImport: Data import function

View source: R/dataImport.R

dataImportR Documentation

Data import function

Description

Loads the data into R and creates format required for segmentation.

Usage

dataImport(
  binfile,
  downsample = 100,
  start = NULL,
  end = NULL,
  Use.Timestamps = FALSE,
  radians = FALSE,
  keep_raw_data = TRUE,
  mmap.load = (.Machine$sizeof.pointer >= 8),
  ...
)

Arguments

binfile

File path to binary data to be segmented.

downsample

Rate to downsample the data, defaults to every 100th observation. For no downsampling set NULL.

start

Where to start reading observations.

end

Where to end reading observations.

Use.Timestamps

To use timestamps as the startand end time values this has to be set to TRUE. (Default FALSE)

radians

calculate degrees rotation in radians.

keep_raw_data

Keep the raw data for calculating steps using stepcounter.

mmap.load

Default is (.Machine$sizeof.pointer >= 8). see mmap for more details

...

additional arguments passed through.

Details

Reads in the binary data file and extracts the information required for the segmentation procedure.

Value

Returns a list containing a matrix of the data including the x, y and z axis data, vectors of the up down (elevation) and degrees (rotation), a vector of time stamps, a vector of vector magnitudes and the serial number of the device.

Examples

##   segData = dataImport(bindata = file.path(system.file(package = "GENEAread"),
##                                                         "binfile",
##                                                         "TESTfile.bin"))
## 
## segData1 = dataImport(AccData)
## names(segData)

GENEAclassify documentation built on March 31, 2023, 9:01 p.m.