n_things: get items

View source: R/dsmartr_helpers.R

n_thingsR Documentation

get items

Description

Returns cell values from selected columns in an attribute table as an atomic vector, with NA values excluded.

Usage

n_things(input = NULL, selector = NULL)

Arguments

input

One row of a data frame, as vector

selector

String; a column name or name stub.

Value

An atomic vector of non-NA values in the selected columns, by order of occurrence.

Note

This is a helper function and not widely applicable. It is expected to be used by-row on wide-formatted spatial attribute data.

Examples

## Not run: 
load('heronvale_soilmap')
sm <- sf::st_set_geometry(heronvale_soilmap, NULL)
percs_1 <- n_things(sm[1, ], 'PERC')

## End(Not run)

obrl-soil/dsmartr documentation built on Feb. 1, 2024, 10:57 p.m.