0

I came across this piece of code

...
temp <- as.data.frame(aggregate(Petal.Width~Species, iris, mean))
...

My question is: aggregate(Petal.Width~Species, iris, mean) was already a dataframe, what was the need for as.data.frame() then?

Nemo
  • 1,124
  • 2
  • 16
  • 39

0 Answers0