Learn R Programming

osfr (version 0.2.3)

osf_tbl: OSF Tibbles

Description

Items retrieved from OSF are represented as osf_tbl objects, specialized data frames based on the tibble class. See below for additional details.

Arguments

Subclasses

osf_tbl is the parent class of 3 subclasses that are used to represent each of OSF's main entities:

  1. osf_tbl_user for users.

  2. osf_tbl_file for files and directories.

  3. osf_tbl_node for projects and components.

OSF nodes

Projects and components are both implemented as nodes on OSF. The only distinction between the two is that a project is a top-level node, and a component must have a parent node (i.e., must be a sub-component of another project or component). Because projects and components are functionally identical, osfr uses the same osf_tbl_node class to represent both.

Acknowledgments

Our implementation of the osf_tbl class is based on dribble objects from the googledrive package.

Details

Each row of an osf_tbl represents a single OSF entity, which could be a user, project, component, directory, or file. An osf_tbl must include the following 3 variables:

  1. name: the name or title of the entity.

  2. id: the unique identifier assigned to the entity.

  3. meta: a list-column that stores the processed response returned by OSF's API.

The meta column is primarily intended for use by osfr's functions and should not be altered by users.