get.OSFfile: get.OSFfile

Description Usage Arguments Details Value Author(s) See Also Examples

Description

get.OSFfile

Usage

1
2
3
get.OSFfile(code, dir = tempdir(), scanMethod,
  downloadMethod = c("httr", "downloader", "curl"), dataSet = TRUE,
  dfCln = FALSE)

Arguments

code

Either a full url ("https://osf.io/XXXXX/"), or just the OSF code.

dir

Output location (default is tempdir()).

scanMethod

Either readLines or RCurl. Leave missing to choose automatically.

downloadMethod

One of httr (default), downloader or curl.

dataSet

Is the file data set which can be imported using import from package rio?

dfCln

Should the variable names be cleaned (replace spaces and punctuation by a period "."). Default is FALSE.

Details

Function to download a file hosted on OSF. Modified from code originally written by Sacha Epskamp.

Value

A list object with fields:

Author(s)

Fred Hasselman, based on code by Sasha Epskamp

See Also

Other "get." functions: get.GoogleSheet, get.Order, get.analyses, get.zavCode

Examples

1
2
#Get the RP:P data hosted on OSF.
## Not run: dfRPP <- get.OSFfile(code='https://osf.io/fgjvw/', dfCln=TRUE)$df

ManyLabsOpenScience/manylabRs documentation built on May 14, 2019, 5:21 p.m.