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 = 20)

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
## Create a list of dataframes. If you provide the `filename`
## parameter to be equal to, say, "myglance.xlsx", then it will
## create an Excel workbook and place the content of each
## dataframe in a separate sheet.
glance_data_in_workbook(iris)

glancedata documentation built on Dec. 1, 2019, 1:22 a.m.