Learn R Programming

questionr (version 0.2)

copy: Transform an object into HTML and copy it for export

Description

This function transforms its argument to HTML and then copy it to the clipboard or to a file for later use in an external application.

Usage

copy(obj, ...)

## S3 method for class 'default': copy(obj, append = FALSE, file = FALSE, filename = "temp.html", clipboard.size = 4096, ...)

## S3 method for class 'proptab': copy(obj, percent = NULL, digits = NULL, justify = "right", ...)

Arguments

obj
object to be copied
...
arguments passed to R2HTML::HTML
append
if TRUE, append to the file instead of replacing it
file
if TRUE, export to a file instead of the clipboard
filename
name of the file to export to
clipboard.size
under Windows, size of the clipboard in kB
percent
whether to add a percent sign in each cell
digits
number of digits to display
justify
justification

Value

  • NULL

    NULL

Details

Under linux, this function requires that xclip is installed on the system to copy to the clipboard.

See Also

HTML, format.proptab

copy, format.proptab

Examples

Run this code
data(iris)
tab <- table(cut(iris$Sepal.Length,8),cut(iris$Sepal.Width,4))
copie(tab)
ptab <- rprop(tab, percent=TRUE)
copy(ptab)

Run the code above in your browser using DataLab