[R] Source code of Strauss Process

Rolf Turner r.turner at auckland.ac.nz
Thu Sep 18 00:30:39 CEST 2008


On 18/09/2008, at 9:50 AM, <kelly at inaoep.mx> wrote:

> Dear all,
>
> I want to simulate a Strauss Hard Core process in 3D. I have found  
> that
> someone else tried to do the same and he recived this answer,
>
> "If you need this immediately, I suggest you follow Brian Ripley's  
> advice.
> This probably involves downloading a source tar file of the R package
> and finding the Fortran code in library/spatial/src/. The Fortran  
> should be
> edited to generate 3D patterns (it's not hard: everywhere you see  
> 'x' and 'y'
> just include 'z'). Then also edit the R interface to the Fortran."
>
> But I can not find the folder library/spatial/scr.

	It helps to spell things correctly --- its ``src'' not ``scr''.
	But that's probably not the real problem.  For one thing there's
	no such directory.  It's more deeply buried.

> Can anyone help me with this?

Well, I don't really like your chances ... unless you're really a dab  
hand
at programming.  Given that you can't even find the code, this seems  
unlikely!

It's all pretty obscure, anyhow.  Also it's ***C*** code, and not
Fortran code.  Dunno whether that's good news or bad news to you.

	* First download the source tar file of the R package (currently
	R-2.7.2.tar.gz.

	* Make a directory to unpack it in --- so that you don't mess up
	your login directory :-) --- and unpack it:

		tar xfz R-2.7.2.gar.gx

	* Then go to the right place:

		cd R-2.7.2/src/library/Recommended/VR

	* Unpack the VR bundle:

		tar xfz VR_7.2-44.tar.gz

	* Then go to the next right place:

		cd VR/spatial

	* If you look into the R source (in the directory ``R'') you'll find
	that the Strauss function is defined in terms of C functions called
	VR_pdata and VR_simpat.

	You'll find code for these in the src directory (in pps.c).

Good luck!!!

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-help mailing list