https://github.com/cran/sqldf
Raw File
Tip revision: 50e5ac89a6f20a82b3135f4764c041b56d8ab4d6 authored by G. Grothendieck on 28 June 2017, 05:43:10 UTC
version 0.4-11
Tip revision: 50e5ac8
INSTALL
INSTALLING FROM CRAN

sqldf is installed from CRAN like this:

	install.packages("sqldf")

This will download and install sqldf and all its dependencies including the
RSQLite driver.  The RSQLite driver includes SQLite itself so  the single
line given above is all that is needed to install everything you need.


INSTALLING FROM GITHUB

The development version of sqldf can be installed from github like this:

	library(devtools)
	install_github("ggrothendieck/sqldf")


BACKENDS

sqldf can also be used with alternate backends: H2, PostgreSQL and MySQL.

H2 is the next easiest to install since the H2 software itself is included 
right in the RH2 R package providing the driver. Just install RH2 (which
in turn requires that you install java).

See FAQ #12 on the sqldf github home page for information on installng and 
using PostgreSQL with sqldf.
https://github.com/ggrothendieck/sqldf


PROBLEMS

sqldf uses gsubfn which can optionally use the R tcltk package but can also run
without that package substituting R code for it.  On Windows and most other R
installations, the tcltk package comes with the core of R and so you
automatically have it intalled it when you install R itself.  If the tcltk
package is not present this fact will be automatically detected and it will
automatically switch to R code.  

There have been reports of bad R builds in which R reports that it has tcltk
capability even though it is missing. In that case you will get an error message
about tcltk being missing.  To address this issue it is easiest to just run this
command prior to sqldf to force gsubfn to use R code in place of tcltk:
	options(gsubfn.engine = "R")

See FAQ #5 on the sqldf github home page for more info.
https://github.com/ggrothendieck/sqldf


MORE INFO

There is more information on sqldf on the sqldf github home page.
Note the TROUBLESHOOTING, FAQs and EXAMPLES sections there.

    https://github.com/ggrothendieck/sqldf

There is also information in the help files:

    library(help = sqldf)
    ?sqldf
    ?read.csv.sql

There is also info on the individual driver packages here:

  http://cran.r-project.org/package=RSQLite
  http://cran.r-project.org/package=RH2 
  http://cran.r-project.org/package=RPostgreSQL
  http://cran.r-project.org/package=RMySQL


back to top