[R] Error: if statement: missing value where TRUE/FALSE needed

Ivan Krylov
2022-01-05T18:22:37Z

On Wed, 5 Jan 2022 15:47:07 +0000 (UTC)
Chuck Coleman via R-help <r-help at r-project.org> wrote:

> I then made the browser() statement conditional to stop execution if
> a missing argument were encountered and detectspikes() happily passed
> it and crashed.

How exactly do you check for a missing argument?

Could options(error = recover) shed some more light on the situation?
This way a crash happens first, then you get to use browser() to take a
look at the environment at the time of the crash.

--
Best regards,
Ivan