d: Write an ASCII Representation of a vector object

View source: R/d.R

dR Documentation

Write an ASCII Representation of a vector object

Description

Writes an ASCII text representation of an R object.
It can be used as a replacement of dput() for named vectors.
The controls "keepNA", "keepInteger" and "showAttributes" are utilized for named vectors.

Usage

d(
  x,
  file = "",
  control = c("keepNA", "keepInteger", "showAttributes"),
  collapse = ", \n  "
)

Arguments

x

A named vector object

file

either a character string naming a file or a connection. "" indicates output to the console.

control

character vector indicating deparsing options. See .deparseOpts for their description.

collapse

Characters used to separate values.

Details

d Write an ASCII Representation of a vector object

Value

A string

Author(s)

Marc Girondot marc.girondot@gmail.com

See Also

Other Characters: asc(), char(), tnirp()

Examples

d(c(A=10, B=20))
dput(c(A=10, B=20))

HelpersMG documentation built on Sept. 12, 2024, 9:35 a.m.