Read in the functional group file as dataframe.

load_fgs(fgs)

Arguments

fgs

Character string giving the connection to the functional groups file. The filename usually contains Groups and does end in .csv.

Value

A data.frame of functional group information.

See also

Examples

d <- system.file("extdata", "setas-model-new-becdev", package = "atlantistools") file <- "SETasGroups.csv" fgs <- load_fgs(file.path(d, file)) head(fgs)
#> Code Index IsTurnedOn Name LongName NumCohorts #> 1 FPL 0 0 Planktiv_L_Fish Large planktivorous fish 10 #> 2 FPO 1 0 Planktiv_O_Fish Other planktivorous fish 10 #> 3 FPS 2 1 Planktiv_S_Fish Small planktivorous fish 10 #> 4 FVD 3 0 Pisciv_D_Fish Deep piscivorous fish 10 #> 5 FVV 4 0 Pisciv_V_Fish Vulnerable piscivorous fish 10 #> 6 FVS 5 1 Pisciv_S_Fish Shallow piscivorous fish 10 #> MovesVertically MovesHorizontally isFished IsImpacted isTAC InvertType #> 1 1 1 1 1 1 FISH #> 2 1 1 1 1 1 FISH #> 3 1 1 1 1 1 FISH #> 4 1 1 1 1 1 FISH #> 5 1 1 1 1 1 FISH #> 6 1 1 1 1 1 FISH #> isPredator IsCover isSiliconDep isAssessed IsCatchGrazer isOverWinter #> 1 1 0 0 1 0 0 #> 2 1 0 0 1 0 0 #> 3 1 0 0 1 0 0 #> 4 1 0 0 1 0 0 #> 5 1 0 0 1 0 0 #> 6 1 0 0 1 0 0
d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools") file <- "SETasGroupsDem_NoCep.csv" fgs <- load_fgs(file.path(d, file)) head(fgs)
#> Code Index IsTurnedOn Name LongName NumCohorts #> 1 FPS 1 1 Planktiv_S_Fish Small planktivorous fish 10 #> 2 FVS 2 1 Pisciv_S_Fish Shallow piscivorous fish 10 #> 3 CEP 3 1 Cephalopod Cephalopod 2 #> 4 BML 4 1 Megazoobenthos Megazoobenthos 1 #> 5 PL 5 1 Diatom Diatom 1 #> 6 DL 6 1 Lab_Det Labile detritus 1 #> NumGeneTypes NumStages NumSpawns NumAgeClassSize NumStocks VerticallyMigrates #> 1 1 2 1 1 1 1 #> 2 1 2 1 1 1 1 #> 3 1 2 1 1 1 1 #> 4 1 1 1 1 1 1 #> 5 1 1 1 1 1 0 #> 6 1 1 1 1 1 0 #> HorizontallyMigrates IsFished IsImpacted isTAC GroupType IsPredator #> 1 1 1 1 1 FISH 1 #> 2 1 1 1 1 FISH 1 #> 3 1 1 1 1 CEP 1 #> 4 1 1 1 1 MOB_EP_OTHER 1 #> 5 0 0 0 0 LG_PHY 0 #> 6 0 0 0 0 LAB_DET 0 #> IsCover IsSiliconDep IsAssessed IsCatchGrazer OverWinters isCultured #> 1 0 0 1 0 0 0 #> 2 0 0 1 0 0 0 #> 3 0 0 1 0 0 0 #> 4 0 0 1 0 0 0 #> 5 0 1 1 0 0 0 #> 6 0 0 1 0 0 0 #> isHabDepend #> 1 0 #> 2 0 #> 3 0 #> 4 0 #> 5 0 #> 6 0