Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Simplified example R

AuthorDaveJarvis <email>
Date2020-05-17 01:12:53 GMT-0700
Commit135ed17fcc3a5f26918b37a25d1527f360a2b61b
Parent758c28b
Delta8 lines added, 9 lines removed, 1-line decrease
USAGE-R.md
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**.