search for: didchang

Displaying 1 result from an estimated 1 matches for "didchang".

Did you mean: didchange
2012 Feb 06
5
I bet apply has a solution
...#Create data Data..<-data.frame(a=rep(1,10),b=c(rep(1,9),2),c=c(rep(1,8),2,2)) a b c 1 1 1 1 2 1 1 1 3 1 1 1 4 1 1 1 5 1 1 1 6 1 1 1 7 1 1 1 8 1 1 1 9 1 1 2 10 1 2 2 So what I want is to return logical value telling me if all the values are the same. So the result would be a b c DidChange 1 1 1 1 FALSE 2 1 1 1 FALSE 3 1 1 1 FALSE 4 1 1 1 FALSE 5 1 1 1 FALSE 6 1 1 1 FALSE 7 1 1 1 FALSE 8 1 1 1 FALSE 9 1 1 2 TRUE 10 1 2 2 TRUE I bet apply could handle this elegantly but that family of functions is still not 100% intuitive to me. Th...