tocharac: Transform to character

Description Usage Arguments Value Author(s) Examples

Description

Coerce a vector, a matrix or a data.frame into character

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  tocharac(x, ...)

  ## Default S3 method:
 tocharac(x, format = "f", digits = 2,
    decimal.mark = ".", drop0trailing = FALSE,
    na.print = "", ...)

  ## S3 method for class 'matrix'
 tocharac(x, format = "f", digits = 2,
    decimal.mark = ".", drop0trailing = FALSE,
    na.print = "", include.rownames = FALSE,
    include.colnames = FALSE, rownames = NULL,
    colnames = NULL, ...)

  ## S3 method for class 'data.frame'
 tocharac(x, format = "f",
    digits = 2, decimal.mark = ".", drop0trailing = FALSE,
    na.print = "", include.rownames = FALSE,
    include.colnames = FALSE, rownames = NULL,
    colnames = NULL, ...)

Arguments

x

a vector, a matrix, or a data.frame

format

see ?formatC. Same options, plus one: "p" (see ?plim)

digits

see ?formatC

decimal.mark

see ?formatC

drop0trailing

see ?formatC

na.print

character string specifying how NA should be formatted specially

include.rownames

if TRUE, results will include row names

include.colnames

if TRUE, results will include column names

rownames

character vector (replicated or truncated as necessary) indicating rownames of the corresponding rows. If NULL (default) rownames are not modified

colnames

character vector (replicated or truncated as necessary) indicating colnames of the corresponding columns. If NULL (default) colnames are not modified

...

not used

Value

A character vector or matrix

Author(s)

David Hajage dhajage@gmail.com

Examples

1
2

eusebe/markup documentation built on May 16, 2019, 9:35 a.m.