I have a data.frame "tab" with several columns, one of the colums is "DD", containing Integers.
I just would like to get a nice HTML-table with the summary output, just like the console output.
All I get is:
Error: $ operator is invalid for atomic vectors
The code is simple:
dd<-summary(tab$DD) dd["SD"] <- round(sd(tab$DD, na.rm = TRUE),2) # adding column "SD" and it's value for Standard Deviation "sd" print(dd) # the wanted console output #> print(dd) # Min. 1st Qu. Median Mean 3rd Qu. Max. SD NA's # 1.00 7.00 12.00 12.42 16.50 30.00 6.86 2 print(class(dd)) #results in: #> print(class(dd)) # "summaryDefault" "table" (What ever that might be) stargazer(dd, out = "StargazerTestDD.html") #results in: $ operator is invalid for atomic vectors
I have read dozends of posts regarding this error, but not was dealing with my problem.
Can somebody pls help me to recieve the print(dd)-console output as Html-file.
Many thanks in advance!!!