# NOT RUN {
x <- rray(1:10, c(5, 2))
# Same shape and type as x, but filled with 1
rray_full_like(x, 1L)
# `fill` is coerced to `x` if it can be
rray_full_like(x, FALSE)
# `value = 1`
rray_ones_like(x)
# When logicals are used, it is filled with TRUE
rray_ones_like(c(FALSE, TRUE))
# `value = 0`
rray_zeros_like(x)
# }
Run the code above in your browser using DataLab