HFactory | R Documentation |
Give HFactory
an object or a name of an object
that has a names
attribute
(Or a function that *returns* a named object).
HFactory
will build you an easy-to-use function
that encapsulates searching the "header" of
the object.
HFactory(name, ignore.case = TRUE)
name |
the object or name of the object |
ignore.case |
do you want your header search function to ignore case? |
a function that takes one argument: pattern
.
Give the return value a name, and you can call it like any other function.
It will use grep
and pattern
to find matching names
.
The header-search function that is returned will catch name changes, too.
my_iris <- datasets::iris
hi <- HFactory(my_iris)
hi('length')
hi('width')
my_iris$SpeciesPredicted <- 'TODO'
hi('species')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.