[ESS] hanging emacs/ess with examples from sem package
pauljohn32 at gmail.com
Tue Jun 15 23:13:41 CEST 2010
Hi! I wonder if you would not mind testing this to see if it hangs
your session too.
The "sem" package (by John Fox) has a function sem and it has examples
marked "not run". I have trouble running the examples because they
rely on user interaction in an unusual way.
The examples use some functions that will accept line-by-line user
input. His function "read.moments ()" causes the R session to prompt
the user like this
and it continues until you hit enter on a blank line. To enter
line-by-line values is boring.
I bugged John because I wanted to run an example without interacting,
and he couldn't understand what was not working. He said he can just
highlight a block of code and paste it into R and it runs. I said
"huh?" and I found he is correct for R running in an ordinary
But in Emacs/ESS, it doesn't work!
in the sem example, it is written like so:
R.DHP <- read.moments(diag=FALSE, names=c("ROccAsp", "REdAsp", "FOccAsp",
"FEdAsp", "RParAsp", "RIQ", "RSES", "FSES",
.4216 .3275 .6404
.2137 .2742 .1124 .0839
.4105 .4043 .2903 .2598 .1839
.3240 .4047 .3054 .2786 .0489 .2220
.2930 .2407 .4105 .3607 .0186 .1861 .2707
.2995 .2863 .5191 .5007 .0782 .3355 .2302 .2950
.0760 .0702 .2784 .1988 .1147 .1021 .0931 -.0438 .2087
If in Emacs/ESS 5.10, I highlight that whole block and paste it at the
R prompt in the R session buffer, I cause Emacs to hang with a
spinning cursor. Same happens if I highlight this block and try to
send the whole region with ESS tools.
I have found that i can use ESS to send those things one line at a
time, but the line-by-line data entry thing doesn't turn off when it
finishes. ESS does not send over the carriage return to terminate the
input phase. So it appears that, as far as I can see, Emacs/ESS
offers no way to non-interactively run the sem exercises.
If you would try this and let me know if it works for you, or diagnose
what's going on, I would sincerely appreciate it.
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas
More information about the ESS-help