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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: RObsDat-package
> ### Title: R-Package to the observations Data Model from CUAHSI
> ### Aliases: RObsDat-package RObsDat
> ### Keywords: package
> 
> ### ** Examples
> 
> 	example(addDataValues)

addDtV> #connect to database
addDtV> getDefaultDB()
Loading required namespace: RSQLite

addDtV> ## Not run: 
addDtV> ##D #connect to postgreSQL database
addDtV> ##D require("RObsDat")
addDtV> ##D require("RPostgreSQL")
addDtV> ##D m <- dbDriver("PostgreSQL")
addDtV> ##D con <- dbConnect(m, user="a_user", password="secret", dbname="obsdat")
addDtV> ##D sqhandler <-  new("odm1_1Ver", con=con)
addDtV> ##D options(odm.handler=sqhandler)
addDtV> ##D 
addDtV> ##D #connect to MySQL database
addDtV> ##D require("RObsDat")
addDtV> ##D require("RMySQL")
addDtV> ##D m <- dbDriver("MySQL")
addDtV> ##D con <- dbConnect(m, user="a_user", password="secret", dbname="obsdat")
addDtV> ##D sqhandler <-  new("odm1_1Ver", con=con)
addDtV> ##D options(odm.handler=sqhandler)
addDtV> ##D 
addDtV> ##D #connect to SQLite database
addDtV> ##D require("RObsDat")
addDtV> ##D require("RSQLite")
addDtV> ##D m <- dbDriver("SQLite")
addDtV> ##D dbname = "database.db"
addDtV> ##D con <- dbConnect(m, dbname = dbname)
addDtV> ##D sqhandler <-  new("odm1_1Ver", con=con)
addDtV> ##D options(odm.handler=sqhandler)
addDtV> ##D 
addDtV> ## End(Not run)
addDtV> 
addDtV> #Store metadata in database
addDtV> addSite(Code="test", Name="Virtual test site", x=-5, y=46,
addDtV+ 	LatLongDatum="WGS84", Elevation=1500, State="Germany")
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries

addDtV> addVariable(Name="Distance", Unit="cm", ValueType="Field Observation",
addDtV+ 	GeneralCategory="Instrumentation", Code="test_dist")
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries

addDtV> addQualityControlLevel(ID=6,Code="test_ok", Definition="The default")
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries

addDtV> addISOMetadata(TopicCategory="Unknown", Title="Testdata",
addDtV+ 	Abstract="This data is created to test the functions of RObsDat")
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries

addDtV> addSource(Organization="Your Org", SourceDescription="Madeup data", 
addDtV+ 	SourceLink="RObsDat Documentation", ContactName="Yourself",
addDtV+ 	Metadata="Testdata")
Warning in rsqlite_fetch(res@ptr, n = n) :
  Don't need to call dbFetch() for statements, only for queries

addDtV> library(xts)

addDtV> library(spacetime)

addDtV> example.data <- xts(1:40, seq(as.POSIXct("2014-01-01", tz="UTC"), 
addDtV+ 		as.POSIXct("2014-02-09", tz="UTC"), length.out=40))

addDtV> example.data[40] <- 30

addDtV> example.data[35] <- 22

addDtV> addDataValues(example.data[1:20], Site="Virtual test site", Variable="test_dist",  
addDtV+ 	Source="Madeup", QualityControlLevel="test_ok")
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
Importing column  1 out of 1 
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
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
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

addDtV> #Avoid duplicates automatically
addDtV> example.data[15] <- 30

addDtV> addDataValues(example.data, Site="Virtual test site", Variable="test_dist",  
addDtV+ 	Source="Madeup", QualityControlLevel="test_ok")
Importing column  1 out of 1 

 *** caught segfault ***
address 0x2, cause 'memory not mapped'

Traceback:
 1: .External("mergeXts", all = all[1:2], fill = fill, setclass = setclass,     symnames = symnames, suffixes = suffixes, retside = retside,     env = new.env(), tzone = tzone, ..., PACKAGE = "xts")
 2: merge.xts(entriesXtsValues, xts(Value[row.sel, column], order.by = order.date),     join = "right")
 3: merge(entriesXtsValues, xts(Value[row.sel, column], order.by = order.date),     join = "right")
 4: merge(entriesXtsValues, xts(Value[row.sel, column], order.by = order.date),     join = "right")
 5: addDataValues(example.data, Site = "Virtual test site", Variable = "test_dist",     Source = "Madeup", QualityControlLevel = "test_ok")
 6: eval(ei, envir)
 7: eval(ei, envir)
 8: withVisible(eval(ei, envir))
 9: source(tf, local, echo = echo, prompt.echo = paste0(prompt.prefix,     getOption("prompt")), continue.echo = paste0(prompt.prefix,     getOption("continue")), verbose = verbose, max.deparse.length = Inf,     encoding = "UTF-8", skip.echo = skips, keep.source = TRUE)
10: example(addDataValues)
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault