[Rd] Errors in demo (PR#10527)
ripley at stats.ox.ac.uk
ripley at stats.ox.ac.uk
Mon Dec 24 12:35:14 CET 2007
I have no idea what 'demo' this is. When I open R it says
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
and this is none of those. At a guess you meant
x <- 1:20
w <- 1 + sqrt(x)/2
dummy <- data.frame(x=x, y= x + rnorm(x)*w)
dummy
fm <- lm(y ~ x, data=dummy)
from the 'sample session' in 'An Introduction to R'. In which case, this
is your own typing error (- for ~, and we do put spaces in to make it
easier to read).
Please do read the R FAQ *before* 'blowing off' a false report.
On Mon, 24 Dec 2007, rcwright at texas.net wrote:
> Full_Name: richard wright
> Version: R version 2.6.1 (2007-11-26)
> OS: Mac OS X v 10.4.11
> Submission from: (NULL) (76.240.79.123)
>
>
> I downloaded the most recent version of R for the mac (About: GUI 1.22-devel
> (4859) (4859)) and installed it.
> After installation, I opened the help file and ran the demo. I am new to R,
> although I have over 25 years experience in SAS.
>
> Below is a part of the job I ran. I think I ran the code correctly, but I seem
> to be blowing off.
> And, I'm not sure it's related, but I also included what I got when I ran
> bug.report()
>
>> dummy <- data.frame(x=x, y =x+rnorm(x)*w)
>> dummy
> x y
> 1 1 1.425904
> 2 2 -1.083024
> 3 3 -1.976215
> 4 4 4.185795
> 5 5 8.598591
> 6 6 1.004177
> 7 7 5.357826
> 8 8 9.033184
> 9 9 6.455373
> 10 10 8.166066
> 11 11 12.383454
> 12 12 10.823910
> 13 13 14.410394
> 14 14 13.046184
> 15 15 15.912303
> 16 16 13.454527
> 17 17 15.827133
> 18 18 18.586979
> 19 19 10.845216
> 20 20 20.935347
>> fm <-lm(y-x,data=dummy)
> Error in switch(mode(x), "NULL" = structure(NULL, class = "formula"), :
> invalid formula
> In addition: Warning message:
> In y - x : longer object length is not a multiple of shorter object length
>> ls()
> [1] "dummy" "w" "x" "y"
>> bug.report()
> Error in bug.report() : 'subject' missing
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list