Re: [R] A question on generating Error message upon Timeout

2019-05-11 Thread Rui Barradas
Hello, This solution works but when I've tried it, I realized it depends on the locale. In mine, pt_PT.UTF-8, the error message is in Portuguese and it failed. So I have two suggestions. 1) grep "Sys.sleep" in attr(n_Try, "condition") 2) not related but instead of length(grep(.)) > 0, logical

Re: [R] A question on generating Error message upon Timeout

2019-05-11 Thread Eric Berger
Hi Christofer, You have a number of misunderstandings. The first thing you could have tried in order to figure out what was going on was to remove the 'silent=TRUE' from the call to try(). This would then give you extra information, specifically that there was a timeout. The exact message that gets

[R] A question on generating Error message upon Timeout

2019-05-09 Thread Christofer Bogaso
Hi, I have created a function called myFn() which should be acting as below: 1. If function takes too long, then it will timeout and a specific message will be displayed 2. This function may generate error on its own, so if it evaluates before that specific time and fails then another specific me