if (FALSE) {
# Example: tea (FactoMineR)
if (requireNamespace("FactoMineR", quietly = TRUE)) {
data(tea, package = "FactoMineR")
res_mca <- FactoMineR::MCA(tea, quanti.sup = 19, quali.sup = 20:36, graph = FALSE)
intro <- "A survey on tea consumption practices and contexts was summarized by MCA."
intro <- gsub("\n", " ", intro); intro <- gsub("\\s+", " ", intro)
# Applied audience
prompt <- trainer_MCA(res_mca,
dimension = 1,
proba = 0.01,
introduction = intro,
audience = "applied",
generate = FALSE)
cat(prompt)
res <- gemini_generate(prompt, compile_to = "html")
}
}
Run the code above in your browser using DataLab