subset.mob_in | R Documentation |
This function subsets the rows of comm, env, and spat attributes of the mob_in object
## S3 method for class 'mob_in'
subset(x, subset, type = "string", drop_levels = FALSE, ...)
x |
an object of class mob_in created by |
subset |
expression indicating elements or rows to keep: missing values are taken as false. |
type |
specifies the type of object the argument |
drop_levels |
Boolean if TRUE unused levels are removed from factors in mob_in$env |
... |
parameters passed to other functions |
data(inv_comm)
data(inv_plot_attr)
inv_mob_in = make_mob_in(inv_comm, inv_plot_attr, coord_names = c('x', 'y'))
subset(inv_mob_in, group == 'invaded')
subset(inv_mob_in, 1:4, type='integer')
subset(inv_mob_in, 1:4, type='integer', drop_levels=TRUE)
sub_log = c(TRUE, FALSE, TRUE, rep(FALSE, nrow(inv_mob_in$comm) - 3))
subset(inv_mob_in, sub_log, type='logical')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.