View source: R/dsmartr_helpers.R
n_things | R Documentation |
Returns cell values from selected columns in an attribute table as an atomic vector, with NA values excluded.
n_things(input = NULL, selector = NULL)
input |
One row of a data frame, as vector |
selector |
String; a column name or name stub. |
An atomic vector of non-NA values in the selected columns, by order of occurrence.
This is a helper function and not widely applicable. It is expected to be used by-row on wide-formatted spatial attribute data.
## Not run:
load('heronvale_soilmap')
sm <- sf::st_set_geometry(heronvale_soilmap, NULL)
percs_1 <- n_things(sm[1, ], 'PERC')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.