R/clean_bed.R

Defines functions clean_bed

Documented in clean_bed

#' clean_bed
#'
#' @param tows
#'
#' @description Returns a .csv table of number of survey areas and number of tows by bed
#' @export clean_bed
#'
#' @examples
clean_bed <- function(tows){

  area %>%
    full_join(count(tows, Bed)) %>%
    drop_na %>%
    rename(tows = n) %>%
    mutate(Bed = factor(Bed)) -> x

  write_csv(x, here::here(paste0("output/",YEAR,"/beds.csv")))
  x

}
commfish/scallopr documentation built on Nov. 4, 2019, 9:10 a.m.