checkDF: checkDF - checks a CPUE data.frame has all required fields

Description Usage Arguments Value Examples

View source: R/cpuefuncs.r

Description

checkDF - checks a CPUE data.frame contains all fields expected for analysis. These are Year, Month, Vessel, catch_kg, Long, Lat, Depth, DayNight, Zone, Effort, Method, Fishery, LnCE, and DepCat. If any are missing it identifies them if not it confirms all is ok. Although, except for their class checkDF does not consider the contents of each field.

Usage

1

Arguments

x

- a data.frame of CPUE data used in the SESSF

Value

only a text message to the console confirming all ok or reporting which fields are missing

Examples

1
2
3
4
5
6
7
8
9
dataf <- as.data.frame(matrix(rnorm(100,mean=10,sd=1),nrow=20,ncol=5))
colnames(dataf) <- c("Year","catch_kg","Long","Zone","LnCE")
checkDF(dataf)
dataf <- as.data.frame(matrix(rnorm(42,mean=10,sd=1),nrow=1,ncol=14))
colnames(dataf) <- c("Year","Month","Vessel","catch_kg","Long","Lat",
                     "Depth","DepCat","DayNight","Zone","Effort",
                     "Method","Fishery","LnCE")
checkDF(dataf)
head(dataf)

haddonm/r4cpue documentation built on May 11, 2020, 1:31 a.m.