I used following:
<<JLink`;
InstallJava[];
ReinstallJava[JVMArguments->(*"-Xmx1024m"*)(*"-Xmx2048m"*)(*"-Xmx4096m"*)"-Xmx8192m"];
rPath="C:\\Program Files\\R\\R-3.3.0";
InstallR["RHomeLocation"->rPath,"RVersion"->"3.3.0","JRELocation"->"D:\\Program Files\\Wolfram Research\\Mathematica\\11.1\\SystemFiles\\Java\\Windows-x86-64\\bin\\javaw.exe -Xmx8192m"]
REvaluate["1+1"]
REvaluate["library(RODBC)"];
REvaluate["sink(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\Muhammad Ali\\\\output.txt\")"]
REvaluate["channel <- odbcDriverConnect(\"Driver={SQL Server};Server=xxxx;Database=xxxx;uid=xxxx;pwd=xxxx\")"]
REvaluate["med <- sqlQuery(channel, \"SELECT Count_OP, Count_IP, age_group, nationality_group, Gender, class_room_type, LOG(exposure_2017_2018) AS 'log_exposure_2017_2018' FROM xxxx.dbo.per_person_records WHERE class_room_type NOT IN('MG3-Suit','MG8-Semi Private')\")"];
REvaluate["med$Count_OP[is.na(med$Count_OP)] <- 0"];
REvaluate["med$Count_IP[is.na(med$Count_IP)] <- 0"];
Then get the following error in the picture below:
Please help what should i do? Btw if i run this directly in R it works fine.
