* using log directory 'd:/Rcompile/CRANpkg/local/4.1/PRSim.Rcheck' * using R version 4.1.3 (2022-03-10) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'PRSim/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'PRSim' version '1.4-2' * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'PRSim' can be installed ... 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 * loading checks for arch 'i386' ** 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 use of S3 registration ... OK * loading checks for arch 'x64' ** 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 use of S3 registration ... 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 ... [14s] OK * checking Rd files ... [1s] 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 pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking examples ... ** running examples for arch 'i386' ... [11s] OK ** checking differences from 'PRSim-Ex_i386.Rout' to 'PRSim-Ex.Rout.save' ... OK 23,24d22 < > ##D demo("PRSim_weather") < > ##D demo("PRSim_weather-validate") 55c53 < This is mgcv 1.8-42. For overview type 'help("mgcv-package")'. --- > This is mgcv 1.8-31. For overview type 'help("mgcv-package")'. 111c109 < This is mgcv 1.8-42. 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() 278c234 < [1] 6570 11 --- > [1] 6570 56 337,436d292 < + } < > < > < > < > graphics::par(get("par.postscript", pos = 'CheckExEnv')) < > 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]) ** running examples for arch 'x64' ... [11s] OK ** checking differences from 'PRSim-Ex_x64.Rout' to 'PRSim-Ex.Rout.save' ... OK 23,24d22 < > ##D demo("PRSim_weather") < > ##D demo("PRSim_weather-validate") 55c53 < This is mgcv 1.8-42. For overview type 'help("mgcv-package")'. --- > This is mgcv 1.8-31. For overview type 'help("mgcv-package")'. 111c109 < This is mgcv 1.8-42. 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() 278c234 < [1] 6570 11 --- > [1] 6570 56 337,436d292 < + } < > < > < > < > graphics::par(get("par.postscript", pos = 'CheckExEnv')) < > 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]) * checking for unstated dependencies in 'tests' ... OK * checking tests ... ** running tests for arch 'i386' ... [55s] OK Running 'basic.R' [55s] Comparing 'basic.Rout' to 'basic.Rout.save' ...34c34 < This is mgcv 1.8-42. For overview type 'help("mgcv-package")'. --- > This is mgcv 1.8-31. For overview type 'help("mgcv-package")'. 284c284 < > out6b <- prsim( runo, marginal="kappa", marginalpar=TRUE) --- > > out6b <- prsim( runo, marginal="Kappa", marginalpar=TRUE) 290c290 < [1] TRUE --- > [1] FALSE 303,308c303,308 < Min. :0 Min. :0 < 1st Qu.:0 1st Qu.:0 < Median :0 Median :0 < Mean :0 Mean :0 < 3rd Qu.:0 3rd Qu.:0 < Max. :0 Max. :0 --- > Min. :0 Min. :-8.52690 > 1st Qu.:0 1st Qu.: 0.00000 > Median :0 Median : 0.00000 > Mean :0 Mean : 0.00043 > 3rd Qu.:0 3rd Qu.: 0.00000 > Max. :0 Max. : 9.88258 ** running tests for arch 'x64' ... [58s] OK Running 'basic.R' [58s] Comparing 'basic.Rout' to 'basic.Rout.save' ...34c34 < This is mgcv 1.8-42. For overview type 'help("mgcv-package")'. --- > This is mgcv 1.8-31. For overview type 'help("mgcv-package")'. 284c284 < > out6b <- prsim( runo, marginal="kappa", marginalpar=TRUE) --- > > out6b <- prsim( runo, marginal="Kappa", marginalpar=TRUE) 290c290 < [1] TRUE --- > [1] FALSE 303,308c303,308 < Min. :0 Min. :0 < 1st Qu.:0 1st Qu.:0 < Median :0 Median :0 < Mean :0 Mean :0 < 3rd Qu.:0 3rd Qu.:0 < Max. :0 Max. :0 --- > Min. :0 Min. :-8.52690 > 1st Qu.:0 1st Qu.: 0.00000 > Median :0 Median : 0.00000 > Mean :0 Mean : 0.00043 > 3rd Qu.:0 3rd Qu.: 0.00000 > Max. :0 Max. : 9.88258 * checking PDF version of manual ... OK * DONE Status: OK