[R] Basic misunderstanding, or problem with my installation?
parkhurs at imap.iu.edu
Wed Jan 1 05:36:13 CET 2014
Thanks to the three people who saw what I missed. I typed my
code in Libre Office as "<" followed by "-", and that program
converted those two characters into a single left arrow symbol.
I copied the commands from Libre into R without noticing that
that had happened. Wierd.
On 12/31/2013 7:54 PM, Sarah Goslee wrote:
> Hi David,
> Your code is showing up here with an arrow symbols. If it's an actual
> cut and paste, that's your problem: assignment in R is the two-character
> <- and not an arrow symbol.Â
> Otherwise your code looks fine.
> On Tuesday, December 31, 2013, David Parkhurst wrote:
> I've just uninstalled and then reinstalled R on my windows 7 machine.
> To test my understanding of data frames, I'm trying the following code.
> (I plan to do other things with it, if it would only work.)
> Here's the code, which seems pretty basic to me:
> nums â c(1,2,3,4,5)
> ltrs â c(âaâ,âbâ,âcâ,âdâ,âeâ)
> df1 â data.frame(nums,ltrs)
> Here's what happens when I try to run it:
> > ls()
> > nums â c(1,2,3,4,5)
> Error: unexpected input in "nums \"
> > ltrs â c(âaâ,âbâ,âcâ,âdâ,âeâ)
> Error: unexpected input in "ltrs \"
> > df1 â data.frame(nums,ltrs)
> Error: unexpected input in "df1 \"
> Am I really misunderstanding the basics, or is there something
> wrong with my installation?
> R-help at r-project.orgÂ mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
> Sarah Goslee
More information about the R-help