I need to learn how to set up two methods (java functions) so I can call them
from R.
Currently I just copy and paste R code into the R console. 
A little piece of the R code inside a loop is:
      linTm <- linTimOfCalStg(dta[i,timCol],tlev) 
      calCk <- calStgOfLinTim(linTm,tlev) 
      if(calCk!=dta[i,timCol]) { 
        print(c(i,dta[i,timCol],linTm,calCk),digits=20) 
        stop("incorrect time conversion") 
      } 
The two functions called have these first lines:
linTimOfCalStg <- function(calStg,tlev) and 
calStgOfLinTim <- function(linTm, tlev) 
which in java substitutes are: 
public final static double linTimOfCalqsStg(String calStg,int tlev)  and  
public final static String calqsStgOfLinTim(double linTm,int tlev) 
both in a java class called "CalqsLin.class" compiled from "CalqsLin.java".
The R code works.
The purpose of all this is to eliminate duplicate subroutines and 
their duplicate checking ln both languages.
There will be several other subroutines that I will also use in both
languages.
I can start by putting everything into a single directory in Windows seven
to learn.
How do I make this substitution?




--
View this message in context: 
http://r.789695.n4.nabble.com/How-do-I-use-simple-calls-to-java-methods-tp4678753.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org 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.

Reply via email to