dimanche 19 avril 2015

How to connect to a remote sqlite database in r

I am not familiar SQLite. So I wonder if I can fetch SQLite data from a remote server?

I know I can do this quite easily with MySQL data,

# Load package.

# MySQL connection.
DB <- dbConnect(MySQL(), user="root", password="xxx", host="", db="xxxx")

# Select data from a table.
data = dbGetQuery(DB, "SELECT * FROM article")

But for SQLite, it seems that it requires a path,

# Load package.

# Connect to the sqlite file.
DB <- dbConnect(SQLite(), dbname = "C:/SQLite/xxxx.sqlite")

How can I know and obtain the path of a remote server then? Can I do this below?


Aucun commentaire:

Enregistrer un commentaire