extract_data: Extract Data from a Report

Description Usage Arguments Value Examples

View source: R/extract_data.R

Description

Extract Data from a Report

Usage

1
2
3
4
5
6
extract_data(
  .df,
  checkcol = NA,
  promote_colnames = TRUE,
  strip_na_greater_than = 0.75
)

Arguments

.df

a data frame object.

checkcol

numeric. The column number to check for NA values. If not specified, extract_data will attempt to guess the appropriate column.

promote_colnames

logical. Should the first row be promoted to column names?

strip_na_greater_than

double between 0 - 1. Drops rows with greater than this percentage of missing values. Defaults to 0.75, or 75 percent or greater missing values

Value

a data frame object.

Examples

1
2
3
4
5
df <- data.frame(`...1` = c("Excel Report", NA, NA, NA),
                 `...2` = c(NA, "X", "x_1", "x_2"),
                 `...3` = c(NA, "Y", "y_1", "y_2"),
                 `...4` = c(NA, "Z", "z_1", "z_2"))
extract_data(df)

excelstrippr documentation built on Jan. 13, 2021, 6:05 a.m.