DS4PS / cpp-523-fall-2020

http://ds4ps.org/cpp-523-fall-2020/
0 stars 3 forks source link

Issues with pairs plot/Lab 04 #12

Open sandralili opened 3 years ago

sandralili commented 3 years ago

I could not add the regression line to the pairs plot. This is my code:

pairs( dat[c("SWB","ND","PSS","CSE","RSE")], 
       lower.panel=panel.smooth, 
       upper.panel=panel.cor)

This is the mistake I had on the rmd file: Error in pairs.default(dat[c("SWB", "ND", "PSS", "CSE", "RSE")], lower.panel = panel.smooth, : object 'panel.cor' not found

I added the "library(Hmisc)" and did not work either. I did not have problems with the other pairs plots of former labs, I was wondering if I am missing something else.

Thanks!

lecy commented 3 years ago

You need to run the code at the top of the RMD file that loads the panel.cor() function.

sandralili commented 3 years ago

Thank you Professor Lecy!