sharepoint_mount: Prepare a sharepoint link for reading

Description Usage Arguments Note Author(s) Examples

Description

This function is minimalistic wrapper for httr, with the intention of making it easy to read files from sharepoint using read_data.

Usage

1
2
3
4
5
6
7
8
9
sharepoint_mount(link)

sharepoint_link(link)

## S3 method for class 'sharepoint_link'
read_data(file, destination = NULL, ...)

## S3 method for class 'sharepoint_mount'
read_data(file, ...)

Arguments

link

A string starting with http.

file

An object returned from sharepoint_link.

destination

Optional: When sharepoint is not mounted, files are always downloaded before being read into R. The file is temporary if you do not set the destination.

...

Further arguments passed to read_data.

Note

This function requires httr if the drive is not mounted. User/password will be requested and stored for the current R session. Imporant that you don't share your .Rhistory after this!

Author(s)

Kristian D. Olsen

Examples

1
2
3
4
5
6
## Not run: 
# The gist of it:
read_data(sharepoint_link(your_server))
read_data(sharepoint_mount(your_server))

## End(Not run)

itsdalmo/officeR documentation built on May 18, 2019, 7:11 a.m.