Hi can you please tell me how to quit R script & return to R prompt. As i tried following but still cannot able to return on to R prompt.. R> barplot(Forbes2000$profits) R> barplot(xtab(`profits,data=Forbes2000)) + barplot(xtab(~profits,data=Forbes2000)) + ) + Q() + ?barplots + + + + + barplot? + ? + ?? + ???? + stop() + exit() + + + ctrl+c + q() + I'm beginner in R & trying to learn.... Thanks & Regards Amitesh -- View this message in context: http://r.789695.n4.nabble.com/How-to-quit-R-script-return-to-R-prompt-tp4647376.html Sent from the R help mailing list archive at Nabble.com.
How to quit R script & return to R prompt
4 messages · amiteshtiwari18, Bart Joosen, S Ellison +1 more
you can see it goes wrong at:
barplot(xtab(`profits,data=Forbes2000))
You typed a ` without closing it: barplot(xtab(`profits`,data=Forbes2000)) anyway: pushing the escape button should also return you to the R-prompt (at least on a Windows platform) -- View this message in context: http://r.789695.n4.nabble.com/How-to-quit-R-script-return-to-R-prompt-tp4647376p4647382.html Sent from the R help mailing list archive at Nabble.com.
You typed a ` without closing it: barplot(xtab(`profits`,data=Forbes2000)) anyway: pushing the escape button should also return you to the R-prompt (at least on a Windows platform)
But why is the OP using a backtick at all? It's not necessary in this instance (and in fact it's very rarely necessary at all unless you have used a syntactically invalid name with something silly like spaces in it). See ?Quotes for a little more detail on what ` does. Also, xtab should possibly be xtabs, and the first argument to that is a one-sided formula, not a vector:
library(HSAUR) barplot(xtabs( ~ profits,data=Forbes2000))
should work fine.
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
On Oct 25, 2012, at 6:00 AM, S Ellison wrote:
You typed a ` without closing it: barplot(xtab(`profits`,data=Forbes2000)) anyway: pushing the escape button should also return you to the R-prompt (at least on a Windows platform)
Also on Macs.
But why is the OP using a backtick at all?
There was suggestive evidence in the rest of his post that his shift key is wonky and he did mean to type a tilde.
It's not necessary in this instance (and in fact it's very rarely necessary at all unless you have used a syntactically invalid name with something silly like spaces in it). See ?Quotes for a little more detail on what ` does. Also, xtab should possibly be xtabs, and the first argument to that is a one-sided formula, not a vector:
library(HSAUR) barplot(xtabs( ~ profits,data=Forbes2000))
Actually any unmatched single or double quote would have the same effect. Similar conundrums occur when Turing machines of any sort are reading input data where unmatched quotes result in huge missing gaps as line after line of perfectly useful data gets gathered up into one ungodly large single character element. (The human brain is thus demonstrated not to be a Turing machine.)
should work fine.
David Winsemius, MD Alameda, CA, USA