View source: R/managing_inactives.R
rm_inactive_dates | R Documentation |
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
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")
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". |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.