Skip to content

Commit 1209cdb

Browse files
Merge pull request #50 from NEFSC/dev
Dev
2 parents d94e294 + 45baa94 commit 1209cdb

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

R/create_condition_indicator.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ species_condition <- function(data,
139139
condition <- grouped_condition %>%
140140
dplyr::summarize(
141141
MeanCond = mean(.data$RelCond),
142-
nCond = dplyr::.data$n()
142+
nCond = dplyr::n()
143143
) |>
144144
dplyr::ungroup() |>
145145
dplyr::filter(.data$nCond >= 3) |>
@@ -148,7 +148,7 @@ species_condition <- function(data,
148148
# group again, without YEAR
149149
dplyr::group_by(!!!rlang::syms(grouping_vars[-which(grouping_vars == "YEAR")])) |>
150150
# filter to only species with 20+ years of data
151-
dplyr::mutate(n = dplyr::.data$n()) |>
151+
dplyr::mutate(n = dplyr::n()) |>
152152
dplyr::filter(.data$n >= 20) |>
153153
dplyr::select(-.data$n) |>
154154
# calculate sd and variance across years
@@ -176,4 +176,4 @@ species_condition <- function(data,
176176
dplyr::rename(DATA_VALUE = .data$MeanCond)
177177
}
178178
return(condition)
179-
}
179+
}

R/data.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,4 @@
114114
#' \item{\code{DOE}}{character COLUMN_DESCRIPTION}
115115
#' \item{\code{UOE}}{character COLUMN_DESCRIPTION}
116116
#'}
117-
"species_data"
118-
>
117+
"species_data"

0 commit comments

Comments
 (0)