Type: Package
Title: Read 'Unisens' Data
Version: 0.3.4
Date: 2025-04-24
Maintainer: Martin Penzel <Martin.Penzel@movisens.com>
Description: Provides the ability to read 'Unisens' data into R. 'Unisens' is a universal data format for multi sensor data.
Depends: R (≥ 3.2.0)
Imports: XML (≥ 1.0.0), hexView, vroom
License: LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL]
URL: https://unisens.org/
BugReports: https://github.com/Unisens/unisensR/issues
Encoding: UTF-8
RoxygenNote: 7.3.2
Suggests: testthat
NeedsCompilation: no
Packaged: 2025-04-29 06:49:45 UTC; martin.penzel
Author: Martin Penzel [ctb, cre], Jürgen Stumpp [aut], Jörg Ottenbacher [ctb], Stephan Grund [ctb], movisens GmbH [cph]
Repository: CRAN
Date/Publication: 2025-04-29 08:20:02 UTC

Get Unisens Custom Attributes

Description

Get Unisens Custom Attributes

Usage

getUnisensCustomAttributes(unisensFolder)

Arguments

unisensFolder

Unisens Folder

Value

hash map of all custom attributes

Examples

unisensPath <- system.file('extdata/unisensExample', package = 'unisensR', mustWork = TRUE)
getUnisensCustomAttributes(unisensPath)

Get Unisens Measurement Id Time

Description

Get Unisens Measurement Id Time

Usage

getUnisensMeasurementId(unisensFolder)

Arguments

unisensFolder

Unisens Folder

Value

string measurement id

Examples

unisensPath <- system.file('extdata/unisensExample', package = 'unisensR', mustWork = TRUE)
getUnisensMeasurementId(unisensPath)

Get Unisens Signal Sample Count

Description

Get Unisens Signal Sample Count

Usage

getUnisensSignalSampleCount(unisensFolder, id)

Arguments

unisensFolder

Unisens Folder

id

ID of the signal entry

Value

Long

Examples

unisensPath <- system.file('extdata/unisensExample', package = 'unisensR', mustWork = TRUE)
getUnisensSignalSampleCount(unisensPath, 'ecg.bin')

Read Unisens Event Entry

Description

Read Unisens Event Entry

Usage

readUnisensEventEntry(unisensFolder, id)

Arguments

unisensFolder

Unisens Folder

id

ID of the event entry.

Value

DataFrame.

Examples

unisensPath <- system.file('extdata/unisensExample', package = 'unisensR', mustWork = TRUE)
readUnisensEventEntry(unisensPath, 'qrs-trigger.csv')

Read Unisens Signal Entry

Description

Read Unisens Signal Entry

Usage

readUnisensSignalEntry(
  unisensFolder,
  id,
  startIndex = 1,
  endIndex = getUnisensSignalSampleCount(unisensFolder, id),
  readInChunks = FALSE,
  readChunkSize = 2^16
)

Arguments

unisensFolder

String containing path to Unisens folder.

id

String containing ID of the signal entry.

startIndex

Integer of the value-index on which the read process starts, default: 1.

endIndex

Integer of the value-index on which the read process ends, default: last Index of file.

readInChunks

Boolean determines if the reading process is done in chunks. This could be useful if you run into memory limits when reading big files. default: FALSE.

readChunkSize

Integer defining the size of chunks if chunk reading is enabled, defined in samples, default: 2^16.

Value

DataFrame.

Examples

unisensPath <- system.file('extdata/unisensExample', package = 'unisensR', mustWork = TRUE)
readUnisensSignalEntry(unisensPath, 'ecg.bin')

Read Unisens Start Time

Description

Read Unisens Start Time

Usage

readUnisensStartTime(unisensFolder)

Arguments

unisensFolder

Unisens Folder

Value

POSIXct unisens start time

Examples

unisensPath <- system.file('extdata/unisensExample', package = 'unisensR', mustWork = TRUE)
readUnisensStartTime(unisensPath)

Read Unisens Values Entry

Description

Read Unisens Values Entry

Usage

readUnisensValuesEntry(unisensFolder, id)

Arguments

unisensFolder

Unisens Folder

id

ID of the values entry.

Value

DataFrame.

Examples

unisensPath <- system.file('extdata/unisensExample', package = 'unisensR', mustWork = TRUE)
readUnisensValuesEntry(unisensPath, 'rr.csv')