[R-sig-Geo] Grid type of sampling in geodata

Paulo Justiniano Ribeiro Jr paulojus at c3sl.ufpr.br
Wed Nov 13 13:15:32 CET 2013


So... you can convert from grf() output to a sp class before using 
spsample

## simulating 100 pts using geoR at an irregular grid of points
sim1 <- grf(100, cov.pars=c(1, 0.2))
sim1.sp <- as.data.frame(sim1)
class(sim1.sp) <- "data.frame"
coordinates(sim1.sp) <- ~x+y
class(sim1.sp)


## simulating 100 pts using geoR at an irregular grid of points
sim2 <- grf(121, frid="reg", cov.pars=c(1, 0.2))
sim2.sp <- as.data.frame(sim2)
class(sim2.sp) <- "data.frame"
coordinates(sim2.sp) <- ~x+y
class(sim2.sp)
gridded(sim2.sp) <- TRUE
class(sim2.sp)



Paulo Justiniano Ribeiro Jr
LEG (Laboratorio de Estatistica e Geoinformacao)
Universidade Federal do Parana
Caixa Postal 19.081
CEP 81.531-990
Curitiba, PR  -  Brasil
Tel: (+55) 41 3361 3573
VOIP: (+55) (41) (3361 3600) 1053 1066
Fax: (+55) 41 3361 3141
e-mail: paulojus AT  ufpr  br
http://www.leg.ufpr.br/~paulojus

On Wed, 13 Nov 2013, Alaios wrote:

> Hi,
> thanksf or the answer.
> I am using the? library(geoR)
> and the grf to make map realizations... Thanks also for your suggestion. Currently looks like that the spsample can not work on geodata type of data...
>
> I will have one more round later this evening. I hope better luck by then
>
> Regards
> A
>
>
>
>
> On Wednesday, November 13, 2013 12:22 PM, Edzer Pebesma <edzer.pebesma at uni-muenster.de> wrote:
>
> You may want to look at sp::spsample, which can sample along lines,
> using different strategies.
>
> Please mention the packages where you found the functions you used.
>
>
> On 11/13/2013 11:36 AM, Alaios wrote:
>> Hi all,
>> I have spatial field created with grf and I was wondering if I can sample in lines, something that can resemble sampling outdoors at the streets.
>> Random sampling looks to far of what I want to have.
>>
>> there is in geodata package the sample.geodata but this looks like to be random samples.
>>
>> I would like to thank you in advance for your help
>>
>> Regards
>> A.
>> ??? [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
> -- 
> Edzer Pebesma
> Institute for Geoinformatics (ifgi), University of M?nster
> Heisenbergstra?e 2, 48149 M?nster, Germany. Phone: +49 251
> 83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 	[[alternative HTML version deleted]]
>
>



More information about the R-sig-Geo mailing list