-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
88 lines (59 loc) · 1.84 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
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' <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.