data_str: Function applied to data

View source: R/data_str.R

data_strR Documentation

Function applied to data

Description

his is a set of function are designed to help the user to deal with the structure of new data sets.

Usage

data_str(data, min.values = 100, min.levels = 10)
y_distinct(var)
data_distinct(data)
data_cha2fac(data, show.str = FALSE)
data_few2fac(data, min.levels = 10, show.str = FALSE)
data_int2num(data, min.values = 50, show.str = FALSE)

Arguments

data

a data frame

min.values

the minimal value distinct values befor warning

min.levels

the minimal value distinct levels befor warning

var

a vector

show.str

whether to show the structure

Details

The function data_str() gives the structure of the data set.

The function data_distinct() gives the distinct values of the vectors in the data set

The function y_distinct() gives the distinct values of single vector

The function data_cha2fac() tranforms all character vectors to factors

The function data_few2fac() transform all vectors with fewer values than min.levels into factors

The function data_int2num() transform all integer vectors with more values than min.values into numeric

Author(s)

Mikis Stasinopoulos, Bob Rigby and Fernanda De Bastiani

References

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.

Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, https://www.jstatsoft.org/v23/i07/.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.

(see also https://www.gamlss.com/).

See Also

data_dim

Examples

data_str(rent)
data_distinct(rent)
data_cha2fac(rent)
data_few2fac(rent)
data_int2num(rent)

gamlss.ggplots documentation built on Sept. 3, 2023, 5:08 p.m.