checks_compute_functions: Perform checks for 'compute' functions.

View source: R/compute_functions_helpers.R

checks_compute_functionsR Documentation

Perform checks for 'compute' functions.

Description

\lifecycle

experimental Perform checks within 'compute_*()' functions. The checks performed are:

  • The file is a data.frame type of object.

  • 'varaible' is a column in file

  • 'variable' is a numeric variable.

  • The weight variable is a column in file.

  • 'weight' variable contains valid values (i.e. different than NAs and 0s).

Usage

checks_compute_functions(file, file_name, variable, weight = NULL)

Arguments

file

A LIS or LWS file.

file_name

The name of the LIS or LWS file.

variable

A string with the name of the variable for which checks should be computed.

weight

A string with the name of the variable in 'file' that should be used as sample weights. If NULL (default), checks for weight variable are not performed.

Details

The checks related to the 'weight' variable are only performed if argument 'weight' is not NULL.


JosepER/lissyrtools documentation built on Jan. 26, 2025, 10:01 p.m.