Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/hrbrmstr/fileio

⏳ Ephemeral File, Text or R Data Sharing with 'file.io'
https://github.com/hrbrmstr/fileio

fileio r rstats

Last synced: 23 days ago
JSON representation

⏳ Ephemeral File, Text or R Data Sharing with 'file.io'

Awesome Lists containing this project

README

        

---
output: rmarkdown::github_document
---

[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/fileio.svg?branch=master)](https://travis-ci.org/hrbrmstr/fileio)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/hrbrmstr/fileio?branch=master&svg=true)](https://ci.appveyor.com/project/hrbrmstr/fileio)
[![Coverage Status](https://img.shields.io/codecov/c/github/hrbrmstr/fileio/master.svg)](https://codecov.io/github/hrbrmstr/fileio?branch=master)

# fileio

Ephemeral File, Text or R Data Sharing with 'file.io'

## Description

The 'file.io' service enables ephemeral, convenient
and anonymous file sharing. Methods are provided to upload existing files,
R data objects or text messages to this service.

## What's Inside The Tin

The following functions are implemented:

- `fi_post_file`: Post a file to file.io
- `fi_post_rdata`: Post an R object to file.io
- `fi_post_text`: Post text to file.io

## Installation

```{r eval=FALSE}
devtools::install_github("hrbrmstr/fileio")
```

```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
options(width=120)
```

## Usage

```{r message=FALSE, warning=FALSE, error=FALSE}
library(fileio)

# current verison
packageVersion("fileio")

```

### Post a file

```{r}
(x <- fi_post_file(system.file("extdat", "tst.txt", package = "fileio")))

readLines(con <- url(x$link), warn = FALSE)

close(con)
```

### Post text

```{r}
(x <- fi_post_text("Hi Noam!", "2d"))

readLines(con <- url(x$link), warn = FALSE)

close(con)
```

### Post R data

```{r}
fi_post_rdata(
list(
mtcars = mtcars,
iris = iris,
message = "Hi Noam!"
)
) -> x

str(
readRDS(con <- url(x$link)),
1
)

close(con)
```

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.