[R] Segmentation error
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Apr 7 23:09:57 CEST 2003
SuzieBlatt at netscape.net (Suzanne E. Blatt) writes:
> I'm using library(spatstat) and trying to use ppp on my dataset. I
> get a segmentation error when I try to run it. Any suggestions? Code
> below ...
Since you're not showing the data, it is difficult to reproduce your
problem, so you're stuck with debugging it yourself. If you're on
Linux, you can run R under the debugger by starting it with "R -d gdb"
(and then just say "run" to get started). On Windows, it gets harder
and you might find that your time is better spent devising suitable
test data that others could use (please don't send huge data sets in
email!). Also, first check that you have up-to-date versions of R,
spatstat and the packages it requires.
BTW, why aren't you using read.csv to read a CSV file??
> dat <- read.delim(file="trees_R2.csv", sep=",", header=1)
>
> P16 <- (dat$Plot == "P1") | (dat$Plot == "P2") | (dat$Plot == "P3")
> y94 <- dat$Easting[P16]
> x94 <- dat$Northing[P16]
>
> library(spatstat)
> F194 <- ppp(x94, y94, c(0, 100), c(0, 50))
> a <- allstats(F194, dataname="Field 1 - 1994")
> plot(a)
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list