[R] Requery: R 1.0.0 for Win95 and clipboard

zivan.karaman@limagrain.com zivan.karaman at limagrain.com
Thu Mar 23 14:21:42 CET 2000

The usual way of copying 2-dimensional arrays to and from the clipboard is to
separate columns by <Tab> character, and to separate lines by <Newline>
character (CR-LF under DOS/Windows).

Potential problems (at least the three I can see immediately): dimnames, factors
and NAs.

I would suggest that including dimnames should be optional.

I would assume that factors should be copied as.character(...) TO clipboard.
When pasting FROM the clipboard, it would be nice to have an option for leaving
the character vectors as text or transforming them into factors. (I often have
to do a lot of gymnastics to transform factors into character vectors in
dataframes with S+, and I really don't like it).

The NAs could be represented by empty cell, i.e. <Tab><Tab>, for both copy and

In S-PLUS 2000, one can copy and paste data from the data editor, but it seems
that the dimnames don't get copied.

In fact, I think that the clipboard operations should work like read.table and
write.table, except  that under R , 'file="clipboard" ' apparently uses an
internal clipboard, and not the standard Windows clipboard.

With S-PLUS 2000, if you say


you can paste the data into Excel.

You can also read data from Excel by


Best regards


r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list