Re: [R-sig-eco] Any R based GIS package to extract layer associations revisited

2019-02-20 Thread Tim Clark
I have grown to prefer the sf package, I've found it to be much cleaner and straightforward than working with sp. You can use sf::st_intersection and convert the resulting sf layer to a data frame. On Wed, Feb 20, 2019, 07:30 Torsten Hauffe wrote: > Hi Bruce, > > Sounds like that you are

Re: [R-sig-eco] Any R based GIS package to extract layer associations revisited

2019-02-20 Thread Torsten Hauffe
Hi Bruce, Sounds like that you are looking for sp:::over(). HTH, Torsten On Wed, 20 Feb 2019 at 16:20, Bruce Miller wrote: > Hi all, > Back in January I inquired about R packages to extract associations of > spatial layers. > The one reply related to raster data. > > The shape file layers I

[R-sig-eco] Any R based GIS package to extract layer associations revisited

2019-02-20 Thread Bruce Miller
Hi all, Back in January I inquired about R packages to extract associations of spatial layers. The one reply related to raster data. The shape file layers I am working with are vector layers. I need to revisit this to see what I can do. I have species distribution layers (Vector shape files)

Re: [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 >

Re: [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

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

2019-02-20 Thread Henrik Eckermann
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 you wanna draw. best, Henrik > On 20. Feb 2019, at 12:20, Lara Silva wrote: > >

[R-sig-eco] 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)