Opens Anthropic's Claude AI assistant with your query. Claude can provide thorough answers to complex questions and offers excellent code explanations.
Usage
ask_claude(query = geterrmessage(), prompt = NULL)
See also
Other AI assistants:
ask_bing_copilot()
,
ask_chatgpt()
,
ask_meta_ai()
,
ask_mistral()
,
ask_perplexity()
Examples
# Basic query
ask_claude("Explain what purrr::map_df does")
#> Using prompts: default (claude)
#> Please type into your browser:
#> https://claude.ai/new?q=You%20are%20an%20R%20programming%20assistant.%20Focus%20on%20providing%20clear%20explanations%20and%20efficient%20code%20solutions.%20Explain%20what%20purrr::map_df%20does
# Using a custom prompt
ask_claude("Compare tidyr::pivot_wider vs tidyr::spread",
prompt = "Provide examples of when to use each:")
#> Using prompts: function call
#> Please type into your browser:
#> https://claude.ai/new?q=Provide%20examples%20of%20when%20to%20use%20each:%20Compare%20tidyr::pivot_wider%20vs%20tidyr::spread