Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

After installing Weka/RWeka in R, you may get this error if you try to load RWeka in the same session:

require(RWeka)

 Cannot create Java virtual machine (-4) Error : .onLoad failed in 'loadNamespace' for 'RWeka' 

Solution: Just close R and re-open it.

Cause: Apparently the installation requires some initialization.

Tested on R 2.10.1 on Windows XP.