On 01/22/2014 10:03 PM, katerina stavrianaki wrote:
Hello,
My name is Katerina, i am new to R and i am working with the ETAS package.
My goal is to fit the spatiotemporal etas model to an aftershock sequence ( 
atach file example.csv).I have installed the packages: spatstat, SAPP and ETAS. 
By reading the ETAS package manual i saw the data must be in class ppx.
Could you please help me on how to convert my data (example.csv) into class ppx 
?
Thank you in advance,Katerina                                   

Hi Katerina,
Your example data didn't make it through to the list, but it seems that what you want to do is to read that file into a data frame (see read.csv) and then pass that data frame to the ppx function in spatstat. Read the help page for ppx to see how this is done, I think that all you need is the data frame and a vector of data types in the "ccord.type" argument. It looks like you should only pass those columns of the data frame that are spatial, temporal or local coordinates, and marks, so make sure that you know how to specify a subset of columns (e.g. df[,c(2,4,5,6)]) if you have other information in the data frame.

Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to