Skip to content

function call from another r file

6 messages · Barry Rowlingson, sheenmaria, David Winsemius

#
On Sat, Nov 24, 2012 at 12:26 PM, Suzen, Mehmet <msuzen at gmail.com> wrote:
And better than best is to use devtools to save you a fiddly
edit/build/install cycle. You don't even have to think of it as a
package, its just a folder called R with your .R files in, and a
DESCRIPTION file (metadata is always a good thing), and your functions
get attached in a separate position so they don't clutter ls(), and
load_all() will load the just the ones you've edited. Magic.

 http://rpubs.com/geospacedman/lazydevtools

Easy peasy.

Barry
1 day later
#
Thanks for the reply .I am able to call a simple function in an R file from
another by using source().
Now I am facing another issue .I am trying to call a r file named es.r which
have lotes of R functions.
These R functions are internally calling java functions by using ".jnew()"
and ".jcall()". I have added 
necessary jar's to the Classpath and I am able to run es.r from command
prompt .

         But when I tried to call it from anoter r file using source()
getting Exception 
Error in .jnew("com/algoTree/ClientElasticSearch/ElasticSearchLoader") :
 java.lang.ClassNotFoundException

        How can I solve this ?





--
View this message in context: http://r.789695.n4.nabble.com/function-call-from-another-r-file-tp4650627p4650805.html
Sent from the R help mailing list archive at Nabble.com.
#
On Nov 25, 2012, at 8:50 PM, sheenmaria wrote:

            
Did your es.r file have an initial command that loaded rJava?