r/ProgrammerHumor • • Oct 14 '25

Advanced neverForget

Post image
14k Upvotes

615 comments sorted by

View all comments

Show parent comment

-1

u/Kitchen-Quality-3317 Oct 14 '25

that's why I like R.

Select:

df[df$city == "NYC",]

Update:

df[df$city == "NYC", "city"] <- "DC"

OR

df$city[df$city == "NYC"] <- "DC"

Delete:

df <- df[df$city != "NYC", ]