Interface to Packages 'tibble' and 'haven'
tibbles.RdA as_tibble method (as_table.data.set) allows to transform "data.set" objects
into objects of class "tbl_df" as defined by the package
"tibble".
as.item methods for objects of classes "haven_labelled"
and "have_labelled_spss" allow to transform a "tibble" imported
using read_dta, read_spss, etc. from the package "haven"
into an object of class "data.set".
as_haven can be used to transform "data.set" objects
into objects of class "tbl_df" with that additional information
that objects imported using the "haven" package usually have, i.e.
variable labels and value labels (as the "label" and
"labels" attributes of the columns).
Usage
as_tibble.data.set(x,...)
# S4 method for class 'haven_labelled'
as.item(x,...)
# S4 method for class 'haven_labelled_spss'
as.item(x,...)
as_haven(x,...)
# S4 method for class 'data.set'
as_haven(x,user_na=FALSE,...)
# S4 method for class 'item.vector'
as_haven(x,user_na=FALSE,...)
# S4 method for class 'tbl_df'
as.data.set(x,row.names=NULL,...)Arguments
- x
for
as_tibble.data.setandas_haven, an object of class"data.set"; foras.item, an object of class"haven_labelled"or"haven_labelled_spss"; an object of class"tbl_df"foras.data.set.- user_na
logical; if
TRUEthen the resulting vectors have an"na_values"and/or"na_range"attribute.- row.names
NULLor an optional character vector of row names.- ...
further arguments, passed through to other the the
as_tibblemethod for lists, or ignored.