emend_lvl_unique | R Documentation |
The returned value is a vector. The LLM will return full names instead of abbreviations. You can use this functions to clean up your categorical data and obtain unique levels. Double check if the output from LLM is true to your data. This function is generally suitable for categories, not working well with sentences and too many categories.
emend_lvl_unique(.f, chat = get_default_chat())
.f |
A vector of characters or a factor. |
chat |
A chat object defined by ellmer. |
A character vector of standardised category names.
options(ellmer_timeout_s = 3600)
chat <- ellmer::chat_ollama(model = "llama3.1:8b", seed = 0, echo = "none")
emend_lvl_unique(messy$country, chat = chat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.