Description Usage Arguments Details Value Author(s) Examples
Create a normal materialized view from the set available on the MIMIC code repository This function creates a materialized view from those available on the MIMIC code repository. See details about where these come from.
1 | get_view(URL, dbSource, conn)
|
URL |
a character string URL to the location of a plaintext file containing sql code. |
dbSource |
your dplyr database source (Currently must be postgres). Defaults to pg_src in the global environment. |
conn |
your postgres DBI object to connect to the postgres db |
TBD
a remote processed view (dplyr).
Jesse D. Raffa
1 2 3 4 5 6 7 | ## Setup Connection
# m <- dbDriver("PostgreSQL")
# passwd <- "secret";
# con <- dbConnect(m, user="user", password=passwd, dbname="mimic",host="localhost",port=5674) # The trickiest part
# dbSendStatement(con,"SET search_path to mimiciii"); # or whatever schema you have
# pg_src <- src_postgres(dbname = "mimic", host = "127.0.0.1", port = 5674, user = "user", password = passwd,options="-c search_path=mimiciii")
# myView <- get_view("https://raw.githubusercontent.com/MIT-LCP/mimic-code/master/concepts/code-status.sql",dbSource=pg_src,conn=con)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.