[R] evil attributes

Therneau, Terry M., Ph.D. therne@u @end|ng |rom m@yo@edu
Sat Apr 10 16:12:10 CEST 2021


I wrote: "I confess to being puzzled WHY the R core has decided on this definition..."
After just a little more thought let me answer my own question.

a. The as.vector() function is designed to strip off everything extraneous and leave just 
the core.   (I have a mental image of Jack Webb saying "Just the facts ma'am").   I myself 
use it freqently in the test suite for survival, in cases where I'm checking the corrent 
numeric result and don't care about any attached names.

  b. is.vector(x) essentially answers the question "does x look like a result of as.vector?"

Nevertheless I understand Roger's confusion.

-- 
Terry M Therneau, PhD
Department of Quantitative Health Sciences
Mayo Clinic
therneau using mayo.edu

"TERR-ree THUR-noh"


	[[alternative HTML version deleted]]



More information about the R-help mailing list