read_sas_count: Reads a sas file by chunks and summarize everything

Description Usage Arguments Details Value

View source: R/read_sas_count.R

Description

'read_sas_count' allows you to wrap 'read_sas' in order to make the usual dplyr counts without exploding the ram.

Usage

1
2
3
4
5
6
7
8
9
read_sas_count(
  data_file,
  col_select,
  ...,
  row_filter = NULL,
  chunk_size = 10000,
  name = "n",
  weight = NULL
)

Arguments

data_file

Path to data and catalog files

col_select

the selected columns

...

some mutate to be done

row_filter

the filtering expression

chunk_size

the size of the chunks

name

the name of the columns for counts

weight

a column to be taken as weights for the counts

Details

Everything is summarized, grouped by the output columns, and counted into the variable of name 'name' with a weight equal to 'weight'. You can add or modify the columns with the '...' as you would into a 'mutate', and you can filter the rows with a the argument 'row_filter' (as you would with 'filter').

Value

a tibble


arnaud-feldmann/RchunkNcount documentation built on Dec. 19, 2021, 4:39 a.m.