You can do this for example:
set.seed(1)
library(raster)
r <- raster(nrows=5, ncols=5)
r <- setValues(r, 1:ncell(r))
r2 <- raster(nrows=5, ncols=5)
r2 <- setValues(r2, round(runif(ncell(r),10,20)),2)
## 100 here as a value that don't exist in range of values(r)
## and it gives the blue value
r[r2<15] <- '100'
## I plot the 3 to see check the result
plot(stack(r,r2,r2<15))