Skip to content

Commit

Permalink
Adding status columns
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyclements committed Jun 19, 2024
1 parent 9632984 commit d6c2d67
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 9 additions & 2 deletions R/export_r_instat_to_bucket.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#' @param start_rains_column The name of the start of rains column in the data.
#' @param start_rains_status_column The name of the start of rains status column in the data.
#' @param end_rains_column The name of the end of rains column in the data.
#' @param end_rains_status_column The name of the end of rains status column in the data.
#' @param end_season_column The name of the end of season column in the data.
#' @param end_season_status_column The name of the end of season status column in the data.
#' @param seasonal_length_column The name of the seasonal length column in the data.
#' @param min_tmin_column The name of the minimum of minimum temperature column in the data.
#' @param max_tmin_column The name of the maximum of minimum temperature column in the data.
Expand All @@ -52,15 +54,20 @@ export_r_instat_to_bucket <- function(data, data_by_year, data_by_year_month = N
annual_rainfall_data = NULL, annual_temperature_data = NULL, monthly_temperature_data = NULL,
crop_success_data = NULL, season_start_data = NULL,
start_rains_column = "start_rain", start_rains_status_column = "start_rain_status",
end_rains_column = "end_rains", end_season_column = "end_season", seasonal_length_column = "seasonal_length",
end_rains_column = "end_rains", end_rains_status_column = "end_rains_status", end_season_column = "end_season",
end_season_status_column = "end_season_status", seasonal_length_column = "seasonal_length",
min_tmin_column = "min_tmin", mean_tmin_column = "mean_tmin", max_tmin_column = "max_tmin",
min_tmax_column = "min_tmax", mean_tmax_column = "mean_tmax", max_tmax_column = "max_tmax"){


timestamp <- format(Sys.time(), format = "%Y%m%d%H%M%S")

definitions_data <- epicsadata::collate_definitions_data(data = data, data_by_year = data_by_year, data_by_year_month = data_by_year_month, crop_data = crop_data_name, rain = rain, year = year, month = month, summaries = summaries,
start_rains_column = start_rains_column, start_rains_status_column = start_rains_status_column, end_rains_column = end_rains_column, end_season_column = end_season_column, seasonal_length_column = seasonal_length_column, min_tmin_column = min_tmin_column,
start_rains_column = start_rains_column, start_rains_status_column = start_rains_status_column, end_rains_column = end_rains_column,
end_rains_status_column = end_rains_status_column,
end_season_column = end_season_column,
end_season_status_column = end_season_status_column,
seasonal_length_column = seasonal_length_column, min_tmin_column = min_tmin_column,
mean_tmin_column = mean_tmin_column, max_tmin_column = max_tmin_column, min_tmax_column = min_tmax_column, mean_tmax_column = mean_tmax_column, max_tmax_column = max_tmax_column )

# Save into bucket
Expand Down
6 changes: 6 additions & 0 deletions man/export_r_instat_to_bucket.Rd

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

0 comments on commit d6c2d67

Please sign in to comment.