Running examples in 'fxregime-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: confint.fxregimes
> ### Title: Confidence Intervals for Breaks Between Exchange Rate Regimes
> ### Aliases: confint.fxregimes print.confint.fxregimes
> ###   breakddates.confint.fxregimes lines.confint.fxregimes
> ### Keywords: regression
> 
> ### ** Examples
> 
> ## load package and data
> library("fxregime")
> data("FXRatesCHF", package = "fxregime")
> 
> ## compute returns for CNY (and explanatory currencies)
> ## for one year after abolishing fixed USD regime
> cny <- fxreturns("CNY", frequency = "daily",
+   start = as.Date("2005-07-25"), end = as.Date("2006-07-24"),
+   other = c("USD", "JPY", "EUR", "GBP"))
> 
> ## compute all segmented regression with minimal segment size of
> ## h = 20 and maximal number of breaks = 5.
> reg <- fxregimes(CNY ~ USD + JPY + EUR + GBP,
+   data = cny, h = 20, breaks = 5, ic = "BIC")
> summary(reg)

	 Optimal (m+1)-segment partition for `lm' : 

Call:
gbreakpoints(formula = formula, data = data, h = 20, breaks = 5, 
    order.by = time(data), ic = "BIC", hpc = hpc)

Breakpoints at observation number:
                          
m = 1          158        
m = 2          158     222
m = 3      114 158     222
m = 4   44 114 158     222
m = 5   44 114 152 207 227

Corresponding to breakdates:
                                                              
m = 1                         2006-03-14                      
m = 2                         2006-03-14            2006-06-13
m = 3              2006-01-09 2006-03-14            2006-06-13
m = 4   2005-09-26 2006-01-09 2006-03-14            2006-06-13
m = 5   2005-09-26 2006-01-09 2006-03-06 2006-05-22 2006-06-20

Fit:
                                                                   
m       0         1         2         3         4         5        
nlogLik -421.2743 -465.1825 -475.1995 -482.8384 -492.0179 -498.1210
BIC     -809.4197 -858.5861 -839.9699 -816.5973 -796.3061 -769.8621
LWZ     -777.6648 -789.7837 -734.1200 -673.7000 -616.3613 -552.8698
> 
> ## minimum BIC is attained for 2-segment (1-break) model
> plot(reg)
> 
> ## two regimes
> ## 1: tight USD peg
> ## 2: slightly more relaxed USD peg
> round(coef(reg), digits = 3)
Error in as.Date.numeric(e) : 'origin' must be supplied
Calls: coef ... unlist -> lapply -> FUN -> as.Date -> as.Date.numeric
Execution halted