Skip to content

Commit 270ddcf

Browse files
function cleanup, no substantial change
1 parent e4e4e2d commit 270ddcf

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

R/03_functions.R

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ biomass_round <- function(x) {
33
round(x, digits = 0)
44
}
55

6-
# https://github.com/geanders/weathermetrics/blob/master/R/temperature_conversions.R
7-
c2f <- function(T.celsius, round = 2) {
8-
T.fahrenheit <- (9 / 5) * T.celsius + 32
9-
T.fahrenheit <- round(T.fahrenheit, digits = round)
10-
return(T.fahrenheit)
11-
}
12-
136
# Other conversions
147
divnmi2forkm2 <- 1 / 3.429904
158
divkm2fornmi2 <- 3.429904
@@ -120,10 +113,10 @@ chr_to_num <- function(x) {
120113
#'
121114
#' @examples
122115
top_CPUE_formatted <- function(top_CPUE) {
123-
x <- top_CPUE %>%
116+
x <- top_CPUE |>
124117
# existing changes in markdown file:
125-
dplyr::select(NMFS_STATISTICAL_AREA, common_name, wgted_mean_cpue_kgha) %>%
126-
dplyr::mutate(wgted_mean_cpue_kgha = round(wgted_mean_cpue_kgha, digits = 1)) %>%
118+
dplyr::select(NMFS_STATISTICAL_AREA, common_name, wgted_mean_cpue_kgha) |>
119+
dplyr::mutate(wgted_mean_cpue_kgha = round(wgted_mean_cpue_kgha, digits = 1)) |>
127120
dplyr::rename(
128121
`NMFS area` = NMFS_STATISTICAL_AREA,
129122
Species = common_name,

0 commit comments

Comments
 (0)