process_digit_data: Create an object instance for 'DigitAnalysis'. Parse and...

View source: R/data_input_functions.R

process_digit_dataR Documentation

Create an object instance for DigitAnalysis. Parse and clean the data for digit analysis.

Description

Create an object instance for DigitAnalysis. Parse and clean the data for digit analysis.

Usage

process_digit_data(
  filepath = NA,
  digit_columns = NA,
  filetype = "csv",
  delim = ",",
  raw_df = NA
)

Arguments

filepath

Default to NA. If loading data using filepath, specify filepath as a string.

digit_columns

All potential data columns to be analyzed. Defaulted to NA. Can be specified as any of

  • digit_columns = 'col_name'

  • digit_columns = c('col_name')

  • digit_columns = c('col_name1','col_name2', ...)

filetype

Default to 'csv'. If loading data using filepath, specify either 'csv' or 'excel'. 'excel' option supports both 'xlsx' and 'xls' format.

delim

Defaulted to ','. Can specify other delimiters as well.

raw_df

Default to NA. If loading data using a dataframe. Pass in the dataframe instance.

Value

An object in DigitAnalysis

Examples

process_digit_data('col_name', filepath='~/filename.csv')
process_digit_data('col_name', filepath='~/filename.xlsx', filetype='excel', delim=',')
process_digit_data('col_name', raw_df=my_dataframe)

jlederluis/digitanalysis documentation built on Nov. 5, 2023, 11:46 a.m.