DIR = getwd()
setwd(tempdir())
if(require(dplyr)){
TG <- ToothGrowth |> mutate(dose = as.factor(dose))
# Without interaction
TwoFactors('len','supp','dose',Data=TG, Inter=FALSE)
# With two-way interaction
TwoFactors('len', 'supp', 'dose', Data=TG, Inter=TRUE)
rm(TG); rm(TG)
# N.B. Various files and a folder were created in a temporary directory.
# Please investigate them to see how this function worked.
}
setwd(DIR)
Run the code above in your browser using DataLab