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

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

2024-04-05 Thread Mark Webster via R-help
Hello, 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: df <- data.frame(a = 1:5)df$a <- NULLnrow(df) # 5 (row count preserved by