Ephemeral File, Text or R Data Sharing with ‘file.io’
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.
The following functions are implemented:
fi_post_file
: Post a file to file.iofi_post_rdata
: Post an R object to file.iofi_post_text
: Post text to file.iodevtools::install_github("hrbrmstr/fileio")
library(fileio)
# current verison
packageVersion("fileio")
## [1] '0.2.0'
(x <- fi_post_file(system.file("extdat", "tst.txt", package = "fileio")))
## success key link expiry
## 1 TRUE ouNU6O https://file.io/ouNU6O 14 days
readLines(con <- url(x$link), warn = FALSE)
## [1] "Hi Noam!"
close(con)
(x <- fi_post_text("Hi Noam!", "2d"))
## success key link expiry
## 1 TRUE lWCpV2 https://file.io/lWCpV2 14 days
readLines(con <- url(x$link), warn = FALSE)
## [1] "Hi Noam!"
close(con)
fi_post_rdata(
list(
mtcars = mtcars,
iris = iris,
message = "Hi Noam!"
)
) -> x
str(
readRDS(con <- url(x$link)),
1
)
## List of 3
## $ mtcars :'data.frame': 32 obs. of 11 variables:
## $ iris :'data.frame': 150 obs. of 5 variables:
## $ message: chr "Hi Noam!"
close(con)
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.