IDEMSInternational / R-Instat

A statistics software package powered by R
http://r-instat.org/
GNU General Public License v3.0
38 stars 103 forks source link

Error in calculation throws me out of R-Instat? #6681

Open rdstern opened 3 years ago

rdstern commented 3 years ago

I am testing the calculator and using regex with the character keyboard.

Try typing this into RStudio or into the script window in R-Instat.

library(stringr)
str_count(c("rss","r.s.t"),".")
str_count(c("rss","r.s.t"),"\\.")
str_count(c("rss","r.s.t"),"\.")

The result is 3, 5 from line 2 and 0. 2 from line 3. Line 4 gives an error: In RStudio it is:

Error: '\.' is an unrecognized escape in character string starting ""\."

(I knew it was an error, but was curious to see the message.)

in R-Instat there is no error message. I am thrown out of the software! That's not fair! When I run from the master it doesn't give an error or anything. I just am able to hit Start again! Can we trap this?

Wycklife commented 3 years ago

@africanmathsinitiative/developers I am improving the character keyboard. So may be this can wait to avoid conflicts.

anastasia-mbithe commented 1 year ago

@lloyddewit, I think this might be an issue for the script window.

When I run str_count(c("rss","r.s.t"),"\.") , from the Calculations dialog (character keyboard), it gives me this bug, which is okay and I still get to remain on R-Instat. image

But when I have the same code str_count(c("rss","r.s.t"),"\.") in the script window it throws me out and I have to run it again from Visual studio.

lloyddewit commented 1 year ago

@anastasia-mbithe Thank you for flagging this. I will look into how to handle this error correctly in the script window.