Learn R Programming

HelpersMG (version 6.4)

d: 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  "
)

Value

A string

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.

Author

Marc Girondot marc.girondot@gmail.com

Details

d Write an ASCII Representation of a vector object

See Also

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

Examples

Run this code
d(c(A=10, B=20))
dput(c(A=10, B=20))

Run the code above in your browser using DataLab