WS: Compute weighted sums

Description Usage Arguments Value Examples

View source: R/WS.R

Description

Compute weighted sums

Usage

1
WS(list.tables, weight = 1, list.y = NULL, sep = "_n", dimname1 = "m")

Arguments

list.tables

A list of dataframes

weight

either a real number of a character string indicating the name of the weight variable.

list.y:

list of variables whose weighted sum needs to be computed. It can be factor or character variables.

Value

a dataframe.

Examples

1
2
WS(plyr::dlply(CRE_data,.variables=~time),"Sampling.weight",c("Hobby","Status","State"));
WS(plyr::dlply(CRE_data,.variables=~time),"Sampling.weight",character(0));

DanielBonnery/CompositeRegressionEstimation documentation built on June 17, 2020, 12:16 p.m.