Answers for "r add noise to vector"

1

r add noise to vector

# Define numeric vectors
x <- round(runif(1000, 1, 10))
y <- x + rnorm(1000, mean = 0, sd = 5)
Posted by: Guest on April-02-2021

Browse Popular Code Answers by Language