# NOT RUN {
x <- list(
urban = list(
cars = c('volvo', 'ford'),
food.dining = list(
local.business = c('carls'),
chain.business = c('dennys', 'panera')
)
),
rural = list(
land.use = list(
farming =list(
dairy = c('cows'),
vegie.plan = c('carrots')
)
),
social.rec = list(
community.center = c('town.square')
),
people.type = c('good', 'bad', 'in.between')
),
other.locales = c('suburban'),
missing = list(
unknown = c(),
known = c()
),
end = c('wow')
)
x
flatten(x)
flatten(x, ' -> ')
# }
# NOT RUN {
## dictionary from quanteda
require(quanteda); library(textreadr); library(dplyr)
mydict <- https://provalisresearch.com/Download/LaverGarry.zip" %>%
textreadr::download(") %>%
unzip(exdir = tempdir()) %>%
`[`(1) %>%
quanteda::dictionary(file = .)
mydict
flatten(as.list(mydict))
# }
Run the code above in your browser using DataLab