-
Notifications
You must be signed in to change notification settings - Fork 80
/
INSTALL
72 lines (45 loc) · 2.29 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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