emend_fct_match: Match input factor to specified levels.

View source: R/factor.R

emend_fct_matchR 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)



emend documentation built on April 4, 2025, 2:38 a.m.