| Author | DaveJarvis <email> |
|---|---|
| Date | 2020-05-17 01:12:53 GMT-0700 |
| Commit | 135ed17fcc3a5f26918b37a25d1527f360a2b61b |
| Parent | 758c28b |
| Delta | 8 lines added, 9 lines removed, 1-line decrease |
| 1. Append the following: | ||
| ``` r | ||
| - x <- function( s ) { | ||
| - tryCatch({ | ||
| - r = eval( parse( text = s ) ) | ||
| + x <- function( s ) { | ||
| + tryCatch( { | ||
| + r = eval( parse( text = s ) ) | ||
| - if( is.atomic( r ) ) { r } | ||
| - else { s } | ||
| - }, | ||
| - warning = function( w ) { s }, | ||
| - error = function( e ) { s }) | ||
| - } | ||
| + ifelse( is.atomic( r ), r, s ); | ||
| + }, | ||
| + warning = function( w ) { s }, | ||
| + error = function( e ) { s } ) | ||
| + } | ||
| ``` | ||
| 1. Click **OK**. |