convertDFtoDB: Converts data.frames to a single data.frame where each...

View source: R/dbAccess.R

convertDFtoDBR Documentation

Converts data.frames to a single data.frame where each data.frame from the list is a row of blobs or character separated strings

Description

Converts data.frames to a single data.frame where each data.frame from the list is a row of blobs or character separated strings

Usage

convertDFtoDB(
  dfData,
  columnNames = colnames(dfData[[1]]),
  saveClasses = FALSE,
  collapseChar = ";",
  formatNumbers = FALSE,
  toBlob = TRUE,
  type = "gzip",
  ...
)

Arguments

dfData

the data to be converted: a list of data.frames; they can be different number of rows, but columns specified in columnNames must be present

columnNames

character vector specifying which columns from the data.frame(s) to convert

saveClasses

default FALSE. If TRUE then the first row of the resulting data.frame will be the class name (as a character vector)

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

toBlob

should the data be converted to a raw vector or not

type

character string, the type of compression. See ?memCompress for details

...

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

Value

a data.frame

Note

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


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