Remove duplicated by both numeric and date columns


I have a data.frame were i need to remove duplicated by two columns, which is a numeric and a date. I have tried this:

df <- df %>% distinct(x & date, keep_all=T)
and this:
df <- df [!duplicated(df$x & 'df$date'), ]
but in both cases i get the error "operations are possible only for numeric, logical or complex types".

Could anyone help me out with this?

Regards Marit

distinct will work but instead of & use ,

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.