title: tryCatch in R execute in case of error
body: <p>Is it possible to execute certain commands in case of error when using tryCatch in R ? I am using the code below but it does not execute X = alternative_value</p>
  
  <pre><code>tryCatch(
  {
    X = certain_function_that_sometimes_returns_error      
  },
  error=function(e) {
    X = alternative_value
  })
  </code></pre>