rm_inactive_dates: Managing Inactive Variables

View source: R/managing_inactives.R

rm_inactive_datesR Documentation

Managing Inactive Variables

Description

rm_inactive_dates drops the rows of data during which an variable was "inactive" ie. equal to 0.

rm_inactive_variables drops the rows of data during which

Usage

rm_inactive_dates(df,inactivity_period = "1 day", sampling_rate = "1 hour")

rm_inactive_variables(df,inactivity_period = "1 day", sampling_rate = "1 hour")

report_inactive_variables(df,inactivity_period = "1 day", sampling_rate = "1 hour")

Arguments

df

a data.frame where the first column is a datetime object.

inactivity_period

a string indicating what will be considered the period of inactivity necessary to be removed. Default = "1 day".

sampling_rate

a string indicating the sampling rate of the data. Default = "1 hour".

Examples

 df = downsample_time_series_2(trikinetics, amount = 1, units = 'hour', method = 'sum')
cropped_dates_df = rm_inactive_dates(df, inactivity_period = '1 day', sampling_rate = '1 hour')
print(cropped_dates_df)
cropped_variables_df = rm_inactive_variables(df,inactivity_period = "1 day", sampling_rate = "1 hour")
print(cropped_variables_df)


edpclau/circadian-dynamics documentation built on Aug. 25, 2023, 12:18 p.m.