dataFrameToCode: programming tool to convert a data.frame in memory to a...

Description Usage Arguments Value

View source: R/tools.R

Description

programming tool to convert a data.frame in memory to a character vector representing code for inclusion into programs.

Usage

1
2
3
4
5
6
7
dataFrameToCode(
  dataframe,
  differentLines = "\n\t",
  includeData = TRUE,
  trim = NA,
  ...
)

Arguments

dataframe

data.frame to be converted to code. Can be with and without data.

differentLines

parameter that allows inclusion of new line and tab 'characters' in the produced character vector. The intended effect is not seen when printing 'normally', use cat() for this.

includeData

default is TRUE, it will then include the data itself in the produced character string. If FALSE, then it will not.

trim

if NA (default) nothing is done, else should be value "both", "left" or "right". It will then cause all vectors to be white space trimmed on the specified site. See ?stringr::str_trim for more details. Note that trimming is done after formatting, so may undo settings like wide = x'

...

is used to transfer settings to the base format() function. See ?format for more info. Note that these settings are applied to all vector types!

Value

a character vector.


DarkerThanEver/personalR documentation built on Dec. 17, 2021, 4:06 p.m.