# Restructer the SIMO output in the SQLite database (final "UNIT" table)
# Restructer the SIMO output in the SQLite database (final "UNIT_2" table)
#
# !!! ONLY FOR SetAside simulations
#
...
...
@@ -78,7 +78,9 @@ create_table_UNIT <- 'Create Table UNIT AS SELECT u.*,
ORDER BY u.id, l.branch, l.data_date'
create_table_UNIT_2<-'Create Table UNIT_2 AS SELECT u.*,
(4.471+0.0645*u.D_gm - 0.0001745*u.N + 0.006439*u.V_pine*(CASE WHEN u.H_dom >= 10 THEN 1 ELSE 0 END) + 0.005733*u.V_penbirch + u. V_pubbirch*(CASE WHEN u.H_dom >= 10 THEN 1 ELSE 0 END)) as Scenic_beauty
FROM UNIT u'
# -------------------
# Process: Run queries for SA
...
...
@@ -92,7 +94,7 @@ db <- dbConnect(dbDriver("SQLite"),
# If the following tables already exist, for which the query is defined, remove them