Description Usage Arguments Examples
Once you have a sqliter
database properly set you
can execute queries into that database and get your data
transformed. By default this function returns a
data.frame object, but if you transform your data you can
get whatever you need.
1 2 3 4 5 |
object |
|
database |
the SQLite database filename without extension |
query |
the query string |
post_proc |
a function to transform data, it receives a database and returns whatever you need. |
... |
additional arguments used by prepared queries |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
DBM <- sqliter(path=c("data", "another/project/data"))
ds <- execute(DBM, "dummydatabase", "select count(*) from dummytable")
ds <- execute(DBM, "dummydatabase", "select * from dummytable where
name = :name", name=c("Macunamima", "Borba Gato"))
ds <- execute(DBM, "dummydatabase", "select * from dummytable where
name = :name", name=c("Macunamima", "Borba Gato"),
post_proc=function(ds) {
ds <- transform(ds, birthday=as.Date(birthday))
ds
})
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.