79565614

Date: 2025-04-10 02:13:54
Score: 1
Natty:
Report link

Thanks for alerting me to this @IFTRM from Honduras. What was going wrong was that the code in Harrell's book uses the princomp() function from the stats package, *not* the princmp() function from the Hmisc package; strange given that the author of the book also created the Hmisc package. In any case, simple changing `princomp()` to `princmp()` meant that the downstream plot() function now allows the k= argument.

So

plot(prin.raw, 
     type= 'lines', 
     main= ' ', 
     k=13,
     ylim=c(0,3))

which now results in what I want.

enter image description here

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @IFTRM
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: llewmills