| nv2df | R Documentation |
This function simply takes the values of the input vector and assigns it to the first column of the dataframe. The second column assigned from the names of this input vectors)
nv2df(x, clmn.names=c('x','name'), ...)
x |
a named vector |
clmn.names |
a vector of names of the new columns formed by 1) the values and 2) the names of the named vector |
... |
other parameters passed on to data.frame() |
a two column dataframe with values of x in the first column and the names of x in the second
David Schruth
vector,name
x <- 1:3
nv2df(nv(x,letters[x]), clmn.names=c('x','y'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.