if (FALSE) {
# Processing time is often longer than ten seconds
# because the function uses a large language model.
library(NaileR)
data(beard_wide)
intro_beard <- "As a barber, you make
recommendations based on consumers comments.
Examples of consumers descriptions of beards
are as follows."
intro_beard <- gsub('\n', ' ', intro_beard) |>
stringr::str_squish()
res <- nail_sort(beard_wide[,1:5], name_size = 3,
stimulus_id = "beard", introduction = intro_beard,
measure = 'the description was', generate = TRUE)
res$dta_sort
cat(res$prompt_llm[[1]])
}
Run the code above in your browser using DataLab