s3PutFile | R Documentation |
Convention based wrapper functions that allow to save data in S3
s3PutFile(dt, path, bucket = s3DefaultBucket(), root = s3DefaultRoot(), ...) s3PutFile.csv( dt, path, bucket = s3DefaultBucket(), root = s3DefaultRoot(), na.value = "" ) s3PutFile.gz( dt, path, bucket = s3DefaultBucket(), root = s3DefaultRoot(), na.value = "" ) s3PutFile.rds(dt, path, bucket = s3DefaultBucket(), root = s3DefaultRoot()) s3PutFile.json.gz(dt, path, bucket = s3DefaultBucket(), root = s3DefaultRoot())
dt |
data.table to save |
path |
S3 object path starting after root folder. |
bucket |
name of the S3 bucket.
Defaults to value in |
root |
project root path that is appended before the path, e.g. "/prod/".
Defaults to value in |
... |
additional parameters that will be passed into extension specific call. |
na.value |
the string to use for missing values in the data. Defaults to empty string. |
Environment variables required for aws.s3 access:
AWS_ACCESS_KEY_ID
= "mykey"
AWS_SECRET_ACCESS_KEY
= "mysecretkey"
AWS_DEFAULT_REGION
= "us-east-1"
AWS_SESSION_TOKEN
= "mytoken"
TRUE if data was saved to S3.
's3PutFile.csv' saves data into '.csv' file in S3.
's3PutFile.gz' saves data into '.gz' (csv archived) file in S3.
's3PutFile.rds' saves data as '.rds' file in S3
's3PutFile.json.gz' saves data as '.json.gz' (json archived) file in S3
aws.s3 package documentation for access details: https://github.com/cloudyr/aws.s3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.