@Leah: this morning I had also problems with getting MFA to produce 'some results'. I had to include the row.names statement to get it working again. (No idea why this was not necessary yesterday).
I include:
- the full code that I ran in a fresh R session
- the setup for the groups (the last group with
habitat did not fit the page). I worked with all the defaults so also no changes in 'other MFA parameters'
- the panel with the results when I clicked on 'validate the groups'
- the generated MFA code that I got by clicking on 'Get the MFA code'
As I said before: I can not say anything about the value of the MFA results. No experience with that.
wetlands=structure(list(Wet_Dom = c(1L, 0L, 0L, 1L, 0L, 1L, 1L, 0L, 0L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L), Hydric_Soil = c(0L,
0L, 0L, 1L, 0L, 1L, 0L, 0L, NA, 1L, 1L, 1L, 1L, 1L, 0L, 1L, NA,
1L, 1L, 1L, 1L), GW_Recharge = c(1L, NA, NA, 1L, NA, 1L, 0L,
1L, NA, 1L, 0L, 0L, 1L, 1L, 0L, 0L, NA, 1L, 0L, 0L, 0L), Flood_Alt = c(1L,
NA, NA, 1L, NA, 1L, 0L, 1L, NA, 1L, 1L, 0L, 0L, 0L, 0L, 1L, NA,
1L, 1L, 1L, 1L), Sed_Retention = c(1L, NA, NA, 1L, NA, 1L, 0L,
0L, NA, 0L, 1L, 1L, 1L, 1L, 1L, 0L, NA, 0L, 0L, 0L, 0L), Nutrient_Rem = c(0L,
NA, NA, 1L, NA, 1L, 0L, 1L, NA, 1L, 1L, 1L, 1L, 1L, 1L, 0L, NA,
1L, 1L, 1L, 1L), Habitat = c(0L, NA, NA, 1L, NA, 1L, 0L, 0L,
NA, 1L, 1L, 1L, 1L, 1L, 1L, 1L, NA, 1L, 1L, 1L, 1L), Actual_Size.m2. = c(148.68,
0, 0, 273.45, 0, 1184.94, 40.6, 187.2, 0, 541.3, 1060.6, 36.33,
363.8, 276.06, 423.64, 969.63, 0, 148.65, 92.9, 269.42, 32.52
), Complete... = c(100.15, 0, 0, 101.5, 0, 121.47, 24.28, 45,
0, 97, 74, 33, 51, 99.8, 92, 70, 0, 100, 100, 100, 100)),
class = "data.frame", row.names = c("Progress",
"Hickory", "MitA", "MitB", "MitC", "MitD", "MitEF", "1", "2",
"3", "4", "5", "6", "7", "8", "9", "10", "11_A", "11_B", "11_C",
"12"))
library(Factoshiny)
library(dplyr)
wetlands2 = wetlands %>%
mutate(across(Wet_Dom:Habitat,as.character))
row.names(wetlands2) = row.names(wetlands) # NEW !
res.shiny <- MFAshiny(wetlands2)
newDF <- wetlands2[,c("Wet_Dom","Hydric_Soil","GW_Recharge","Flood_Alt","Sed_Retention","Nutrient_Rem","Habitat")]
res.MFA<-MFA(newDF,group=c(1,1,1,1,1,1,1), type=c("n","n","n","n","n","n","n"),name.group=c("Gr 1","Gr 2","Gr 3","Gr 4","Gr 5","Gr 6","Gr 7"),graph=FALSE)
plot.MFA(res.MFA, choix="ind",lab.par=FALSE,title="Individual factor map")
plot.MFA(res.MFA, choix="group")
plot.MFA(res.MFA, choix="axes",habillage='group')