Good catch! I also misread it, and I think most people would. If I wanted to
write confusing documentation then I could play similar games with 'mode' and
'length'.
Regards,
Jorgen Harmse.
> test <- c(TRUE,FALSE,FALSE)
> attr(test,'class') <- 'foo' # probably a bad idea, but I want to see wh
I agree that the documentation should be clarified. Moreover, my last example
shows that the class can be different even when no mode coercion is required. I
don't know enough about S3 & S4 to comment on your last point.
Regards,
Jorgen Harmse.
From: Bert Gunter
Date: Monday, 24October, 2022
2 matches
Mail list logo