View source: R/process_gfdata.R
process_gfdata | R Documentation |
Processes and calculates daily and weekly averages of 'GreenFeed' data. Handles data filtering, aggregation, and summarization to facilitate further analysis.
data |
a data frame with preliminary or finalized 'GreenFeed' data |
start_date |
a character string representing the start date of the study (format: "dmy") |
end_date |
a character string representing the end date of the study (format: "dmy") |
param1 |
an integer representing the number of records per day to be consider for analysis |
param2 |
an integer representing the number of days with records per week to be consider for analysis |
min_time |
an integer representing the minimum number of minutes for a records to be consider for analysis (default: 2 minutes) |
cutoff |
an integer specifying the range for identifying outliers (default: 3 SD) |
A list of three data frames:
filtered_data |
data frame with filtered 'GreenFeed' data |
daily_data |
data frame with daily processed 'GreenFeed' data |
weekly_data |
data frame with weekly processed 'GreenFeed' data |
file <- system.file("extdata", "StudyName_GFdata.csv", package = "greenfeedr")
datafile <- readr::read_csv(file)
gf_data <- process_gfdata(
data = datafile,
start_date = "2024-05-13",
end_date = "2024-05-25",
param1 = 2,
param2 = 3,
min_time = 2
)
head(gf_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.