This vignette shows how to use artfishr R package.
The R artfishr can be installed from Github.
As prequirements, packages remotes and
vrule should be installed.
remotes can be installed from CRAN using:remotes:Once packages remotes and vrule, R package
artfishr can be installed using:
Once installed, artfishr can be loaded using
library(artfishr) or `require(artfishr)``
See the full guide:
vignette("02_data-requirements-validation")
artfishrFull tutorial: vignette("03_artfishr-workflow")
See: vignette("04_artfish-methodology")
# Load sample datasets
active_vessels <- read.csv(system.file("extdata/samples/active_vessels.csv", package = "artfishr"))
effort <- read.csv(system.file("extdata/samples/effort.csv", package = "artfishr"))
landings <- read.csv(system.file("extdata/samples/landings.csv", package = "artfishr"))
active_days <- read.csv(system.file("extdata/samples/active_days.csv", package = "artfishr"))
# Validate data
validate_input_datasets(
active_vessels = active_vessels,
effort = effort,
effort_source = "fisher_interview",
landings = landings,
active_days = active_days
)
#Run artfish
report <- artfishr::compute_report(
active_vessels = active_vessels,
effort = effort,
effort_source = "fisher_interview",
active_days = active_days,
active_vessels_strategy = "closest",
landings = landings,
minor_strata = "minor_stratum"
)
#See result
head(report)