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: 9 months ago
JSON representation
⏳ Ephemeral File, Text or R Data Sharing with 'file.io'
- Host: GitHub
- URL: https://github.com/hrbrmstr/fileio
- Owner: hrbrmstr
- Created: 2018-05-03T15:09:35.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-04T01:58:53.000Z (about 8 years ago)
- Last Synced: 2024-08-06T03:04:55.342Z (almost 2 years ago)
- Topics: fileio, r, rstats
- Language: R
- Homepage: https://www.youtube.com/watch?v=usXZNnc0JK4
- Size: 31.3 KB
- Stars: 23
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: rmarkdown::github_document
---
[](https://travis-ci.org/hrbrmstr/fileio)
[](https://ci.appveyor.com/project/hrbrmstr/fileio)
[](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.