[R-lang] fixing R for Linux bug
Lngmyers
lngmyers at ccu.edu.tw
Thu May 3 23:09:06 PDT 2007
This may not be the most exciting post to start R-lang off with, but I
think that some of the founders of the list are Linux users, and maybe
they can help me debug a project involving linguistics statistics in R.
(Warning: This post definitely belongs in the "advanced" category....)
Some of you may know about my MiniJudge project, a JavaScript (and soon
Java) based tool for designing, running, and analyzing simple syntactic
judgment experiments:
http://www.ccunix.ccu.edu.tw/~lngproc/MiniJudge.htm
Since the judgments are collected as traditional binary yes/no
judgments, the analysis involves generalized linear mixed effect
modeling (GLMM). GLMM is too complex for me to program in any ordinary
language (though I've got somebody working on this). So I use the
JavaScript to write R code.
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, and maybe also differences in how big the clipboard is for
pasting code into Linux R. Since I don't use Linux enough to be
comfortable in it, I was hoping somebody could help out by quickly
testing the MiniJudge R code and giving top-of-the-head advice.
To test, get the data file from here:
http://www.ccunix.ccu.edu.tw/~lngproc/demo.txt
Then go to here to generate the R code (entering "demo.txt", without
quotation marks of course, and clicking "OK"):
http://www.ccunix.ccu.edu.tw/~lngproc/MiniJudgeJS.htm#genRcode
Select the code from the text area and paste into R. Since it might be
too large for Linux R's clipboard, you can also try pasting in bits of
it at a time. I think it all works except for the line breaks thing. I
wrote this before I learned about the "@coefs" trick for extracting the
coefficients matrix in lmer outputs, so to find the coefficients in the
lmer output I first "sink" it into a file, then read it back in as a
character string and search for it! Kind of stupid, but I need to save
the analysis output anyway. Still, I'm not sure that this sink-and-read
procedure is the crucial problem...?
If all works well, the code should generate a text file called
"demo_analysis.txt", which looks like this:
http://www.ccunix.ccu.edu.tw/~lngproc/MJInfo.htm#resultshelp
--
James Myers
Graduate Institute of Linguistics
National Chung Cheng University
Taiwan
More information about the R-lang
mailing list