Skip to contents

The search_grep() function searches all public code on GitHub using grep.app by querying: https://grep.app/search?q=<query-here>&filter[lang][0]=R

Usage

search_grep(query = geterrmessage(), rlang = TRUE)

Arguments

query

Contents of string to search. Default is the error message.

rlang

Search for results written in R. Default is TRUE

Value

The generated search URL or an empty string.

See also

Other code repositories: search_bitbucket(), search_github()

Examples

# Search R code on GitHub for numerical optimization
search_grep("optim")
#> Please type into your browser:
#> https://grep.app/search?q=optim%20%26filter%5Blang%5D%5B0%5D%3DR

# Search all code on GitHub for numerical optimization
search_grep("optim", rlang = FALSE)
#> Please type into your browser:
#> https://grep.app/search?q=optim