emend_fct_match {emend} | R Documentation |
Match input factor to specified levels.
Description
Match input factor to specified levels.
Usage
emend_fct_match(.f, levels = NULL, chat = get_default_chat())
Arguments
.f |
A factor. |
levels |
The levels of the factor |
chat |
A chat object defined by ellmer. |
Value
A factor with levels matching the provided levels
argument.
Examples
chat <- ellmer::chat_ollama(model = "llama3.1:8b", seed = 0, echo = "none")
emend_fct_match(messy$country, levels = c("UK", "USA", "Canada", "Australia", "NZ"), chat = chat)
[Package emend version 0.1.0 Index]