Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/yonicd/paperpile


https://github.com/yonicd/paperpile

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# paperpile

[![stability-experimental](https://img.shields.io/badge/stability-experimental-orange.svg)]()

The goal of paperpile is to interact with paperpile from `R`.

## Installation

You can install the package by cloning and installing locally

## Example

This is a basic example which shows you how to solve a common problem:

```{r example}
library(paperpile)
```

## Querying

### Default

```{r}
query('Holford and Sheiner 1981')
```

### Exact matches

```{r}
query('Holford and Sheiner 1981 - Pharmacokinetic and pharmacodynamic modeling in vivo.pdf',
operator = '=')
```

```{r}
query('Holford and Sheiner 1981',operator = '=')
```

## Download file to local machine

```{r}
query('Holford and Sheiner 1981')%>%fetch()
```

## Interacting with exported bib file from paperpile
### Read in bib file as list

```{r}
bib <- paperpile::parse_bib()
```

### Convert the list to a tibble

```{r}
bib_tbl <- bib%>%
bibble()

bib_tbl
```

### Filter the tibble using tidyverse packages

```{r}
sub_bib <- bib_tbl%>%
dplyr::filter(grepl('Knebel W',author,ignore.case = TRUE))

sub_bib

```

### Write subset of original bib file as new smaller bib file

Give directly cite keys

```{r}
sub_bib$key[1:5]
write_bib(sub_bib$key[1:5])
```

Pipe the bibble object directly

```{r,eval=FALSE}
sub_bib%>%write_bibble()
```

bib output

```{r,echo=FALSE}
sub_bib%>%write_bibble()
```