is.data.frame(df) is not true

Could someone pls help explain why this code is giving this error message.

is.data.frame(df) is not true

cormatrix<- cor(mtcars)
corrft = flextable(round(cormatrix, 3) %>% rownames_to_column(“column name”))

I changed it to this, and is good.

corrFT = flextable(as.data.frame(round(cormatrix, 3), add.rownames = True))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.