n_screen_on: Get number of times screen turned on

View source: R/sensor_functions.R

n_screen_onR Documentation

Get number of times screen turned on

Description

[Deprecated]

Usage

n_screen_on(
  db,
  participant_id,
  start_date = NULL,
  end_date = NULL,
  by = c("Total", "Hour", "Day")
)

Arguments

db

A database connection to an m-Path Sense database.

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.

start_date

Optional search window specifying date where to begin search. Must be convertible to date using as.Date. Use first_date to find the date of the first entry for a participant.

end_date

Optional search window specifying date where to end search. Must be convertible to date using as.Date. Use last_date to find the date of the last entry for a participant.

by

Either 'Total', 'Hour', or 'Day' indicating how to summarise the results. Defaults to total.

Value

In case grouping is by the total amount, returns a single numeric value. For date and hour grouping returns a tibble with columns 'date' or 'hour' and the number of screen on's 'n'.


mpathsenser documentation built on May 29, 2024, 9:11 a.m.