Watts-College / cpp-525-spr-2022

https://watts-college.github.io/cpp-525-spr-2022/
0 stars 0 forks source link

Lab 1 - summary stats #4

Open ctmccull opened 2 years ago

ctmccull commented 2 years ago

Yes, I know. I figured out the whole lab, except for providing the summary statistics. Here is what I did and the error I'm getting. I also tried as.numeric, but to no avail. I also don't get anything when I just do summarize(pdata). Any advice?

#summary statistics
summarise(pdata$passengers)

Error in UseMethod("summarise") : no applicable method for 'summarise' applied to an object of class "c('double', 'numeric')"

Dselby86 commented 2 years ago

Try passing the data frame to stargazer

Also if you add the option results = asis to the code chunk then markdown will render the table to look nice.

so

# ```{r, results = "asis"}
stargazer(dat, type = "HTML")
#```