BSkySetWeight: Expand weights

View source: R/BSkySetWeight.r

BSkySetWeightR Documentation

Expand weights

Description

Creates a new dataset with rows expanded as per weights. Expands (replicates) the rows of a data.frame by a value contained in one of the columns in the source data.frame or data.table. BSkySetWeights() calls expandRows() from the package splitstackshape.

Usage

BSkySetWeight(weights, data, newdata)

Arguments

weights

The dataset variable that contains the weights.

data

The input data.frame or data.table.

newdata

The new dataset where the rows are replicated for the weights specified.

Value

expanded dataset according to the weights


BlueSkyStatistics/BlueSky documentation built on April 14, 2025, 7:39 a.m.