Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dirkschumacher/duckduckr

🦆🦆🚶 DuckDuckGo's Instant Answer API for R
https://github.com/dirkschumacher/duckduckr

api duckduckgo duckduckhack r

Last synced: 3 months ago
JSON representation

🦆🦆🚶 DuckDuckGo's Instant Answer API for R

Awesome Lists containing this project

README

        

---
output: github_document
---
[![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)

# DuckDuckR

This is a simple *R* client for [DuckDuckGo's Instant Answer API](https://duckduckgo.com/api).

## Install

### From CRAN
```{r, eval=FALSE}
install.packages("duckduckr")
```

### Latest development version
```{r, eval=FALSE}
devtools::install_github("dirkschumacher/duckduckr")
```

## Use
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

```{r}
library(duckduckr)
res <- duckduck_answer("ggplot")

# meta data of the call is part of the attributes
stopifnot(attr(res, "status") == "OK")

# the original http call
attr(res, "source")
```

```{r,eval=FALSE}
res$Abstract
```


`r res$Abstract`

 

## Contributing

If you found a bug or want to propose a feature, feel free to visit the [issues page](https://github.com/dirkschumacher/duckduckr/issues).