[R-sig-Geo] Problem in generate random samples in r

2019-02-20 Thread Lara Silva
Hello, I am trying to generate random samples from the following code ### Setting random seed to always create the same ### Random set of points set.seed(0) absences_15000<-absences[sample(nrow(absences), 15000),] points(absences_15000, cex=0.1) ## Subsample_1 set.seed(0) absences_1<-a

Re: [R-sig-Geo] [R-sig-eco] Problem in generate random samples in r

2019-02-20 Thread Lara Silva
Thanks! Lara Henrik Eckermann escreveu no dia quarta, 20/02/2019 à(s) 10:25: > Hi Lara, > > the error is quite informative. You use the sample function twice. At > least for one the length of the vector where you sample from is shorter > (contains less values) than than the number of samples yo

Re: [R-sig-Geo] [R-sig-eco] Problem in generate random samples in r

2019-02-20 Thread Roman Luštrik
My guess would be that absences_15 doesn't have 1 rows. Can you confirm or refute this? Cheers, Roman On Wed, Feb 20, 2019 at 12:20 PM Lara Silva wrote: > Hello, > > I am trying to generate random samples from the following code > > ### Setting random seed to always create the same > ##

[R-sig-Geo] Reverse color in stplot

2019-02-20 Thread Mahsa Sameti
Dear all I want to reverse color in my spatio-temporal maps that are created with stplot function. How can i solve this problem? Thanks alot Mahsa Sameti [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org h

Re: [R-sig-Geo] Reverse color in stplot

2019-02-20 Thread Edzer Pebesma
I think that it accepts an argument col.regions where you specify a color palette; if you have a particular one, called pal, and want to revert it, use rev(pal). On 2/21/19 7:02 AM, Mahsa Sameti wrote: > Dear all > > I want to reverse color in my spatio-temporal maps that are created with > stplo