glance_data_in_workbook: Export glance data to Excel Workbook

Description Usage Arguments Details Value Author(s) Examples

View source: R/glance_data_in_workbook.R

Description

It is similar to glance_data but instead of creating a single dataframe, it creates a list of seven dataframes:

all

Same output as glance_data.

summary

A tally of columns by type. A dataframe with two columns: column type and count.

all_nas

Summary of columns with only NAs.

single_value

Summary of columns with a single value besides NAs. It might be numeric or character.

binary

Summary of columns with two values besides NAs. It might be numerical or categorical.

numerical

Summary of all numerical columns when there are more than two possible values.

categorical

Summary of all categorical columns when there are more than two possible values.

Usage

1
glance_data_in_workbook(dataframe, filename = NULL, limit2tally = 5)

Arguments

dataframe

Dataframe to be summarized

filename

File name of the Excel file, e.g., "mydataglance.xlsx". By default, no file name is provided and, therefore, no Excel is created.

limit2tally

One of the summaries is a tally of the distinct values on each column. If there are too many different values in a column, this summary would be meaningless. This limit2tally is the limit of distinct values to tally. If there are more than that it returns "Too many unique values".

Details

If a XLSX file name is provided, it will create a file with seven sheets, corresponding to the seven dataframes above.

Finally, the last elements of the list (and the last five sheets if the filename is provided), are disjoint. That is, if a the summary of a column is included in "binary", it will not be included in "numerical".

Value

A list

Author(s)

Guillermo Basulto-Elias

Examples

1
2
3
4
5
6
7
8
glance_data_in_workbook(iris)

## If you want to save the list into an XLSX file, add the name of
#the file.
## Not run: 
glance_data_in_workbook(iris, "summary_of_iris.xlsx")

## End(Not run)

gbasulto/rmiscfun documentation built on July 25, 2019, 8:56 p.m.