R/read_sediment_trap_data.R

Defines functions read_sediment_trap_data

Documented in read_sediment_trap_data

#' @rdname read_data
#' @export

read_sediment_trap_data <- function(
  path,
  version = options()$"forcis_version",
  check_for_update = options()$"forcis_check_for_update"
) {
  data <- read_data_(
    check_file_fun = sediment_trap_filename,
    data_msg = "Sediment trap",
    path = path,
    version = version,
    check_for_update = check_for_update
  )

  data <- add_data_type(data, "Sediment trap")

  ## Check and convert columns ----

  taxa_columns <- get_species_names(data)

  for (i in seq_len(length(taxa_columns))) {
    data[, taxa_columns[i]] <- as.numeric(data[, taxa_columns[i]])
  }

  tibble::as_tibble(data)
}

Try the forcis package in your browser

Any scripts or data that you put into this service are public.

forcis documentation built on June 8, 2025, 10:37 a.m.