(a <- frab(c(a=1,b=NA,c=44,x=NA,h=4)))
is.na(a)
(x <- frab(c(x=5,y=2,z=3,a=7,b=6)))
which(x>3)
x[which(x>3)]
x[which(x>3)] <- 4
x
is.na(x) <- x<3
x
x[is.na(x)] <- 100
x
y <- frab(c(a=5,b=NA,c=3,d=NA))
y[is.notna(y)] <- 199
y
Run the code above in your browser using DataLab