/README.md

https://github.com/dirkschumacher/duckduckr · Markdown · 51 lines · 35 code · 16 blank · 0 comment · 0 complexity · ddd9d6a4d3e309060e34cbcddf7cdfee MD5 · raw file

  1. [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/duckduckr)](https://cran.r-project.org/package=duckduckr) [![Build Status](https://travis-ci.org/dirkschumacher/duckduckr.svg?branch=master)](https://travis-ci.org/dirkschumacher/duckduckr) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/dirkschumacher/duckduckr?branch=master&svg=true)](https://ci.appveyor.com/project/dirkschumacher/duckduckr) [![Coverage Status](https://img.shields.io/codecov/c/github/dirkschumacher/duckduckr/master.svg)](https://codecov.io/github/dirkschumacher/duckduckr?branch=master) [![](http://cranlogs.r-pkg.org/badges/duckduckr)](http://cran.rstudio.com/web/packages/duckduckr/index.html)
  2. DuckDuckR
  3. =========
  4. This is a simple *R* client for [DuckDuckGo's Instant Answer API](https://duckduckgo.com/api).
  5. Install
  6. -------
  7. ### From CRAN
  8. ``` r
  9. install.packages("duckduckr")
  10. ```
  11. ### Latest development version
  12. ``` r
  13. devtools::install_github("dirkschumacher/duckduckr")
  14. ```
  15. Use
  16. ---
  17. ``` r
  18. library(duckduckr)
  19. res <- duckduck_answer("ggplot")
  20. # meta data of the call is part of the attributes
  21. stopifnot(attr(res, "status") == "OK")
  22. # the original http call
  23. attr(res, "source")
  24. #> [1] "https://api.duckduckgo.com/?q=ggplot&no_redirect=0&no_html=0&format=json&skip_disambig=0&t=duckduckr"
  25. ```
  26. ``` r
  27. res$Abstract
  28. ```
  29. <blockquote>
  30. ggplot2 is a data visualization package for the statistical programming language R. Created by Hadley Wickham in 2005, ggplot2 is an implementation of Leland Wilkinson's Grammar of Graphics—a general scheme for data visualization which breaks up graphs into semantic components such as scales and layers. ggplot2 can serve as a replacement for the base graphics in R and contains a number of defaults for web and print display of common scales. Since 2005, ggplot2 has grown in use to become one of the most popular R packages. It is licensed under GNU GPL v2.
  31. </blockquote>
  32.  
  33. Contributing
  34. ------------
  35. If you found a bug or want to propose a feature, feel free to visit the [issues page](https://github.com/dirkschumacher/duckduckr/issues).