rest_PUT: Create a file

Description Usage Arguments Examples

Description

Create a file

Usage

1
rest_PUT(x, repo, path, message, branch = "master", sha = NULL, ...)

Arguments

x

A data.frame

repo

(character) Repository name

path

(character) Path to file from root of repo

message

(character) Commmit message

branch

(character) Branch to use

sha

(character) The blob SHA of the file being replaced

...

Curl options passed on to PUT

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
options(github_name = "Scott Chamberlain")
options(github_email = "myrmecocystus@gmail.com")

# From a data.frame
row.names(mtcars) <- NULL
rest_PUT(mtcars, repo = "sckott/testeasy", path = "mtcars.csv",
   message = "putting up mtcars, from a data.frame")

# From a file
write.csv(mtcars, file="~/mtcars.csv")
rest_PUT("~/mtcars.csv", repo = "sckott/testeasy", path = "mtcars.csv",
   message = "putting up mtcars, from a file")

## End(Not run)

sckott/resteasy documentation built on May 29, 2019, 4:04 p.m.