Learn R Programming

Epoch (version 1.0.3)

EpochDownloader: EpochDownloader constructor

Description

Manually update the project list from the remote repository. This function will attempt to download the latest configuration from the GitHub repository. If it fails, the current configuration will remain unchanged.

This function returns the list of available projects. If the configuration has not been fetched yet, it will automatically update the project list from the remote repository.

Usage

EpochDownloader(id = NULL, progress = TRUE, verbose = FALSE, path = NULL)

# S4 method for EpochDownloader names(x)

# S4 method for EpochDownloader [(x, i)

# S4 method for EpochDownloader $(x, name)

# S4 method for EpochDownloader [[(x, i)

# S4 method for EpochDownloader show(object)

# S4 method for EpochDownloader length(x)

wiki(x, ...)

# S4 method for EpochDownloader wiki(x)

updateRepos(verbose = FALSE)

EpochRepos(verbose = TRUE)

Value

EpochDownloader: An EpochDownloader object.

names: A character vector of file names.

[: A named list of Epoch objects. The names are the dataset names.

$: A single Epoch object.

[[: A single Epoch object.

show: Prints a summary of the EpochDownloader object.

length: Returns the number of files in the EpochDownloader object.

wiki: Opens the wiki page in the default browser

updateRepos: No return value, called for side effects.

EpochRepos: A list of project names and their corresponding OSF project IDs.

Arguments

id

Either the ID of an OSF project or the name of an iEEG projects (case insensitive). Check the available projects using EpochRepos(). The default points to the fragility data from the Fragility multi-center retrospective study.

progress

Logical indicating whether to show progress during download.

verbose

Logical indicating whether to show messages

path

The path to the temporary folder where the files will be downloaded.

x

An EpochDownloader object.

i

Index or name of the files to be accessed.

name

The name of the file to be accessed.

object

An EpochDownloader object.

...

Not used, for future extensibility

Examples

Run this code
# list all available projects
EpochRepos()

# downloader for the fragility data
dl <- EpochDownloader(id = "fragility")

# list all Epoch objects in the downloader
names(dl)

# download the first Epoch object
# \donttest{
 dl[1]
 # equivalent to (index by name)
 dl[names(dl)[1]]
# }

# download the multiple Epoch objects
# \donttest{
 dl[c(1, 2)]
 # equivalent to (index by name)
 dl[names(dl)[c(1, 2)]]
# }

EpochRepos()

Run the code above in your browser using DataLab