DayCompliance: Calculate Within Day Compliance

Description Usage Arguments Value

View source: R/DayCompliance.R

Description

This function calculates within day compliance and returns hours completed within a day and a completion value of 1 or 0 to indicate whether the tracking data meets the minimum tracking requirements. Requirements are passed in the parameters. For a day to be successful, hence completion = 1, there must be at least one point in each time bin (i.e. 15 minutes).

Usage

1
2
3
DayCompliance(json, id = NULL, coor = NULL, time = NULL,
  time.format = NULL, timebin = NULL, hour.require = NULL,
  output = c("json", "dataframe"))

Arguments

json

a json object.

id

the name of personal identifier in json.

coor

longitude and latitude of tracking points in the format of c("lon","lat").

time

local time variable

time.format

format of time to pass to as.POSIXct

timebin

time bin to test whether at least one point is recorded

hour.require

the number of hours required for a day to be successful

output

a string object indicating what format the output should be. Must be either "json" or "dataframe".

Value

a data frame or a json


honggao110/TrackCompliance documentation built on May 17, 2019, 4:51 p.m.