R/grapes_not_equals_grapes.R

"%!=%"<- function(a,b){
  if (length(a)==1){
    (1:length(b))[a != b]
  }else if(length(a) > 1){
    for (i in 1:length(a)) {
      if (i==1){location=c()}
      location.i=(1:length(b))[a[i] != b]
      location=c(location,location.i)
    }
    location[duplicated(location)]
  }
}

Try the do package in your browser

Any scripts or data that you put into this service are public.

do documentation built on Aug. 3, 2021, 5:06 p.m.