awooditc
2013-Feb-21 05:53 UTC
[R] error with bbox for k12hat (splancs) bivarite k-function
Hello, I am trying to conduct a bi-variate ripley's k using the k12hat function in the splancs package (found here http://rss.acs.unt.edu/Rdoc/library/splancs/html/k12hat.html). Although, I receive an error when getting to the bboxx part of the code: poly <- list(x=c(fire4$X, nar4$X), y=c(fire4$Y, nar4$Y)) plot(seq(5,80,5), sqrt(k12hat(fire4), as.points(nar4), bboxx(bbox(as.points(okpoly))), seq(5,80,5))/pi) - seq(5,80,5), xlab="distance", Error: unexpected ',' in "bboxx(bbox(as.points(poly)))," What am I doing wrong? Any help would be greatly appreciated. Thanks! - Elise -- View this message in context: http://r.789695.n4.nabble.com/error-with-bbox-for-k12hat-splancs-bivarite-k-function-tp4659233.html Sent from the R help mailing list archive at Nabble.com.
Jim Lemon
2013-Feb-21 07:14 UTC
[R] error with bbox for k12hat (splancs) bivarite k-function
On 02/21/2013 04:53 PM, awooditc wrote:> Hello, > > I am trying to conduct a bi-variate ripley's k using the k12hat function in > the splancs package (found here > http://rss.acs.unt.edu/Rdoc/library/splancs/html/k12hat.html). Although, I > receive an error when getting to the bboxx part of the code: > > poly<- list(x=c(fire4$X, nar4$X), y=c(fire4$Y, nar4$Y)) > plot(seq(5,80,5), sqrt(k12hat(fire4), as.points(nar4), > bboxx(bbox(as.points(okpoly))), seq(5,80,5))/pi) - seq(5,80,5), > xlab="distance", > > Error: unexpected ',' in "bboxx(bbox(as.points(poly)))," > > What am I doing wrong? Any help would be greatly appreciated. >Hi Elise, I think it's the extra right parenthesis after "okpoly". Jim
awooditc
2013-Feb-21 14:23 UTC
[R] error with bbox for k12hat (splancs) bivarite k-function
I have tried removing a parenthesis to the right of poly and I get this error: Error in bboxx(bbox(as.points(poly)), nsim = 29, s = seq(5, 80, 5)) : unused argument(s) (nsim = 29, s = seq(5, 80, 5)) It looks like you have one comma for poly, one for as.points, and one for bbox. The original error was due to the first comma... The code itself was from the example() function, so I am not sure why it won't run. -- View this message in context: http://r.789695.n4.nabble.com/error-with-bbox-for-k12hat-splancs-bivarite-k-function-tp4659233p4659269.html Sent from the R help mailing list archive at Nabble.com.