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
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
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)
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
>
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
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:
>
>
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)