Skip to content

Commit

Permalink
README updated
Browse files Browse the repository at this point in the history
  • Loading branch information
GMBog committed Jan 29, 2025
1 parent 0c6d7be commit dc40ee4
Show file tree
Hide file tree
Showing 9 changed files with 1,030 additions and 10 deletions.
2 changes: 1 addition & 1 deletion R/compare_gfdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param start_date a character string representing the start date of the study (format: "mm/dd/yyyy")
#' @param end_date a character string representing the end date of the study (format: "mm/dd/yyyy")
#'
#' @return Data frame including records removed from preliminary and final reports.
#' @return Data frame including records removed from preliminary and final reports
#'
#' @examples
#' #Datasets with preliminary and finalized GreenFeed data
Expand Down
6 changes: 3 additions & 3 deletions R/report_gfdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' If the preliminary option is used, the data is retrieved from the 'C-Lock Inc.' server through an 'API',
#' otherwise the data processed by 'C-Lock Inc.' must be provided to generate the report.
#'
#' @param input_type a character string representing type of data (options: "prelim" and "final")
#' @param input_type a character string representing type of data (options: "prelim" or "daily, and "final")
#' @param exp a character string representing study name or other study identifier. It is used as file name to save the data
#' @param unit numeric or character vector, or a list representing one or more 'GreenFeed' unit numbers
#' @param start_date a character string representing the start date of the study (format: "mm/dd/yyyy")
Expand Down Expand Up @@ -65,13 +65,13 @@ report_gfdata <- function(input_type, exp = NA, unit, start_date, end_date = Sys
input_type <- tolower(input_type)

# Ensure input_type is valid
valid_inputs <- c("final", "daily", "prelim")
valid_inputs <- c("final", "prelim", "daily")
if (!(input_type %in% valid_inputs)) {
stop(paste("Invalid input_type. Choose one of:", paste(valid_inputs, collapse = ", ")))
}


if (input_type == "daily" | input_type == "prelim") {
if (input_type == "prelim" | input_type == "daily") {
# First Authenticate to receive token:
req <- httr::POST("https://portal.c-lockinc.com/api/login", body = list(user = user, pass = pass))
httr::stop_for_status(req)
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Most of these use the same preliminary and finalized data from GreenFeed system.

## Citation

More information about how to use greenfeedr can be found in [Martinez-Boggio et al. (2024)](https://www.sciencedirect.com/science/article/pii/S266691022400187X).
More information about how to use greenfeedr can be found in [Martinez-Boggio et al. (2024)](https://doi.org/10.3168/jdsc.2024-0662).

## Cheat Sheet

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ system.
## Citation

More information about how to use greenfeedr can be found in
[Martinez-Boggio et
al. (2024)](https://www.sciencedirect.com/science/article/pii/S266691022400187X).
[Martinez-Boggio et al. (2024)](https://doi.org/10.3168/jdsc.2024-0662).

## Cheat Sheet

Expand Down
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ bibentry(
volume = "",
pages = "",
doi = "10.3168/jdsc.2024-0662",
url = "https://www.sciencedirect.com/science/article/pii/S266691022400187X"
url = "https://doi.org/10.3168/jdsc.2024-0662"
)
544 changes: 544 additions & 0 deletions inst/DailyReport_FP716.log

Large diffs are not rendered by default.

477 changes: 477 additions & 0 deletions inst/FinalReport_FP712.log

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion man/compare_gfdata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/report_gfdata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dc40ee4

Please sign in to comment.