FileCabinet: R6 class for a cabinet

Description Public fields Methods Examples

Description

Constructs an R6 class of FileCabinet. Objects of class FileCabinet contain information that is used by new_cabinet_proj() to create project directories.

Public fields

name

cabinet name.

directory

the path to where future directories will be created, a string.

structure

the directory structure, a list.

Methods

Public methods


Method new()

Usage
FileCabinet$new(name, directory, structure)
Arguments
name

cabinet name.

directory

the path to where future directories will be created, a string.

structure

the directory structure, a list.

Details

Create a new 'FileCabinet' object.

Returns

A cabinet object.

Examples
FileCabinet$new("test", "a/path",
                list(code = NULL, 'data/derived' = NULL, 'data/source' = NULL))

Method print()

Usage
FileCabinet$print()
Details

Print an object of class FileCabinet.


Method clone()

The objects of this class are cloneable with this method.

Usage
FileCabinet$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

1
2
3
4
5
6
## ------------------------------------------------
## Method `FileCabinet$new`
## ------------------------------------------------

FileCabinet$new("test", "a/path",
                list(code = NULL, 'data/derived' = NULL, 'data/source' = NULL))

nt-williams/cabinets documentation built on Nov. 10, 2020, 6:14 p.m.