as.vectorpoints | R Documentation |
Will create empty columns for any missing columns expected in a vector.points data.frame. This function is particularly useful for use with packages like dplyr that strip objects of their classes.
as.vectorpoints(x)
x |
A data.frame |
## Not run:
library(dplyr)
Brazil_vec <- getVecOcc(country = "Brazil")
# Filter data.frame then readd vector points class so autoplot can be used.
Brazil_vec %>%
filter(sample_method1 == 'larval collection') %>%
as.vectorpoints %>%
autoplot
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.