Questions:
After the deployment on Linux finishes R server, the SQLDF package is no longer available, and no problems were previously run on Win7
As follows:
> install.packages ("Sqldf")
> Library (SQLDF)
Load the required thread bundle: GSUBFN
Load the required thread bundle: Proto
Load the required thread bundle: Rsqlite
Load the required thread bundle: DBI
Load the required thread bundle: Rsqlite.extfuns
Warning message:
In Fun (Libname, pkgname): No display variable, so there is no TK this function (no display variable so Tk was not available)
> Q ()
After setting the display environment variable, although no warning appears when loading the package, there are still problems
# Export display=10.1.5.241:0.0
R
> Library (SQLDF)
> A <-sqldf ("Select SUM (dist) from cars")
Loading Required PACKAGE:TCLTK
Error in structure (. External (. C_DOTTCL, ...), class = "Tclobj"):
[TCL] Unknown math function "min".
Solutions:
Use the lower engine of R
#make sure your GSUBFN version is GSUBFN 0.6-4 or later
>packageversion ("GSUBFN")
[1] ' 0.6.6 '
>options (gsubfn.engine = "R")
>Library ("Sqldf")
> A <-sqldf ("Select SUM (dist) from cars")
> Sqldf ("SELECT * FROM Iris limit 5")
Sepal_length sepal_width petal_length petal_width species
1 5.1 3.5 1.4 0.2 Setosa
2 4.9 3.0 1.4 0.2 Setosa
3 4.7 3.2 1.3 0.2 Setosa
4 4.6 3.1 1.5 0.2 setosa
5 5.0 3.6 1.4 0.2 Setosa
Reference:
http://davetang.org/muse/2013/01/22/using-sql-on-r-data-frames/
Linux R Server:error [tcl] Unknown math function "min".