Skip to content

Segmentation error

2 messages · Suzanne E. Blatt, Peter Dalgaard

#
Hello,

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 ...

Thanks,
Suzanne
---------------------------------------
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)
#
SuzieBlatt at netscape.net (Suzanne E. Blatt) writes:
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??