Yes.I have added
#!/usr/bin/Rscript
library(rJava)
.jinit()
in the beginning of es.r


On Mon, Nov 26, 2012 at 11:14 AM, David Winsemius [via R] <
ml-node+s789695n4650807h44@n4.nabble.com> wrote:

>
> On Nov 25, 2012, at 8:50 PM, sheenmaria wrote:
>
> > 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 ?
> >
>
> Did your es.r file have an initial command that loaded rJava?
>
> --
>
> David Winsemius, MD
> Alameda, CA, USA
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4650807&i=0>mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/function-call-from-another-r-file-tp4650627p4650807.html
>  To unsubscribe from function call from another r file, click here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4650627&code=c2hlZW5tYXJpYTZAZ21haWwuY29tfDQ2NTA2Mjd8LTE4MTE2NzMxMA==>
> .
> NAML<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://r.789695.n4.nabble.com/function-call-from-another-r-file-tp4650627p4650810.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]


