Error: could not find function "sqldf" using R to run SQL

11.5k views Asked by At

I faced a question,there is a error message to run sqldf package. I just load

install.packages("sqldf")
install.packages("RSQLite")
install.packages("tcltk2")
library("sqldf")
library("RSQLite")
library("tcltk2")

final <-sqldf("select a.age,
                  a.height
           from a
           inner join b
           on
             a.id = b.id
           ")

Error: could not find function "sqldf"

sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tcltk2_1.2-11

loaded via a namespace (and not attached):
[1] tools_3.2.0

Also, my R and Rstudio have latest version. I have Windows 7.

0

There are 0 answers