Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SIMO_output
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clblatte
SIMO_output
Commits
0fcc18f2
Commit
0fcc18f2
authored
4 years ago
by
mpotterf
Browse files
Options
Downloads
Patches
Plain Diff
removed checking code
parent
9efc3933
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
structure_SIMO_rslDB_FBE.R
+7
-28
7 additions, 28 deletions
structure_SIMO_rslDB_FBE.R
with
7 additions
and
28 deletions
structure_SIMO_rslDB_FBE.R
+
7
−
28
View file @
0fcc18f2
...
...
@@ -21,6 +21,9 @@ library(RSQLite)
# Queries:
# ------------------
print
(
"queries loaded"
)
create_table_max_v
<-
'CREATE TABLE max_v AS SELECT comp_unit.id AS id,
MAX(comp_unit.V) AS max_v FROM comp_unit GROUP BY comp_unit.id'
...
...
@@ -124,36 +127,12 @@ create_table_UNIT <- 'Create Table UNIT AS SELECT u.*,
##### For each "db_names", defined in main.R ...
for
(
name
in
db_names
)
{
print
(
name
)
db
<-
dbConnect
(
dbDriver
(
"SQLite"
),
dbname
=
paste
(
inputFolder
,
paste0
(
name
,
".db"
),
sep
=
"/"
))
print
(
db
)
dbDisconnect
(
db
)
}
##### Create tables "OPERS2", "OPERS3", "max_v", "UNIT" within each database
# -----------------------------------------------------
for
(
name
in
db_names
){
#print(name)
#name = "simulated_without_MV_Korsnas_Wind_NO_1-15"
# Connect to the database
#con <- dbConnect(dbDriver("SQLite"),
# dbname = paste0(path,"input_data/simulated_", sim_variant,"_" ,name , "_rsu.db"))
#db <- dbConnect(dbDriver("SQLite"),
# dbname = paste0(path, "input_data/simulated_without_MV_Korsnas_Wind_NO_1-15.db"))
#db <- dbConnect(dbDriver("SQLite"),
# dbname = paste(inputFolder, paste0(name, ".db"), sep = "/"))
# Connect to database
db
<-
dbConnect
(
dbDriver
(
"SQLite"
),
dbname
=
paste
(
inputFolder
,
paste0
(
name
,
".db"
),
sep
=
"/"
))
...
...
@@ -183,7 +162,7 @@ for (name in db_names){
rm
(
query_to_run
,
tab_to_delete
,
db
)
}
rm
(
create_table_max_v
,
create_table_OPERS2
,
create_table_OPERS3
,
create_table_UNIT
)
#
rm(create_table_max_v, create_table_OPERS2, create_table_OPERS3, create_table_UNIT)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment