aggr_share_of: Calculates the share of something in an entirety of a...

Description Usage Arguments

Description

aggr_share_of calculate the share of a group of entries in the entirety of entries one level above, such as the share of plaice in landings of a particular fishing fleet per year.

Usage

1
aggr_share_of(data, id.vars, col, case, value)

Arguments

data

Dataset to use.

id.vars

A list of the variables to split data frame by, as as.quoted variables, a formula or character vector (similar ddply in package plyr).

col

Variable name that defines the case for which share is to be calculated.

case

Name of the case for which share in the entirety is to be calculated.

value

What to aggregate, i.e. calculate the share of?


MoritzSt/sNoSeR documentation built on May 7, 2019, 4:59 p.m.