s3_path_to_full_df: Read a full file from S3, using the full path to the file...

Description Usage Arguments Value Examples

View source: R/parse_s3_data.R

Description

This function will attempt to read the file directly, as a dataframe. If this is not possible it will download the file to a temporary location and load it. At present the function supports direct reading of CSV, TSC, XLS, and XLSX file types. You can add options to the read function that are compatible with readxl::read_excel() and read.csv(). See their help files for more info.

Usage

1

Arguments

path

a string - the full path to the file including the bucketname

Value

a tibble (dataframe)

Examples

1
2
3
4
5
df <- s3_read_path_to_df("alpha-moj-analytics-scratch/folder/file.csv")
df <- s3_read_path_to_df("alpha-moj-analytics-scratch/folder/file.tsv")
df <- s3_read_path_to_df("alpha-moj-analytics-scratch/folder/file.xls")
df <- s3_read_path_to_df("alpha-moj-analytics-scratch/folder/file.xls", sheet = 1)
filelocation <- s3_read_path_to_df("alpha-moj-analytics-scratch/folder/file.png")

moj-analytical-services/s3tools documentation built on Sept. 13, 2021, 5:31 a.m.