export: Export a matrix to tex, csv or xlsx

Description Usage Arguments Details Value Methods (by class) See Also

View source: R/statTools_code_BIVAR.R

Description

Better visualisation of a matrix, or saving it in a file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
export(X, ...)

## Default S3 method:
export(X, cols = colnames(X), rows = rownames(X),
  type = "xlsx", file = tempfile(pattern = "exportDefault", fileext =
  paste0(".", type)), caption = NULL, label = NULL, append = FALSE, ...)

## S3 method for class 'bivarTable'
export(X, type = "xlsx", file = tempfile(pattern =
  "exportBivarTable", fileext = paste0(".", type)), caption = NULL,
  label = NULL, ...)

Arguments

X

Object to be exported (matrix or bivarTable object).

...

Further arguments passed to print.xtable

cols

Names for the columns

rows

Names for the rows

type

Type of file to export to (extension without the dot).

file

Name of the file. By default a temp file is created.

caption

Caption passed to xtable in case of exporting to tex.

label

Label when exporting to tex.

append

Append or not in case of csv.

Details

When exporting to xlsx, the produced file is opened. Make sure openxlsx is working ok on your computer (Rtools and PATH issues).

Value

Returns the argument X but invisible.

Methods (by class)

See Also

bivarTable


gcastella/statTools documentation built on May 16, 2019, 11:10 p.m.