Running examples in ‘SwissAir-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: AirQual
> ### Title: Air Quality Data of Switzerland
> ### Aliases: AirQual SwissAir
> ### Keywords: datasets
> 
> ### ** Examples
> 
> str(AirQual)
'data.frame':	17568 obs. of  22 variables:
 $ start : chr  "01.01.2004 00:00" "01.01.2004 00:30" "01.01.2004 01:00" "01.01.2004 01:30" ...
 $ ad.O3 : num  1 1.1 1.2 1.2 4.4 4.7 6.7 4.9 6 6.3 ...
 $ ad.NOx: num  19.7 21.9 21.2 20.4 11.9 12.3 10.1 12 10.7 10 ...
 $ ad.NO : num  6.3 9 9.2 8.4 1.6 1.5 1.2 2 1.6 1.1 ...
 $ ad.WS : num  0.46 0.1 0.5 1.7 3.47 2.45 0.6 0.67 2.97 1.84 ...
 $ ad.WD : num  46 179 159 158 166 140 55 140 190 144 ...
 $ ad.T  : num  0.1 -0.5 -0.7 -0.5 -0.1 -0.2 -0.6 -0.6 -0.1 -0.1 ...
 $ ad.Td : num  -0.941 -1.172 -1.357 -1.844 -2.879 ...
 $ sz.O3 : num  1.2 1.4 1.8 1.4 1.6 1.9 6 7.6 8.1 10.1 ...
 $ sz.NOx: num  21.5 27.5 25.7 23.7 18.5 17.8 11.9 11.9 13.7 12.3 ...
 $ sz.NO : num  6.3 12.8 12.2 9.6 4.7 4.4 2.6 2.4 3 2.6 ...
 $ sz.WS : num  0.11 0.2 0.08 0.12 0.53 0.17 0.79 0.58 0.3 0.13 ...
 $ sz.WD : num  63 278 88 11 279 333 305 112 15 112 ...
 $ sz.T  : num  0.9 0.6 0.5 0.6 0.3 0.1 0.6 0.8 0.9 1 ...
 $ sz.Td : num  -1.16 -1.45 -1.54 -1.69 -1.83 ...
 $ lu.O3 : num  16.4 16.3 16.1 15.9 15.8 15.3 11.2 13.1 13.7 15.1 ...
 $ lu.NOx: num  7.2 6.6 6.7 7 7.3 7.7 11 8.8 8.4 7.7 ...
 $ lu.NO : num  0.7 0.4 0.6 0.6 0.6 0.8 1.1 0.2 0.3 0.4 ...
 $ lu.WS : num  2.42 2.4 1.84 1.49 1.7 1.97 1.23 1.14 1.3 1.9 ...
 $ lu.WD : num  5 352 2 19 356 333 324 313 94 63 ...
 $ lu.T  : num  0.2 0.2 0 -0.1 0 0 -0.1 0 -0.1 -0.3 ...
 $ lu.Td : num  -1.75 -1.89 -1.89 -2.08 -2.11 ...
> sapply(AirQual,function(x) sum(is.na(x)))
 start  ad.O3 ad.NOx  ad.NO  ad.WS  ad.WD   ad.T  ad.Td  sz.O3 sz.NOx  sz.NO 
     0    315    292    292     32     34     24     26    569    552    552 
 sz.WS  sz.WD   sz.T  sz.Td  lu.O3 lu.NOx  lu.NO  lu.WS  lu.WD   lu.T  lu.Td 
   348    373    456    456    478    468    468     41     41     19     19 
> cbind(min=sapply(AirQual[,-1], min, na.rm=TRUE),
+       median=sapply(AirQual[,-1], median, na.rm=TRUE),
+       max=sapply(AirQual[,-1], max, na.rm=TRUE))
           min   median     max
ad.O3    0.200  18.4000  82.700
ad.NOx   0.600  15.5000 325.900
ad.NO    0.000   3.2000 280.100
ad.WS    0.010   1.2100  15.140
ad.WD    0.000 180.0000 359.000
ad.T    -6.700  10.4000  28.700
ad.Td  -11.701   5.0875  20.632
sz.O3    0.300  20.6000  88.800
sz.NOx   1.200  15.0000 169.800
sz.NO    0.000   3.7000 132.400
sz.WS    0.000   0.3100   6.370
sz.WD    0.000 192.0000 359.000
sz.T    -8.500  10.5000  30.700
sz.Td  -15.811   5.0030  19.530
lu.O3    0.000  21.3000  93.700
lu.NOx   0.900  13.1000 266.700
lu.NO    0.000   1.7000 226.600
lu.WS    0.010   1.3400  12.080
lu.WD    0.000 239.0000 359.000
lu.T    -9.000  10.0000  30.200
lu.Td  -11.583   5.0840  19.772
> 
> if(require(IDPmisc)) {
+ 
+   ## low correlation, density on logarithmic scale
+   ipairs(AirQual[,c("ad.O3","lu.O3","sz.O3")],
+          ztrans=function(x){x[x<1] <- 1; log2(x)*10})
+   ipairs(AirQual[,c("ad.NOx","lu.NOx","sz.NOx")],
+          ztrans=function(x){x[x<1] <- 1; log2(x)*10})
+   ilagplot(AirQual[,c("ad.O3")],set.lags = 1:9,
+          ztrans=function(x){x[x<1] <- 1; log2(x)*10})
+ 
+   Ox <- AirQual[,c("ad.O3","lu.O3","sz.O3")]+
+         AirQual[,c("ad.NOx","lu.NOx","sz.NOx")]-
+         AirQual[,c("ad.NO","lu.NO","sz.NO")]
+   names(Ox) <- c("ad","lu","sz")
+ 
+   ## high correlation, density on logarithmic scale
+   ipairs(Ox,
+          ztrans=function(x){x[x<1] <- 1; log2(x)*10})
+   ilagplot(Ox$ad,set.lags = 1:9,
+          ztrans=function(x){x[x<1] <- 1; log2(x)*10})
+ 
+   dat <-
+     data.frame(month =as.numeric(substr(AirQual$start,4,5)),
+                hour = as.numeric(substr(AirQual$start,12,13)),
+                WD = AirQual$ad.WD,
+                NOx = AirQual$ad.NOx,
+                O3  = AirQual$ad.O3,
+                Ox  = AirQual$ad.O3+AirQual$ad.NOx-AirQual$ad.NO)
+ 
+     med.dayrose <- rose(dat[,c("NOx","O3","Ox")],
+                       subset= dat$month>4 & dat$month<10,
+                       cyclVar=dat$hour, n.cyclVar=24, circle=24,
+                       FUN=median, na.rm=TRUE)
+ 
+   ## NOx (= NO+NO2) and ozone (O3) have a distinct diurnal variation of
+   ## concentration, whereas Ox (= NO2+O3) varies only very slightly
+   grid.newpage()
+   plot(med.dayrose,
+        general = general.control(lwd=2),
+        grid =
+        grid.control(ray.n = 12,
+                     circ.n =2,
+                     circ.sub.n = 2,
+                     cyclVar.lab = seq(0,by=2,to=22)),
+        title = title.control(text=
+          "Day Rose of Medians\nduring summer time"))
+   grid.newpage()
+   plot(med.dayrose,
+        general = general.control(lwd=3),
+        grid =
+        grid.control(ray.n = 12,
+                     circ.n =2,
+                     circ.sub.n = 2,
+                     cyclVar.lab = seq(0,by=2,to=22)),
+        title = title.control(text=
+          "Day Rose of Medians\nduring summer time"))
+ 
+   ## exploration of upslope (North) downslope (South) wind system
+   ## during summer time in the valley north of Gotthard
+   ncol <- 4
+ 
+   if(interactive()) x11(16,12)
+   grid.newpage()
+   pushViewport(viewport(layout=grid.layout(nrow=3,ncol=ncol),
+                         width=0.98, height=0.98))
+ 
+   for (hour in seq(0,22,2)) {
+     windrose <-
+       rose(dat$WD, cyclVar = dat$WD, circle = 360, n.cyclVar = 32,
+            subset = dat$hour>=hour & dat$hour<hour+2 &
+                     dat$month>4 & dat$month<10,
+            FUN = function(x) sum(!is.na(x)),
+            warn = FALSE)
+ 
+     pushViewport(viewport(layout.pos.col=(hour/2)%%ncol+1,
+                           layout.pos.row=(hour/2)%/%ncol+1))
+     plot(windrose,
+          general=general.control(
+            lwd=3),
+          grid=grid.control(
+            circ.r = seq(0,150,50),
+            circ.sub.r = seq(25,150,25),
+            circ.between = 0,
+            circ.cex = 0.6,
+            cyclVar.cex = 1,
+            ray.lim=c(0,150)),
+          title=title.control(
+            text=paste(hour,"o'clock"),
+            between=0.3, cex = 1.5),
+          key=key.control(title="hour of day"))
+     print(hour)
+     popViewport()
+   } ## end for
+ 
+ } else print("Package IDPmisc is not available")
Loading required package: IDPmisc
Error in grid.newpage() : could not find function "grid.newpage"
Execution halted