Why I cannot save mutate result in r

0 votes

This should be a straightforward question. Within each group (name), I attempted to rank "date" and record the rank output as rank date.

"Error in df percent > percent group by(name) percent > percent rank date - mutate(df, rank = order(score,: could not find function " percent > percent -"

df = data.frame(name=c("A","A","A","B","C","D"), score = c("03/21/2021", "04/21/2021", "05/21/2021", "06/21/2021","07/21/2021","03/21/2021"))
df$score = as.Date(df$score,"%m/%d/%Y")
df %>% 
    group_by(name)%>% 
  rank_date<-mutate(df, rank=order(score, decreasing=TRUE))
Jun 10, 2022 in Data Science by Avinash
• 1,260 points

edited Mar 4 21 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP