[R] R ``literal'' comand

From: John Vokey <vokey_at_uleth.ca>
Date: Wed 14 Jun 2006 - 17:24:49 EST

I know I am luddite when it comes to list-based languages, such as R. But, even these beasts must occasionally want to access objects at a literal level. For example, to a naive twit like me, x<--print (y) should deposit in x a literal print out of y; that is, x should contain the *results* of applying the print method to y (e.g., something like a tab (or space)-delimited flat sheet). Sadly, no. It contains a copy of y. That is, x<--print(y) == x<--y. I spend more time fighting with all the list crapola (technical term for, uh, crapola) in each object than I ever manage successfully to use the object. To cut through the, uh, technical stuff, every now and again I would just like to get a simple flat object back with NO list baggage. Something like: z=literal(x), where literal() returns a flat spreadsheet-like structure with named columns and rows. Data.frame() comes close, but it always *interprets* the object first, which means it is usually quite different from what one saw with the simple print(y).

Yeah, I know, I will now get a flood of emails telling me to get with the program and to learn to love y[[1]] and S4 methods or some such, or, worse: why not just write the program myself? I agree. I am an ignorant twit. But, aside from saving (or copying from the screen: my current solution) the data to a text file to remove all the list, uh, stuff (and ignoring the no doubt great pleasure to be had by chiming in to agree with my exalted twittedness), what does one do?

--
Please avoid sending me Word or PowerPoint attachments.
See <http://www.gnu.org/philosophy/no-word-attachments.html>

-Dr. John R. Vokey

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Jun 14 17:27:54 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 14 Jun 2006 - 20:11:13 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.