dh.columnCast: Casts column classes of a table

View source: R/cast-cols.R

dh.columnCastR Documentation

Casts column classes of a table

Description

This function allows you to specify the desired classes for a some variables of a dataframe. The resulting dataframe will have the same column order as the input one. If multiple columns are to be casted but only one objective class is provided, it will be reused for all the selected columns.

Usage

dh.columnCast(
  df = NULL,
  target_vars = NULL,
  target_class = NULL,
  conns = NULL,
  checks = TRUE
)

Arguments

df

Character specifying a server-side data frame.

target_vars

Character vector specifying which columns are to be casted to new classes.

target_class

Character vector specifying the objective classes of the selected columns.

conns

DataSHIELD connections object.

checks

Logical; if TRUE checks are performed prior to running the function. Default is TRUE.

Value

Tibble with a summary of the successful and failed casts


lifecycle-project/ds-helper documentation built on Oct. 27, 2023, 2:08 p.m.