rockr.file_upload: Upload a file

Description Usage Arguments Value See Also Examples

View source: R/file.R

Description

Upload a file into the Rocker R session working directory.

Usage

1
2
3
4
5
6
7
rockr.file_upload(
  conn,
  source,
  destination = NULL,
  overwrite = FALSE,
  temp = FALSE
)

Arguments

conn

A rockr connection object.

source

Path to the file in the local file system.

destination

Path of the destination file in the Rocker R session. Root folder is the session's home or temporary folder (see 'temp' parameter). If empty (default behavior), the destination file name will be the same as the source one.

overwrite

Overwrite the destination file if TRUE. Default is FALSE.

temp

Logical to specify whether the root folder is the R session's home or the temporary folder. Default is FALSE.

Value

Void

See Also

Other file functions: rockr.file_download()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
conn <- rockr.connect(username='user', password='password',
                      url='https://rocker-demo.obiba.org')
rockr.open(conn)
# upload a file
rockr.file_upload(conn, 'data.csv')
# download, create destination folder and rename file
rockr.file_upload(conn, 'DatabaseTest.sav', '/spss/test.sav')
# upload a folder
rockr.file_upload(conn, 'input')
rockr.close(conn)

## End(Not run)

rockr documentation built on March 12, 2021, 5:06 p.m.