refine_upload {rrefine} | R Documentation |
Upload a file to OpenRefine
Description
This function attempts to upload contents of a file and create a new project in OpenRefine. Users can optionally navigate directly to the running instance to interact with the project. The function wraps the OpenRefine API /command/core/create-project-from-upload
query.
Usage
refine_upload(file, project.name = NULL, open.browser = FALSE, ...)
Arguments
file |
Path to file to upload; upload format is inferred from the file extension, and currently only ".csv" and ".tsv" files are allowed. |
project.name |
Optional parameter to specify name of the project to be created upon upload; default is |
open.browser |
Boolean for whether or not the browser should open on successful upload; default is |
... |
Additional parameters to be inherited by |
Value
Operates as a side-effect, either opening a browser and pointing to the OpenRefine instance (if open.browser=TRUE
) or issuing a message.
References
https://docs.openrefine.org/technical-reference/openrefine-api#create-project
Examples
## Not run:
fp <- system.file("extdata", "lateformeeting.csv", package = "rrefine")
refine_upload(fp, project.name = "lfm")
write.table(x = mtcars, file = "mtcars.tsv", sep = "\t")
refine_upload(file = "mtcars.tsv", project.name = "mtcars")
## End(Not run)