Skip to content
Back to formatted view

Raw Message

Message-ID: <A4E5A0B016B8CB41A485FC629B633CED4A0CB461DB@GOLD.corp.lgc-group.com>
Date: 2012-10-25T13:00:01Z
From: S Ellison
Subject: How to quit R script & return to R prompt
In-Reply-To: <1351156045194-4647382.post@n4.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}}