[R] levels() deletes other attributes

2005-07-18 Thread Heinz Tuechler
Dear All, it seems to me that levels() deletes other attributes. See the following example: ## example with levels f1 - factor(c('level c','level b','level a','level c'), ordered=TRUE) attr(f1, 'testattribute') - 'teststring' attributes(f1) levels(f1) - c('L-A', 'L-B', 'L-C') attributes(f1) If

Re: [R] levels() deletes other attributes

2005-07-18 Thread Heinz Tuechler
At 09:29 18.07.2005 -0500, Frank E Harrell Jr wrote: Heinz Tuechler wrote: Dear All, it seems to me that levels() deletes other attributes. See the following example: ## example with levels f1 - factor(c('level c','level b','level a','level c'), ordered=TRUE) attr(f1, 'testattribute') -

Re: [R] levels() deletes other attributes

2005-07-18 Thread Heinz Tuechler
At 16:53 18.07.2005 +0200, Heinz Tuechler wrote: At 09:29 18.07.2005 -0500, Frank E Harrell Jr wrote: Heinz Tuechler wrote: Dear All, it seems to me that levels() deletes other attributes. See the following example: ## example with levels f1 - factor(c('level c','level b','level a','level