osf_tbl | R Documentation |
Items retrieved from OSF are represented as osf_tbl
objects, specialized
data frames based on the tibble class. See below
for additional details.
Each row of an osf_tbl
represents a single OSF entity. This could be a
user, project, component, directory, or file. An osf_tbl
must include
the following 3 columns:
name
: indicates the name or title of the entity.
id
: the unique identifier assigned by OSF.
meta
: a list-column that stores the processed response returned by OSF's
API. See the Meta column section below for more information.
osf_tbl
is the parent class of 3 subclasses that are used to represent
each of OSF's main entities:
osf_tbl_user
for users.
osf_tbl_file
for files and directories.
osf_tbl_node
for projects and components.
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.
The meta
column contains all of the information returned from OSF's API for
a single entity, structured as a named list with 3 elements:
attributes
contains metadata about the entity (e.g., names,
descriptions, tags, etc).
links
contains urls to API endpoints with alternative representations of
the entity or actions that may be performed on the entity.
relationships
contains URLs to other entities with relationships to the
entity (e.g., collaborators attached to a project).
This information is critical for osfr
's internal functions and should not
be altered by users. For even more information about these elements, see
OSF's API documentation.
Our implementation of the osf_tbl
class is based on dribble
objects from
the googledrive package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.