Skip to content

Commit

Permalink
Fix: added the wrong correction, in the precendent commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas CHABALIER committed Mar 8, 2024
1 parent f903365 commit caf12e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/org/math/R/AbstractR2jsSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ protected String convertRtoJs(String e) throws RException {
// modify them in this function
quotesList = replaceQuotesByVariables(e, 1);

// Get the expression with replaced quotes (it's the first element of
// the returned list)
e = quotesList.get(0);

//1E-8 -> 1*10^-8
//e = e.replaceAll("(\\d|\\d\\.)[eE]+([+-])*(\\d)", "$1*10^$2$3");
Matcher m = Pattern.compile("(\\d|\\d\\.)+[eE]+([+-])*(\\d*)").matcher(e);
Expand All @@ -395,9 +399,7 @@ protected String convertRtoJs(String e) throws RException {
}
}

// Get the expression with replaced quotes (it's the first element of
// the returned list)
e = quotesList.get(0);


checkExpressionValidity(e);

Expand Down

0 comments on commit caf12e9

Please sign in to comment.