vectorToDB: Converts a numeric, integer or character vector (multiple...

View source: R/dbAccess.R

vectorToDBR Documentation

Converts a numeric, integer or character vector (multiple elements) to a single element character vector (a string)

Description

Converts a numeric, integer or character vector (multiple elements) to a single element character vector (a string)

Usage

vectorToDB(
  dataVector = NA,
  collapseChar = ";",
  formatNumbers = FALSE,
  removeNA = FALSE,
  ...
)

Arguments

dataVector

the data to be converted: integer, numeric, character or logical. Other data types have not been tested

collapseChar

the character to be used as seperator in the end result. Note: this seperator should not be present in the dataVector (especially after transformation) as it will give problems when using the DBToVector function.

formatNumbers

boolean specifying whether the dataVector should be formatted using the base::format function

removeNA

if TRUE then all NA values are removed before the result is transformed into a single element character vector

...

further arguments to be passed onto to base::format, see ?base::format for more information. Ignored when formatNumbers == FALSE

Value

a single element character vector

Note

dataVectors of the 'factor' class are changed into character class!


BenBruyneel/BBPersonalR documentation built on Aug. 23, 2024, 8:28 p.m.