Skip to content

Commit

Permalink
minor updates, want tripcode in some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
clairedavies committed Apr 5, 2024
1 parent b7be108 commit 0d5e52f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/utils.R
Expand Up @@ -595,7 +595,7 @@ pr_get_Coeffs <- function(df){
dplyr::filter(.data$StationName == stations)
}

m <- stats::lm(Values ~ Year_Local , data = lmdat) #+ pr_harmonic(Month, k = 1)
m <- stats::lm(Values ~ Year_Local + pr_harmonic(Month, k = 1), data = lmdat)

lmdat <- tibble::tibble(lmdat %>%
dplyr::bind_cols(fv = m$fitted.values))
Expand Down
2 changes: 1 addition & 1 deletion R/utils_bgc.R
Expand Up @@ -26,7 +26,7 @@ pr_get_NRSChemistry <- function(){
DIN_umolL = sum(.data$NOx_umolL, .data$Ammonium_umolL, na.rm = TRUE),
Redfield = mean(.data$NOx_umolL, na.rm = TRUE)/mean(.data$Phosphate_umolL, na.rm = TRUE),
Redfield = ifelse(is.infinite(.data$Redfield), NA, .data$Redfield)) %>%
dplyr::select("Project", "SampleTime_Local", "Month_Local", "SampleDepth_m",
dplyr::select("Project", "SampleTime_Local", "Month_Local", "SampleDepth_m", "TripCode",
"StationName", "StationCode", tidyselect::all_of(var_names)) %>%
tidyr::pivot_longer(tidyselect::all_of(var_names), values_to = "Values", names_to = 'Parameters') %>%
pr_reorder()
Expand Down
2 changes: 1 addition & 1 deletion R/utils_boo_data.R
Expand Up @@ -52,7 +52,7 @@ pr_get_FuncGroups <- function(Survey = "NRS", Type = "Z", ...){

if(Type == "P"){
df <- df %>%
dplyr::mutate(Parameters = ifelse(.data$Parameters %in% c("Ciliate","Foraminifera", "Radiozoa", "Silicoflagellate"), "Other", .data$Parameters),
dplyr::mutate(Parameters = ifelse(.data$Parameters %in% c("Centric diatom", "Pennate diatom", "Dinoflagellate", "Cyanobacteria"), .data$Parameters, "Other"),
Parameters = factor(.data$Parameters, levels = c("Centric diatom", "Pennate diatom", "Dinoflagellate", "Cyanobacteria",
"Other")))
} else if(Type == "Z"){
Expand Down

0 comments on commit 0d5e52f

Please sign in to comment.