Description Usage Arguments Details Value Examples
View source: R/spendingCategories.R
For each budget category check if in any pattern is a
match with the Description
.
Return the name of the category that matches.
1 | addCategories(Description, myCategories)
|
Description |
character vector |
myCategories |
list; each named element contains a character vector of all known patterns defining that category. |
If none of the categories contain a pattern that matches
then return MISSING
. A Description
is not allowed to
belong to multiple categories. The first instance of such
a problem will cause an error to be thrown with the first
Description
and all the categories it has been matched
with.
character vector
1 2 3 4 5 6 7 8 9 10 | Description <- c('rent 2019 march',
'Happy Co. gas 20190601',
'New restaurant')
myCategories <- list(housing = c('rent', 'Hardware Inc'),
transportation = 'gas')
addCategories(Description = Description, myCategories)
## Not run:
addCategories(Description = c("gas rent"), myCategories)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.