gist_create_obj( x =NULL, description ="", public =TRUE, browse =TRUE, pretty =TRUE, filename ="file.txt",...)
Arguments
x: An R object, any of data.frame, matrix, list, character, numeric
description: (character) Brief description of gist (optional)
public: (logical) Whether gist is public (default: TRUE)
browse: (logical) To open newly create gist in default browser (default: TRUE)
pretty: (logical) For data.frame and matrix objects, create a markdown table. If FALSE, pushes up json. (default: TRUE)
filename: Name of the file to create. Default: file.txt
...: Further args passed on to crul::verb-POST
Details
This function is specifically for going from R objects to a gist, whereas gist_create() is for going from files or executing code
Examples
## Not run:## data.frame### by default makes pretty table in markdown formatrow.names(mtcars)<-NULLgist_create_obj(mtcars)gist_create_obj(iris)### or just push up jsongist_create_obj(mtcars, pretty =FALSE)## matrixgist_create_obj(as.matrix(mtcars))## listgist_create_obj(apply(mtcars,1, as.list))## charactergist_create_obj("hello, world")## numericgist_create_obj(runif(10))## Assign a specific file namegist_create_obj("
## header2hey there!", filename = "my_markdown.md")## End(Not run)