var_view | R Documentation |
Creates a table with the name, the description, the value labels and the format for each variable in the data frame. It is similar to the variable view shown in the SPSS.
var_view(x)
x |
The data frame whose variables we want to summarize. |
A data frame containing the specified summary.
This function was built in order to summarize imported SPSS labelled data sets using spss_import
, but it can also work with other labelled data sets.
spss_import
require(ImportExport)
a<- 1:10
b<-rep("b",times=10)
c<-rep(1:2,each=5)
x<-data.frame(a,b,c)
attr(x$a,"label")<- "descr1"
attr(x$b,"label")<- NULL
attr(x$c,"label")<- "descr3"
attr(x$c,"value.labels")<-list("1"="Yes","2"="No")
var_view(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.