I\'m having trouble running a Friedman test over my data. I\'m trying to run a Friedman test using this command:
friedman.test(mean ~ isi | expId, data=monoS
I had this exact error too with my dataset.
It turns out that the function friedman.test()
accepts data frames (fx those created by data.frame()
) but not tibbles (those created by dplyr and other modern tools). The solution for me was to convert my dataset to a dataframe first.
D_fri <- D_all %>% dplyr::select(FrustrationEpisode, Condition, Participant)
D_fri <- as.data.frame(D_fri)
str(D_fri) # confirm the object should now be a 'data.frame'
friedman.test(FrustrationEpisode ~ Condition | Participant, D_fri)