[R-lang] fixing R for Linux bug
David Reitter
dreitter at inf.ed.ac.uk
Fri May 4 00:19:30 PDT 2007
Hi James,
first of all, it might be more straightforward to implement this with
a server-based solution - even a simple CGI would be able to write
the results of the experiment to a file and store any other
persistent data, and then call R. (The other advantage would be that
you wouldn't have to use JavaScript.) But on the other hand, your
solution might be more educational to the user, because they see what
they're doing.
> This R code works fine in Windows and Mac versions of R, but not in
> the
> Linux version, apparently due to differences in how line breaks are
> handled,
I noticed this:
> NL = "\r\n" # New line
in your code. Note that on Unix, a newline is just LF, so "\n" would
be what you want.
Does that solve your problem?
> and maybe also differences in how big the clipboard is for
> pasting code into Linux R.
That should be easy to diagnose -- do you copy&paste it into a
running R session in a terminal? Then you're at the mercy of the
terminal app that the user runs (and their browser)... So copy&paste
is kind of an awkward solution - could your Javascript not offer a
link that'll save the code to a file (as a download)?
Hope that helps
- David
--
David Reitter
ICCS/HCRC, Informatics, University of Edinburgh
http://www.david-reitter.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2450 bytes
Desc: not available
Url : https://ling.ucsd.edu/pipermail/r-lang/attachments/20070504/29f839a8/attachment.bin
More information about the R-lang
mailing list