univar_numeric.data.frame: Statistic of univariate numerical variables

Description Usage Arguments Details Value Attributes of return object See Also Examples

Description

The univar_numeric() calculates statistic of numerical variables that is frequency table

Usage

1
2
3
4
univar_numeric(.data, ...)

## S3 method for class 'data.frame'
univar_numeric(.data, ...)

Arguments

.data

a data.frame or a tbl_df.

...

one or more unquoted expressions separated by commas. You can treat variable names like they are positions. Positive values select variables; negative values to drop variables. These arguments are automatically quoted and evaluated in a context where column names represent column positions. They support unquoting and splicing.

Details

univar_numeric() calculates the popular statistics of numerical variables. If a specific variable name is not specified, statistics for all categorical numerical included in the data are calculated. The statistics obtained by univar_numeric() are part of those obtained by describe(). Therefore, it is recommended to use describe() to simply calculate statistics. However, if you want to visualize the distribution of individual variables, you should use univar_numeric().

Value

An object of the class as individual variables based list. A component named "statistics" is a tibble object with the following statistics.:

Attributes of return object

Attributes of compare_category class is as follows.

See Also

summary.univar_numeric, print.univar_numeric, plot.univar_numeric.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Calculates the all categorical variables
all_var <- univar_numeric(heartfailure)

# Print univar_numeric class object
all_var

# Calculates the platelets, sodium variable
univar_numeric(heartfailure, platelets, sodium)

# Summary the all case : Return a invisible copy of an object.
stat <- summary(all_var)

# Summary by returned object
stat

# Statistics of numerical variables normalized by Min-Max method
summary(all_var, stand = "minmax")

# Statistics of numerical variables standardized by Z-score method
summary(all_var, stand = "zscore")

# one plot with all variables
# plot(all_var)

# one plot with all normalized variables by Min-Max method
# plot(all_var, stand = "minmax")

# one plot with all variables
# plot(all_var, stand = "none")

# one plot with all robust standardized variables 
# plot(all_var, viz = "boxplot")

# one plot with all standardized variables by Z-score method 
# plot(all_var, viz = "boxplot", stand = "zscore")

# individual boxplot by variables
# plot(all_var, indiv = TRUE, "boxplot")

# individual histogram by variables
# plot(all_var, indiv = TRUE, "hist")

# individual histogram by robust standardized variable 
# plot(all_var, indiv = TRUE, "hist", stand = "robust")

# plot all variables by prompt
# plot(all_var, indiv = TRUE, "hist", prompt = TRUE)

bit2r/kodlookr documentation built on Dec. 19, 2021, 9:49 a.m.