Learn R Programming

GENEAclassify (version 1.5.3)

dataImport: 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,
  mmap.load = (.Machine$sizeof.pointer >= 8),
  ...
)

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.

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 start and end time values this has to be set to TRUE. (Default FALSE)

radians

calculate degrees rotation in radians.

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.

Examples

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

Run the code above in your browser using DataLab