first_date {mpathsenser}R Documentation

Extract the date of the first entry

Description

[Stable]

A helper function for extracting the first date of entry of (of one or all participant) of one sensor. Note that this function is specific to the first date of a sensor. After all, it wouldn't make sense to extract the first date for a participant of the accelerometer, while the first device measurement occurred a day later.

Usage

first_date(db, sensor, participant_id = NULL)

Arguments

db

A database connection to an m-Path Sense database.

sensor

The name of a sensor. See sensors for a list of available sensors.

participant_id

A character string identifying a single participant. Use get_participants to retrieve all participants from the database. Leave empty to get data for all participants.

Value

A string in the format 'YYYY-mm-dd' of the first entry date.

Examples

## Not run: 
db <- open_db()
first_date(db, "Accelerometer", "12345")

## End(Not run)

[Package mpathsenser version 1.2.3 Index]