validate_args: Perform error checking on function arguments

View source: R/validate_args.R

validate_argsR Documentation

Perform error checking on function arguments

Description

This will validate all supplied function arguments using the checkmate package. All function arguments within the rctools package should be contained in this function. To add new arguments, add the argument to this function, then append the appropriate vars list in this function's body.

This is an internal function only.

Usage

validate_args(
  required = NULL,
  report_id = NULL,
  batch_size = NULL,
  sd_threshold = NULL,
  url = NULL,
  token = NULL,
  id_field = NULL,
  logfile = NULL,
  completion_field = NULL,
  title = NULL,
  outlier_var = NULL,
  wrap_var = NULL,
  y = NULL,
  x = NULL,
  records = NULL,
  fields = NULL,
  forms = NULL,
  events = NULL,
  colClasses = NULL,
  group_by = NULL,
  var_roots = NULL,
  repeats = NULL,
  factor_cols = NULL,
  filter_logic = NULL,
  overwriteBehavior = NULL,
  returnContent = NULL,
  error_handling = NULL,
  plot_type = NULL,
  legend_position = NULL,
  survey = NULL,
  dag = NULL,
  form_complete_auto = NULL,
  format = NULL,
  factor_labels = NULL,
  labels = NULL,
  col_labels = NULL,
  dates = NULL,
  returnData = NULL,
  plot = NULL,
  filtered = NULL,
  long_format = NULL,
  make_repeat = NULL,
  columns = NULL,
  rows = NULL,
  sd_guides = NULL,
  strip = NULL,
  event_labels = NULL,
  record_data = NULL,
  data_dict = NULL,
  users = NULL,
  form_perm = NULL,
  instruments = NULL,
  arms = NULL,
  mappings = NULL,
  proj_info = NULL,
  long_data = NULL,
  event_data = NULL,
  bundle = NULL,
  fields_list = NULL,
  sex_var = NULL
)

Arguments

required

Character. Vector of argument names which are required by the calling function.

report_id

Numeric, length == 1

batch_size

Numeric, length == 1

sd_threshold

Numeric, length == 1

url

Character, length == 1

token

Character, length == 1; 32 alpha-numeric characters

id_field

Character, length == 1

logfile

Character, length == 1

completion_field

Character, length == 1

title

Character, length == 1

outlier_var

Character, length == 1

wrap_var

Character, length == 1

y

Character, length == 1

x

Character, length == 1

records

Character vector

fields

Character vector

forms

Character vector

events

Character vector

colClasses

Character vector

group_by

Character vector

var_roots

Character vector

repeats

Character vector

factor_cols

Character vector

filter_logic

Character vector

overwriteBehavior

Character, defined inputs, length == 1

returnContent

Character, defined inputs, length == 1

error_handling

Character, defined inputs, length == 1

plot_type

Character, defined inputs, length == 1

legend_position

Character, defined inputs, length == 1

survey

Logical, length == 1

dag

Logical, length == 1

form_complete_auto

Logical, length == 1

format

Logical, length == 1

factor_labels

Logical, length == 1

labels

Logical, length == 1

col_labels

Logical, length == 1

dates

Logical, length == 1

returnData

Logical, length == 1

plot

Logical, length == 1

filtered

Logical, length == 1

long_format

Logical, length == 1

make_repeat

Logical, length == 1

columns

Logical, length == 1

rows

Logical, length == 1

sd_guides

Logical, length == 1

strip

Logical, length == 1

event_labels

Logical, length == 1

record_data

Data.frame; contains record_id column

data_dict

Data.frame, ncol == 18

users

Data.frame

form_perm

Data.frame

instruments

Data.frame

arms

Data.frame

mappings

Data.frame

proj_info

Data.frame

long_data

Data.frame

event_data

Data.frame. As found in bundle$event_data

bundle

List; redcapBundle

fields_list

List

sex_var

Character (length == 1) or NA

Author(s)

Marcus Lehr


chillywings/rctools documentation built on Aug. 9, 2024, 11:52 p.m.