-
Notifications
You must be signed in to change notification settings - Fork 0
/
EPDr-vignette.R
65 lines (42 loc) · 1.59 KB
/
EPDr-vignette.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Installing the EPDr package ---------------------------------------------
library(devtools)
install_github("dinilu/EPDr", force=T)
# DDBB connection functions ----
library(EPDr)
connEPD <- connectToEPD(host="localhost", database="epd", user="epdr", password="epdrpw")
dbListTables(connEPD)
dbGetQuery(connEPD, "SELECT e_ FROM synevent;")
disconnectFromEPD(connEPD)
# Search functions ----
connEPD <- connectToEPD(host="localhost", database="epd", user="epdr", password="epdrpw")
# List functions ----
# Get functions ----
c14 <- getC14(400, connEPD)
chron <- getChronologies(400, connEPD)
# Export functions ----
c14.clam <- exportC14(c14)
noc14.clam <- noC14toCLAM(chron$no_C14)
# Extract functions ----
# Standardize functions ----
# Tabulate functions ----
# Plotting functions ----
# Section 1 - Recalibrate chronologies ------------------------------------------
# Site with one chronologies with EXTRA data
core4Clam(1, connEPD)
clam("1")
# Site with two chronologies, one with EXTRA data
core4Clam(4, connEPD)
clam("4")
# Cores with events
eventList <- unique(dbGetQuery(connEPD, "SELECT e_ FROM synevent;")[,1])
#[1] 51 141 220 457 554 571 679 806 868 874 932 966 980 1030 1031 1032
lapply(eventList[c(4:6, 11:13, 15)], core4Clam, connEPD, get.dephts=T)
core4Clam(1032, connEPD, get.dephts=T)
# Site with two chronologies and events
core4Clam("874", connEPD, get.dephts=T)
disconnectFromEPD(connEPD)
# Cores with sections
unique(as.numeric(dbGetQuery(connEPD, "SELECT e_ FROM section;")[,1]))
#[1] 271 318 456 605 883
core4Clam("271", connEPD, get.dephts=T)
disconnectFromEPD(connEPD)