-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Deploying to gh-pages from @ bad5ca6 🚀
1 parent
0c0a8ac
commit 73b1430
Showing
11 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"path":"https://slap.tada.science/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 tada.science Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://slap.tada.science/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Romain François. Author, maintainer. tada.science. Copyright holder, funder.","code":""},{"path":"https://slap.tada.science/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"François R (2024). slap: Slap Light Alternative Plight. R package version 0.0.0.9000, http://tada.science/slap/, https://github.com/tadascience/slap.","code":"@Manual{, title = {slap: Slap Light Alternative Plight}, author = {Romain François}, year = {2024}, note = {R package version 0.0.0.9000, http://tada.science/slap/}, url = {https://github.com/tadascience/slap}, }"},{"path":"https://slap.tada.science/index.html","id":"slap-","dir":"","previous_headings":"","what":"Slap Light Alternative Plight","title":"Slap Light Alternative Plight","text":"goal slap …","code":""},{"path":"https://slap.tada.science/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Slap Light Alternative Plight","text":"can install development version slap like :","code":"pak::pak(\"tadascience/slap\")"},{"path":"https://slap.tada.science/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Slap Light Alternative Plight","text":"","code":"library(dplyr) library(slap) boom <- function() stop(\"An error occured in boom()\") # instead of: withCallingHandlers( summarise(mtcars, mpg = boom()), error = function(err) { cli::cli_abort(\"ouch\", parent = err) } ) # just use the slap operator, i.e. %!% summarise(mtcars, mpg = boom()) %!% \"ouch\" # or use the double slap operator for simpler error # i.e. without keeping the parent error summarise(mtcars, mpg = boom()) %!!% \"ouch\""},{"path":"https://slap.tada.science/reference/slap.html","id":null,"dir":"Reference","previous_headings":"","what":"Slap Operator — slap","title":"Slap Operator — slap","text":"Slap Operator","code":""},{"path":"https://slap.tada.science/reference/slap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Slap Operator — slap","text":"","code":"expr %!% message expr %!!% message"},{"path":"https://slap.tada.science/reference/slap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Slap Operator — slap","text":"expr expression quosure evaluate. message formatted via call cli_bullets().","code":""},{"path":"https://slap.tada.science/reference/slap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Slap Operator — slap","text":"","code":"g <- function() { stop(\"ouch\") } f <- function(error_call = current_env()) { g() %!% \"bam\" } h <- function() { rlang::local_error_call(quote(foo())) g() %!% \"bam\" } if (FALSE) { f() h() }"}] | ||
[{"path":"https://slap.tada.science/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 tada.science Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://slap.tada.science/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Romain François. Author, maintainer. tada.science. Copyright holder, funder.","code":""},{"path":"https://slap.tada.science/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"François R (2024). slap: Slap Light Alternative Plight. R package version 0.0.0.9000, http://tada.science/slap/, https://github.com/tadascience/slap.","code":"@Manual{, title = {slap: Slap Light Alternative Plight}, author = {Romain François}, year = {2024}, note = {R package version 0.0.0.9000, http://tada.science/slap/}, url = {https://github.com/tadascience/slap}, }"},{"path":"https://slap.tada.science/index.html","id":"slap-","dir":"","previous_headings":"","what":"Slap Light Alternative Plight","title":"Slap Light Alternative Plight","text":"goal slap simplify error handling.","code":""},{"path":"https://slap.tada.science/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Slap Light Alternative Plight","text":"","code":"pak::pak(\"tadascience/slap\")"},{"path":"https://slap.tada.science/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Slap Light Alternative Plight","text":"","code":"library(dplyr) library(slap) # suppose you have a function that throws an error boom <- function() stop(\"An error occured in boom()\") # and you want to use it in e.g. dplyr::summarise() # summarise(mtcars, mpg = boom()) # if you want to catch it and rethrow an error that is more # meaningful to you, one way is to use withCallingHandlers() withCallingHandlers( summarise(mtcars, mpg = boom()), error = function(err) { cli::cli_abort(\"ouch\", parent = err) } ) # but that's kind of boring, so instead you can use the # slap operator %!% to slap away the eror summarise(mtcars, mpg = boom()) %!% \"ouch\" # or the double slap operator %!!% if you don't want to keep the parent error summarise(mtcars, mpg = boom()) %!!% \"ouch\""},{"path":"https://slap.tada.science/reference/slap.html","id":null,"dir":"Reference","previous_headings":"","what":"Slap Operator — slap","title":"Slap Operator — slap","text":"Slap Operator","code":""},{"path":"https://slap.tada.science/reference/slap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Slap Operator — slap","text":"","code":"expr %!% message expr %!!% message"},{"path":"https://slap.tada.science/reference/slap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Slap Operator — slap","text":"expr expression quosure evaluate. message formatted via call cli_bullets().","code":""},{"path":"https://slap.tada.science/reference/slap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Slap Operator — slap","text":"","code":"g <- function() { stop(\"ouch\") } f <- function(error_call = current_env()) { g() %!% \"bam\" } h <- function() { rlang::local_error_call(quote(foo())) g() %!% \"bam\" } if (FALSE) { f() h() }"}] |