Re: [R] [EXTERNAL] Re: unexpected 'else' in " else" (Ebert, Timothy Aaron)

2022-10-25 Thread Jorgen Harmse via R-help
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

Re: [R] [EXTERNAL] Re: unexpected 'else' in " else" (Ebert, Timothy Aaron)

2022-10-24 Thread Jorgen Harmse via R-help
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