How to read R errors through JRI

+1 vote

I'm trying to communicate with my R using JRI though java. If i try to get the result of my R-Code as Double i get a NullPointer. Normally this is caused by an error of R. Is it possible to get the output of the R-Console into Java in order to read the error?

Nov 8, 2018 in Data Analytics by Ali
• 11,360 points
974 views
Is you REngine a singleton?
Yess @Maverick, it is.

1 answer to this question.

0 votes

You'll be able to perform those R-Expressions, after the creation:

re.eval("log<-file('"+filepath+"')");
re.eval("sink(log, append=TRUE)");
re.eval("sink(log, append=TRUE, type='message')");

this codes writes every R-Output into the file specified by the String filepath.

answered Nov 8, 2018 by Maverick
• 10,840 points

Related Questions In Data Analytics

0 votes
1 answer

how to run a logistic regression with clustered standard errors in R?

have a look at rms package. lrm is logistic ...READ MORE

answered Nov 6, 2018 in Data Analytics by Kalgi
• 52,360 points
1,705 views
0 votes
0 answers

How to get the value passed through url from one page to another in R?

How to get the value passed through ...READ MORE

Oct 16, 2019 in Data Analytics by ch
• 3,450 points
539 views
0 votes
1 answer

How to read a CSV file in R?

Hi@akhtar, You can read your CSV file in ...READ MORE

answered Oct 29, 2020 in Data Analytics by MD
• 95,460 points
604 views
0 votes
1 answer

How to read an excel file in R?

Hi@akhtar, You can read your excel file by using the read.xlsx() function ...READ MORE

answered Oct 29, 2020 in Data Analytics by MD
• 95,460 points
513 views
0 votes
1 answer

Convert java code to R code

You can rjava package for this purpose. rJava is ...READ MORE

answered Nov 16, 2018 in Data Analytics by Maverick
• 10,840 points
3,675 views
0 votes
0 answers

How to use the where clause in R programming?

I'm trying to implement a where clause ...READ MORE

Dec 24, 2018 in Data Analytics by Sophie may
• 10,620 points
4,175 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 80,916 views
+1 vote
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
8,251 views
+1 vote
1 answer

How to give line numbers in errors in R?

Use the following command: options(show.error.locations = TRUE) READ MORE

answered Nov 8, 2018 in Data Analytics by Maverick
• 10,840 points
884 views
+1 vote
1 answer

How do i send R errors from console to standard java output?

R offers a command to save its ...READ MORE

answered Nov 8, 2018 in Data Analytics by Maverick
• 10,840 points
638 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP