Working with Point Pattern objects

I have a marked point pattern RDS object that contains information on the location of 5 different species of algae. I want to be able to create 5 new objects, each containing just the data for an individual species, not all five. The different species are stored under "marks" as a factor with 5 levels, one for each species.

I've tried:

algae_sp1 <- algae$marks == "species1"

But when I plot that object I don't get points. I'm really new to using spatial data in R. Thanks for the help.

I solved the issue using the function 'r split()' !

the typical approach to your problem would be via dplyr::filter() e.g.


algae_sp1 <- algae %>%
  filter(marks == "species1")

but I am glad you did find a solution that works for your use case...

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.