Hey,
Again, thanks for your help earlier. I hope I can trouble you for one more question please.
As my dataset it very large with some repeating names. It is possible to have the result "flag" as a new column in the first data frame?
sample_df <- data.frame(stringsAsFactors=FALSE,
Name = c("a", "b", "c", "b", "d"),
Jan = c(0, 100, 100, 80, 100),
Feb = c(100, 0, 100, 80, 0),
Mar = c(150, 200, 100, 0, 0),
April = c(0, 0, 0, 0, 100)
)
New dataset result:
Name Jan Feb Mar April flag
a ........ TRUE
b ........ TRUE
c ......... TRUE
d .......... FALSE
Thanks again!