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

> ### Name: cache
> ### Title: Enable Caching of the Function Results with the use of Archivist
> ### Aliases: cache
> 
> ### ** Examples
> 
> 
> # objects preparation
> library(lubridate)

Attaching package: ‘lubridate’

The following object is masked from ‘package:base’:

    date

> cacheRepo <- tempfile()
> createLocalRepo( cacheRepo )
Directory /tmp/RtmpRvaiM5/file73317efe4c1b did not exist. Forced to create a new directory.Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
> 
> ## Example 1:
> # cache is useful when objects used by FUN are not that big but calculations
> # are time-comsuming. Take a look at this example:
> fun <- function(n) {replicate(n, summary(lm(Sepal.Length~Species, iris))$r.squared)}
> 
> # let's check time of two evaluations of cache function
> system.time( res <- cache(cacheRepo, fun, 1000) )
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
   user  system elapsed 
  2.882   0.107   3.225 
> system.time( res <- cache(cacheRepo, fun, 1000) ) 
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
   user  system elapsed 
  2.957   0.071   3.258 
> # The second call is much faster. Why is it so? Because the result of fun
> # function evaluation has been stored in local cacheRepo during the first evaluation
> # of cache. In the second call of cache we are simply loading the result of fun
> # from local cacheRepo Repository.
> 
> ## Example 2:
> testFun <- function(x) {cat(x);x}
> 
> # testFun will be executed and saved to cacheRepo
> tmp <- cache(cacheRepo, testFun, "Say hallo!")
Say hallo!Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
> 
> # testFun execution will be loaded from repository
> tmp <- cache(cacheRepo, testFun, "Say hallo!")
Say hallo!Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
> 
> # testFun will be executed once again as it fails with expiration date. It will
> # be saved to cacheRepo.
> tmp <- cache(cacheRepo, testFun, "Say hallo!", notOlderThan = now())
Say hallo!Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries
> 
> # testFun execution will be loaded from repository as it
> # passes with expiration date [within hour]
> tmp <- cache(cacheRepo, testFun, "Say hallo!", notOlderThan = now() - hours(1))
Error in (function (dt, year, month, yday, mday, wday, hour, minute, second,  : 
  Invalid timezone of input vector: "GB"
Calls: cache ... reclass_date.POSIXlt -> as.POSIXlt -> do.call -> <Anonymous> -> .Call
Execution halted