Learn R Programming

plasso (version 0.1.3)

handle_weights: Sanitizes potential sample weights

Description

handle_weights cleans potential sample weights or codes them as ones if they are not specified.

Usage

handle_weights(w, n)

Value

Vector of weights.

Arguments

w

Vector or n x 1 matrix of weights or null if no weights provided

n

Number of observations