ReadSessions: Read Session Information

Description Usage Arguments Value Author(s) Examples

View source: R/ReadSessions.R

Description

Read session data saved by the Meditate function and summarize this information.

Usage

1
ReadSessions(file = "meditate.csv", tz = Sys.timezone())

Arguments

file

'character' string or 'connection'. File to read session information.

tz

'character' string. Time zone to format date-time values, see OlsonNames function for available names.

Value

An object of class 'sessions' that inherits behavior from the 'data.frame' class. A print method is provided for this class. Class 'sessions' is a data table with 2 variables: start_date is of class 'POSIXct" and represents the date-time at the beginning of the meditation session; and duration is of class 'difftime' and represents the length of the session. Its attribute list includes:

current_streak

current streak in days.

longest_streak

longest streak in days.

total_practice

number of days that included at least one session.

average_day

average session time per day in minutes.

average_session

average session time in minutes.

total_time

time meditating in days.

since

date of first session.

Author(s)

J.C. Fisher

Examples

1
2
3
4
5
file <- system.file("extdata/meditate-ex.csv", package = "meditate")
x <- meditate::ReadSessions(file)
x

print.data.frame(x)

meditate documentation built on March 26, 2020, 9:37 p.m.