x <- 1:10
lband <- x - 0.1
uband <- x + 0.1
rfactor(x, lband, uband)
lband <- x - rnorm(10)
uband <- x + rnorm(10)
rfactor(x, lband, uband)
#############
# Loading daily streamflows of the Ega River (Spain), from 1961 to 1970
data(EgaEnEstellaQts)
obs <- EgaEnEstellaQts
# Selecting only the daily values belonging to the year 1961
obs <- window(obs, end=as.Date("1961-12-31"))
# Generating the lower and upper uncertainty bounds, centred at the observations
lband <- obs - 5
uband <- obs + 5
rfactor(obs, lband, uband)
# Randomly generating the lower and upper uncertainty bounds
uband <- obs + rnorm(length(obs))
lband <- obs - rnorm(length(obs))
rfactor(obs, lband, uband)
Run the code above in your browser using DataLab