Description Usage Arguments Value Examples
add_variable
adds columns to the data matrix
1 | 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
1 2 3 4 5 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.