Skip to content

Commit

Permalink
boats number is an integer not character
Browse files Browse the repository at this point in the history
  • Loading branch information
langbart committed Aug 23, 2024
1 parent 0de7184 commit 4345972
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/preprocess-metadata-tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,15 @@ pt_validate_habitat <- function(x) {
}

pt_validate_vessels_stats <- function(vessels_stats_table) {
vessels_stats_table %>%
metadata_tables$fishing_vessel_statistics %>%
tidyr::separate(.data$boat_numbers,
into = c("reporting_region", "type", NA),
sep = "([|])"
) %>%
dplyr::select(.data$reporting_region, .data$type, .data$n_boats, .data$info_date) %>%
dplyr::mutate(dplyr::across(where(is.character), stringr::str_trim))
dplyr::mutate(dplyr::across(where(is.character), stringr::str_trim),
n_boats = as.integer(.data$n_boats)
)
}

pt_validate_reg_boats <- function(registered_boats) {
Expand Down

0 comments on commit 4345972

Please sign in to comment.