Re: [R] duplicated() on zero-column data frames returns empty

2024-05-13 Thread Mark Webster via R-help
> If you would like to try your hand at developing a patch and make a > case for it at R-devel or the Bugzilla, the resources at > can be helpful. I am attempting to get admitted onto the Bugzilla at the moment for the data frame cases, fingers crossed! Best

Re: [R] duplicated() on zero-column data frames returns empty

2024-05-12 Thread Ivan Krylov via R-help
(Sorry for only getting back to this more than a month later.) В Mon, 8 Apr 2024 17:03:00 + Jorgen Harmse пишет: > What is the policy for changing something that is wrong? There is a > trade-off between breaking old code that worked around a problem and > breaking new code written by people

Re: [R] duplicated() on zero-column data frames returns empty

2024-04-08 Thread Jorgen Harmse via R-help
Cc: "r-help@r-project.org" Subject: Re: [R] duplicated() on zero-column data frames returns empty Message-ID: <603481690.9150754.1712522666...@mail.yahoo.com> Content-Type: text/plain; charset="utf-8" duplicated.matrix is an interesting one. I think a similar chang

Re: [R] duplicated() on zero-column data frames returns empty

2024-04-07 Thread Mark Webster via R-help
With respect to duplicated.data.frame taking account of row names to return all the rows as unique: thinking about this some more, I can see that making sense in isolation, but it's at odds with the usual behaviour of duplicated for other classes, e.g. primitive vectors, where it doesn't take

Re: [R] duplicated() on zero-column data frames returns empty

2024-04-07 Thread Ivan Krylov via R-help
В Fri, 5 Apr 2024 16:08:13 + Jorgen Harmse пишет: > if duplicated really treated a row name as part of the row then > any(duplicated(data.frame(…))) would always be FALSE. My expectation > is that if key1 is a subset of key2 then all(duplicated(df[key1]) >= > duplicated(df[key2])) should

Re: [R] duplicated() on zero-column data frames returns empty

2024-04-05 Thread Jorgen Harmse via R-help
Re: [R] duplicated() on zero-column data frames returns empty vector Message-ID: <20240405111737.2b7e4c3a@arachnoid> Content-Type: text/plain; charset="utf-8" Hello Mark, � Fri, 5 Apr 2024 03:58:36 + (UTC) Mark Webster via R-help �: > I found what looks to me

Re: [R] duplicated() on zero-column data frames returns empty vector

2024-04-05 Thread Mark Webster via R-help
Hello Ivan, thanks for this. > Part of the problem is that it's not obvious what should be a > zero-column but non-zero-row data.frame mean. >  > On the one hand, your database relation use case is entirely valid. On > the other hand, if data.frames are considered to be tables of data with >

Re: [R] duplicated() on zero-column data frames returns empty vector

2024-04-05 Thread Ivan Krylov via R-help
Hello Mark, В Fri, 5 Apr 2024 03:58:36 + (UTC) Mark Webster via R-help пишет: > I found what looks to me like an odd edge case for duplicated(), > unique() etc. on data frames with zero columns, due to duplicated() > returning a zero-length vector for them, regardless of the number of >