Re: [Rd] unique.default() drops names (PR#9130)

2006-08-10 Thread Gregor Gorjanc
Seth Falcon fhcrc.org> writes: > I see value in unique() keeping names and from what I understand > the documentation could be changed to match > > I don't know if there are good reasons for dropping names from > vectors. > > Given that unique is very commonly used, I think the way to make such

Re: [Rd] unique.default() drops names (PR#9130)

2006-08-10 Thread Seth Falcon
Gregor Gorjanc <[EMAIL PROTECTED]> writes: > Thank you for the reply! I appologize for not reading the latest > documentation - there was no word about droping names in 2.3.1. However, > I do wonder why simple fix (as shown in previous mail) is not OK. I see value in unique() keeping names and fro

Re: [Rd] unique.default() drops names (PR#9130)

2006-08-09 Thread Gregor Gorjanc
Prof Brian Ripley wrote: > From the help page (?unique) > > Value: > > For a vector, an object of the same type of 'x', but with only one > copy of each duplicated element. No attributes are copied (so the > result has no names). > > Please take your own advice and `learn by doi

Re: [Rd] unique.default() drops names (PR#9130)

2006-08-08 Thread Prof Brian Ripley
>From the help page (?unique) Value: For a vector, an object of the same type of 'x', but with only one copy of each duplicated element. No attributes are copied (so the result has no names). Please take your own advice and `learn by doing as you are asked in the posting guide'

[Rd] unique.default() drops names (PR#9130)

2006-08-06 Thread Gregor . Gorjanc
Hello! unique on a vector or list drops names, while it does not in case of data.frames and matrix - rownames and colnames here, but they are intuitively the same as names. The following code shows this effect: vecTest <- c("A", "D", "B", "D", "A") names(vecTest) <- paste("name", vecTest, sep=""