[R] Example in " Applied Spatial Analysis with R"	giving error
    Ben Bolker 
    bbolker at gmail.com
       
    Sun Jan  2 03:25:16 CET 2011
    
    
  
markdx <mrkdennehy <at> gmail.com> writes:
> 
> 
> Example from page 29, Chapter 2.3 from "Applied Spatial Analysis with R"
> 
> I am new to R...just trying to replicate the example from the book.
> 
> > m <- matrix(c(0,0,1,1), ncol = 2, dimnames = list(NULL, + c ("min",
> > "max")))
> Error in +c("min", "max") : invalid argument to unary operator
  Omit the "+", which is a 'continuation character' indicating
that the command in the book was carried over onto a new line.
In general line breaks at 'sensible' places are fine:
m <- matrix(c(0,0,1,1), ncol = 2, dimnames = list(NULL,
   c ("min", "max")))
    
    
More information about the R-help
mailing list