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.
library("RMySQL")

# MySQL connection.
DB <- dbConnect(MySQL(), user="root", password="xxx", host="127.0.0.1", 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.
library("RSQLite")

# 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?



http://ift.tt/1bgvufH

Aucun commentaire:

Enregistrer un commentaire