ddim: Data Dimensions

View source: R/ddim.R

ddimR Documentation

Data Dimensions

Description

Show the data dimensions of a table.

Usage

ddim(x, reduce = FALSE)

Arguments

x

a data frame where the first columns are dimension variables and the last column is a measurement variable.

reduce

is whether to omit single-level dimensions.

Details

Dimension variables can include year, age, region, fleet, survey, or the like, generally an integer or string. The measurement variable can be catch, fishing mortality, maturity, weight, or the like, often a decimal.

x can also be an FLR table in FLQuant format.

Value

Named vector showing the dimension names and number of levels.

See Also

unique is the base function to extract the levels of a dimension variable.

TAF-package gives an overview of the package.

Examples

# Long table format, 8 years and 4 ages
ddim(catage.long)

# Some base R datasets
ddim(esoph[-5])
ddim(rev(warpbreaks))
ddim(rev(ToothGrowth))


ices-tools-prod/TAF documentation built on Nov. 15, 2024, 1:01 a.m.