var_view: Summarize variable information

Description Usage Arguments Value Note See Also Examples

View source: R/var_view.R

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

1

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

spss_import

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

ImportExport documentation built on Jan. 13, 2021, 7:39 a.m.