Commit f2fe6b0a authored by aho's avatar aho
Browse files

Lighten the example

parent 84e959c4
......@@ -74,18 +74,18 @@
#'# Case 1: year
#'# Building an example dataset with yearly start dates from 1920 to 2009
#'set.seed(1)
#'obs1 <- rnorm(1 * 70 * 6 * 7)
#'dim(obs1) <- c(member = 1, time = 70, lat = 6, lon = 7)
#'obs1 <- rnorm(1 * 70 * 2 * 2)
#'dim(obs1) <- c(member = 1, time = 70, lat = 2, lon = 2)
#'dates <- seq(1920, 1989, 1)
#'res <- Persistence(obs1, dates = dates, start = 1961, end = 1980, ft_start = 1,
#' nmemb = 40)
#' nmemb = 2)
#'# Case 2: day
#'dates <- seq(as.Date(ISOdate(1990, 1, 1)), as.Date(ISOdate(1990, 4, 1)) ,1)
#'start <- as.Date(ISOdate(1990, 2, 15))
#'end <- as.Date(ISOdate(1990, 4, 1))
#'set.seed(1)
#'data <- rnorm(1 * length(dates) * 6 * 7)
#'dim(data) <- c(member = 1, time = length(dates), lat = 6, lon = 7)
#'data <- rnorm(1 * length(dates))
#'dim(data) <- c(member = 1, time = length(dates))
#'res <- Persistence(data, dates = dates, start = start, end = end, ft_start = 1)
#'
#'@import multiApply
......
......@@ -104,18 +104,18 @@ uncertainty (prediction interval) based on Coelho et al., 2004.\cr\cr
# Case 1: year
# Building an example dataset with yearly start dates from 1920 to 2009
set.seed(1)
obs1 <- rnorm(1 * 70 * 6 * 7)
dim(obs1) <- c(member = 1, time = 70, lat = 6, lon = 7)
obs1 <- rnorm(1 * 70 * 2 * 2)
dim(obs1) <- c(member = 1, time = 70, lat = 2, lon = 2)
dates <- seq(1920, 1989, 1)
res <- Persistence(obs1, dates = dates, start = 1961, end = 1980, ft_start = 1,
nmemb = 40)
nmemb = 2)
# Case 2: day
dates <- seq(as.Date(ISOdate(1990, 1, 1)), as.Date(ISOdate(1990, 4, 1)) ,1)
start <- as.Date(ISOdate(1990, 2, 15))
end <- as.Date(ISOdate(1990, 4, 1))
set.seed(1)
data <- rnorm(1 * length(dates) * 6 * 7)
dim(data) <- c(member = 1, time = length(dates), lat = 6, lon = 7)
data <- rnorm(1 * length(dates))
dim(data) <- c(member = 1, time = length(dates))
res <- Persistence(data, dates = dates, start = start, end = end, ft_start = 1)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment