2

I am trying to classify if each class in the Iris dataset is multivariate normal or not. I am using the MVN package in R and have generate the following:

library(MVN) 
attach(iris)
Mar<-MVN::mvn(data=iris,subset="Species", mvnTest="mardia")
Mar$multivariateNormality

How can I get the output in a readable table in R?

daisybeats
  • 217
  • 1
  • 6

1 Answers1

2

Your question isn't entirely clear, but if I understood you correctly, this line of code might work.

table <- rbind(Mar$multivariateNormality$setosa[1:2, ],Mar$multivariateNormality$versicolor[1:2, ],Mar$multivariateNormality$virginica[1:2, ])

Is this what you meant by "getting the output in a readable table?" Obs: I'll edit or delete my answer if that's not what you're trying to do.

Werner Hertzog
  • 2,002
  • 3
  • 24
  • 36
  • Thank you, that is what I was after. Apologies for not making it clear. How do I round round the figures to 2 decimal places? Also, is it possible to include the name of the species in the table? – daisybeats Sep 14 '20 at 03:20