replace_value {creditmodel}R Documentation

Replace Value

Description

replace_value is for replacing values of some variables . replace_value_x is for replacing values of a variable.

Usage

replace_value(
  dat = dat,
  x_list = NULL,
  x_pattern = NULL,
  replace_dat,
  MARGIN = 2,
  VALUE = if (MARGIN == 2) colnames(replace_dat) else rownames(replace_dat),
  RE_NAME = TRUE,
  parallel = FALSE
)

replace_value_x(
  dat,
  x,
  replace_dat,
  MARGIN = 2,
  VALUE = if (MARGIN == 2) colnames(replace_dat) else rownames(replace_dat),
  RE_NAME = TRUE
)

Arguments

dat

A data.frame.

x_list

Names of variables to replace value.

x_pattern

Regular expressions, used to match variable names.

replace_dat

A data.frame contains value to replace.

MARGIN

A vector giving the subscripts which the function will be applied over. E.g., for a matrix 1 indicates rows, 2 indicates columns, c(1, 2) indicates rows and columns. Where X has named dimnames, it can be a character vector selecting dimension names.

VALUE

Values to replace.

RE_NAME

Logical, rename the replaced variable.

parallel

Logical, parallel computing. Default is TRUE.

x

Name of variable to replace value.


[Package creditmodel version 1.3.1 Index]