var_view {ImportExport} | R Documentation |
Summarize variable information
Description
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.
Usage
var_view(x)
Arguments
x |
The data frame whose variables we want to summarize. |
Value
A data frame containing the specified summary.
Note
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.
See Also
Examples
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)
[Package ImportExport version 1.3 Index]