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

2024-04-05 Thread Jorgen Harmse via R-help
(I do not know how to make Outlook send plain text, so I avoid apostrophes.) For what it is worth, I agree with Mark Webster. The discussion by Ivan Krylov is interesting, but if duplicated really treated a row name as part of the row then any(duplicated(data.frame(�))) would always be FALSE. My

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 > ro

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 > rows