• using R version 4.1.2 (2021-11-01)
  • using platform: x86_64-apple-darwin17.0 (64-bit)
  • using session charset: UTF-8
  • checking for file ‘PRSim/DESCRIPTION’ ... OK
  • checking extension type ... Package
  • this is package ‘PRSim’ version ‘1.4-1’
  • package encoding: UTF-8
  • checking package namespace information ... OK
  • checking package dependencies ... OK
  • checking if this is a source package ... OK
  • checking if there is a namespace ... OK
  • checking for executable files ... OK
  • checking for hidden files and directories ... OK
  • checking for portable file names ... OK
  • checking for sufficient/correct file permissions ... OK
  • checking whether package ‘PRSim’ can be installed ... [8s/8s] OK
  • checking installed package size ... OK
  • checking package directory ... OK
  • checking DESCRIPTION meta-information ... OK
  • checking top-level files ... OK
  • checking for left-over files ... OK
  • checking index information ... OK
  • checking package subdirectories ... OK
  • checking R files for non-ASCII characters ... OK
  • checking R files for syntax errors ... OK
  • checking whether the package can be loaded ... OK
  • checking whether the package can be loaded with stated dependencies ... OK
  • checking whether the package can be unloaded cleanly ... OK
  • checking whether the namespace can be loaded with stated dependencies ... OK
  • checking whether the namespace can be unloaded cleanly ... OK
  • checking loading without being on the library search path ... OK
  • checking dependencies in R code ... OK
  • checking S3 generic/method consistency ... OK
  • checking replacement functions ... OK
  • checking foreign function calls ... OK
  • checking R code for possible problems ... [5s/5s] OK
  • checking Rd files ... [0s/0s] OK
  • checking Rd metadata ... OK
  • checking Rd cross-references ... OK
  • checking for missing documentation entries ... OK
  • checking for code/documentation mismatches ... OK
  • checking Rd \usage sections ... OK
  • checking Rd contents ... OK
  • checking for unstated dependencies in examples ... OK
  • checking contents of ‘data’ directory ... OK
  • checking data for non-ASCII characters ... OK
  • checking LazyData ... OK
  • checking data for ASCII and uncompressed saves ... OK
  • checking line endings in C/C++/Fortran sources/headers ... OK
  • checking compiled code ... OK
  • checking examples ... [3s/3s] OK
  • checking differences from ‘PRSim-Ex.Rout’ to ‘PRSim-Ex.Rout.save’ ... OK

    23,24d22
    < > ##D demo("PRSim_weather")
    < > ##D demo("PRSim_weather-validate")
    55c53
    < This is mgcv 1.8-39. For overview type 'help("mgcv-package")'.
    ---
    > This is mgcv 1.8-31. For overview type 'help("mgcv-package")'.
    111c109
    < This is mgcv 1.8-39. For overview type 'help("mgcv-package")'.
    ---
    > This is mgcv 1.8-31. For overview type 'help("mgcv-package")'.
    146,187d143
    < > nameEx("fun_stoch_sim_weather")
    < > ### * fun_stoch_sim_weather
    < >
    < > flush(stderr()); flush(stdout())
    < >
    < > ### Name: pRsim.weather
    < > ### Title: Weather simulation (temperature and precipitation) for multiple
    < > ### stations
    < > ### Aliases: PRsim.weather prsim.weather prsim_weather
    < > ### Keywords: ts
    < >
    < > ### ** Examples
    < >
    < > data(weather_multi_sites)
    < > ## Not run:
    < > ##D # The following call requires half minute or so to execute.
    < > ##D prsim.weather(data_p=data_p, data_t=data_t, number_sim=1, p_margin='egpd',t_margin='sep')
    < > ## End(Not run)
    < >
    < >
    < > ## Not run:
    < > ##D # The following call requires 5 seconds to execute
    < > ##D ### define normal distribution
    < > ##D library(fitdistrplus)
    < > ##D rNORM <- function(n, theta) rnorm(n, theta[1], theta[2])
    < > ##D pNORM <- function(x, theta) pnorm(x, theta[1], theta[2])
    < > ##D NORM_fit <- function( xdat, ...) fitdistr( xdat, 'normal', show=FALSE, ...)$estimate
    < > ##D ### define GEV distribution
    < > ##D require("evd")
    < > ##D require("ismev")
    < > ##D rGEV <- function(n, theta) rgev(n, theta[1], theta[2], theta[3])
    < > ##D pGEV <- function(x, theta) pgev(x, theta[1], theta[2], theta[3])
    < > ##D GEV_fit <- function( xdat, ...) gev.fit(xdat, show=FALSE, ...)$mle
    < > ##D
    < > ##D ### apply function using alternative distributions
    < > ##D out <- prsim.weather(data_p=data_p, data_t=data_t, number_sim=1,p_margin='GEV',t_margin='NORM')
    < > ## End(Not run)
    < >
    < >
    < >
    < >
    < > cleanEx()
    216,253d171
    < > nameEx("runoff_multi_site_T")
    < > ### * runoff_multi_site_T
    < >
    < > flush(stderr()); flush(stdout())
    < >
    < > ### Name: runoff_multi_site_T
    < > ### Title: Sample runoff and temperature data of two catchments with a
    < > ### similar discharge regime
    < > ### Aliases: runoff_multi_site_T 'runoff multi site T'
    < > ### Keywords: datasets
    < >
    < > ### ** Examples
    < >
    < > data(runoff_multi_site_T)
    < > str(runoff_multi_site_T)
    < List of 2
    < $ :'data.frame': 11323 obs. of 5 variables:
    < ..$ YYYY: chr [1:11323] "1980" "1980" "1980" "1980" ...
    < ..$ MM : chr [1:11323] "01" "01" "01" "01" ...
    < ..$ DD : chr [1:11323] "01" "02" "03" "04" ...
    < ..$ Qobs: num [1:11323] 31.4 29.1 28.5 27.7 38.4 ...
    < ..$ T : num [1:11323] -3.372 -4.512 -4.938 -2.783 0.421 ...
    < $ :'data.frame': 11323 obs. of 5 variables:
    < ..$ YYYY: chr [1:11323] "1980" "1980" "1980" "1980" ...
    < ..$ MM : chr [1:11323] "01" "01" "01" "01" ...
    < ..$ DD : chr [1:11323] "01" "02" "03" "04" ...
    < ..$ Qobs: num [1:11323] 0.2 0.16 0.17 0.17 0.16 0.15 0.15 0.14 0.14 0.13 ...
    < ..$ T : num [1:11323] -9.89 -11.27 -11.47 -7.39 -2.75 ...
    < > runoff_multi_site_T[[1]]$timestamp <- paste(runoff_multi_site_T[[1]]$YYYY,
    < + runoff_multi_site_T[[1]]$MM, runoff_multi_site_T[[1]]$DD, sep=" ")
    < > runoff_multi_site_T[[1]]$timestamp <-
    < + as.POSIXct(strptime(runoff_multi_site_T[[1]]$timestamp,format="%Y %m %d", tz="GMT"))
    < > plot(runoff_multi_site_T[[1]]$timestamp[1:1000], runoff_multi_site_T[[1]]$Qobs[1:1000], type="l",
    < + xlab="Time [d]", ylab=expression(paste("Discharge [m"^3,"/s]")))
    < >
    < >
    < >
    < > cleanEx()
    316c234
    < [1] 6570 11
    ---
    > [1] 6570 56
    380,479d297
    < > cleanEx()
    < > nameEx("weather_multi_sites")
    < > ### * weather_multi_sites
    < >
    < > flush(stderr()); flush(stdout())
    < >
    < > ### Name: weather_multi_sites
    < > ### Title: Sample temperature and precipitation of four catchments derived
    < > ### from the ERA5-Land gridded dataset
    < > ### Aliases: weather_multi_sites 'weather multi sites'
    < > ### Keywords: datasets
    < >
    < > ### ** Examples
    < >
    < > data(weather_multi_sites)
    < > weather_multi_sites[[1]][[1]]$timestamp <- paste(weather_multi_sites[[1]][[1]]$YYYY,
    < + weather_multi_sites[[1]][[1]]$MM, weather_multi_sites[[1]][[1]]$DD, sep=" ")
    < > weather_multi_sites[[1]][[1]]$timestamp <-
    < + as.POSIXct(strptime(weather_multi_sites[[1]][[1]]$timestamp,
    < + format="%Y %m %d", tz="GMT"))
    < > plot(weather_multi_sites[[1]][[1]]$timestamp[1:1000],
    < + weather_multi_sites[[1]][[1]]$Qobs[1:1000], type="l",
    < + xlab="Time [d]", ylab=expression(paste("Temperature [degrees]")))
    < >
    < >
    < >
    < > cleanEx()
    < > nameEx("weather_sim_multi_sites")
    < > ### * weather_sim_multi_sites
    < >
    < > flush(stderr()); flush(stdout())
    < >
    < > ### Name: weather_sim_multi_sites
    < > ### Title: Simulated temperature and precipitation for two grid cells
    < > ### Aliases: weather.sim.multi.sites weather_sim_multi_sites
    < > ### Keywords: datasets
    < >
    < > ### ** Examples
    < >
    < > data(weather_sim_multi_sites)
    < > sim <- weather_sim_multi_sites
    < > ### define plotting colors
    < > col_sim <- adjustcolor("#fd8d3c",alpha=0.8)
    < > col_sim_tran <- adjustcolor("#fd8d3c",alpha=0.2)
    < > col_obs <- adjustcolor( "black", alpha.f = 0.2)
    < > ### greys
    < > col_vect_obs <- c('#cccccc','#969696','#636363','#252525')
    < > ### oranges
    < > col_vect_sim <- c('#fdbe85','#fd8d3c','#e6550d','#a63603')
    < >
    < > ### plot time series for multiple sites
    < >
    < > ### Temperature (first list entry)
    < > par(mfrow=c(2,1),mar=c(3,3,2,1))
    < > ### determine ylim
    < > ylim_max <- max(sim[[1]][[1]]$Temp)*1.5
    < > ### observed
    < > plot(sim[[1]][[1]]$Temp[1:1000],
    < + ylab=expression(bold(paste("Temperature [degrees]"))),
    < + xlab="Time [d]",type="l",col=col_vect_obs[1],
    < + ylim=c(0,ylim_max),main='Observations')
    < > for(l in 2){
    < + lines(sim[[l]][[1]]$Temp[1:1000],col=col_vect_obs[l])
    < + }
    < > # legend('topleft',legend=c('Station 1','Station 2'
    < > # ),lty=1,col=col_vect_obs[1:2])
    < > ### simulated (one run)
    < > plot(sim[[1]][[1]]$r1[1:1000],
    < + ylab=expression(bold(paste("Temperature [degrees]"))),
    < + xlab="Time [d]",type="l",col=col_vect_sim[1],
    < + ylim=c(0,ylim_max),main='Stochastic simulations')
    < > for(l in 2){
    < + lines(sim[[l]][[1]]$r1[1:1000],col=col_vect_sim[l])
    < + }
    < >
    < >
    < > ### precipitation (second list entry)
    < > ylim_max <- max(sim[[1]][[2]]$Prec)*1
    < > ### observed
    < > plot(sim[[1]][[2]]$Prec[1:1000],
    < + ylab=expression(bold(paste("Precipitation [mm/d]"))),
    < + xlab="Time [d]",type="l",col=col_vect_obs[1],
    < + ylim=c(0,ylim_max),main='Observations')
    < > for(l in 2){
    < + lines(sim[[l]][[2]]$Prec[1:1000],col=col_vect_obs[l])
    < + }
    < > # legend('topleft',legend=c('Station 1','Station 2'
    < > # ),lty=1,col=col_vect_obs[1:2])
    < > ### simulated (one run)
    < > plot(sim[[1]][[2]]$r1[1:1000],
    < + ylab=expression(bold(paste("Precipitation [mm/d]"))),
    < + xlab="Time [d]",type="l",col=col_vect_sim[1],
    < + ylim=c(0,ylim_max),main='Stochastic simulations')
    < > for(l in 2){
    < + lines(sim[[l]][[2]]$r1[1:1000],col=col_vect_sim[l])
    < + }
    < >
    < >
    < >
    < > graphics::par(get("par.postscript", pos = 'CheckExEnv'))
  • checking for unstated dependencies in ‘tests’ ... OK
  • checking tests ... [20s/20s] OK
      Running ‘basic.R’ [20s/20s]
      Comparing ‘basic.Rout’ to ‘basic.Rout.save’ ...34c34
    < This is mgcv 1.8-39. For overview type 'help("mgcv-package")'.
    ---
    > This is mgcv 1.8-31. For overview type 'help("mgcv-package")'.
    272c272
    < > rKappa <- function(n, theta) homtest::rand.kappa(n, theta[1], theta[2], theta[3], theta[4])
    ---
    > > rKappa <- function(n, theta) rand.kappa(n, theta[1], theta[2], theta[3], theta[4])
    274,275c274,275
    < + ll <- homtest::Lmoments(xdat)
    < + unlist(homtest::par.kappa(ll[1],ll[2],ll[4],ll[5]))
    ---
    > + ll <- Lmoments(xdat)
    > + unlist(par.kappa(ll[1],ll[2],ll[4],ll[5]))
  • checking PDF version of manual ... OK
  • DONE
    Status: OK
  • using check arguments '--no-clean-on-error '