Hi. Since nobody has answered my question, I just want to share my solution.

I did not find a way to load r package under r-extension, yet.

But I just used another way.

First of all, make a function you want to run in R, and create r-script file for your function.

In r-extension, we can load the r-script file without any error.

Now, you can use R for your function in your Netlogo model.

Anyway, if you find any solution for my problem, please let me know

Thank you.

---In

[hidden email], <youngjoon5@...> wrote :

Hi.

I am making a model using r-extension ("extensions [r]")

It works well except loading packages.

For example, r:eval "library(spatstat)".

The error message said it cannot find the package.

In the java console, I can find the same error message.

But, I have no problem to use R and load new packages in the Windows command prompt.

I also checked my system with rsystemcheck.

"Check Java" showed "Java version mismatch"

But I tried to use JAVA in the Netlogo folder, but I had the same message.

Regardless of this message, r-extension works except loading a package.

I googled it, and found others had the same problem, but there are no solution.

If anyone has a solution, please let me know.

FYI, I use Window 8.1(64bit). I am using 34bit R and Java. Of course, I tried to change 64bit version for R and Java, but nothing changed.

In addition, I used RNetlogo which is using rJava as well. It works well for all my purposes.

But you know it is slow and not a looking-good model, compared to r-extension.

So I prefer using r-extension.

Thank you.