Skip to content

Yue-Jiang/rask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rask

[ɑːsk]

send error / warning / whatever to google or stackoverflow from within R

Installation

If you don't have devtools installed yet, go ahead and install it. Then rask can be installed from github by devtools::install_github("Yue-Jiang/rask").

The rask library provides two functions:

  • ask_google
  • ask_stackoverflow

Why am I getting this error / warning?

The reason for providing these functions, is mainly to allow user to search for error or warning messages without having to select and copy the messages when they occur, find the browser, go to Google or Stack Overflow and paste them in. For example, this gives an error:

a <- "Rick"
c(a, Morty)
Error: object 'Morty' not found

And we can ask google about this error message.

ask_google()

This will open up a browser tab showing google search results of this error message. Unless there is a new error message, the current error message will be preserved, in case you would like to try your luck on Stack Overflow instead later.

If what we got was a warning, specify a warning=TRUE argument as in ask_google(warning=TRUE). This will send a Google search for the latest warning you have in the history.

Similary, use ask_stackoverflow to send search to Stack Overflow. If no keyword is provided, ask_stackoverflow behaves the same as ask_google, except that it also adds a [R] tag to the end of the error / warning message to specify the R tag.

For some reason, I just want to search stuff from within R

If the keyword argument is provided, it will be used as the search keyword. ask_* will try to flatten whatever that's provided into a string. For example,

ask_google(c("Rick and Morty", "Pickle Rick"))

That's one of my favorite episodes.

About

send error / warning / whatever to google or stackoverflow from within R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages