add_variable adds columns to the data matrix
add_variable
adds columns to the data matrix
add_variable(data = data, dname = "chc", weights = NULL)
data |
data.frame, if |
dname |
if |
weights |
Matrix with weights to be added to the data |
data.frame
chc <- c(1,2,1,4,3,1,4) data <- data.frame(choice=chc, x=rnorm(length(chc)), y=rnorm(length(chc))) add_variable(data, dname="chc") ww <- c(1,1,1,2,2,2,3) add_variable(data, dname="weights", weights=ww)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.