Progress {biodb} | R Documentation

## Progress class.

### Description

A class for informing user about the progress of a process.

### Details

This class displays progress of a process to user, and sends notifications of this progress to observers too.

### Methods

#### Public methods

- `Progress$new()`

- `Progress$increment()`

- `Progress$clone()`

#### Method `new()`

Initializer.

##### Usage

    Progress$new(biodb = NULL, msg, total)

##### Arguments

`biodb`

  A BiodbMain instance that will be used to notify observers of progress.

`msg`

  The message to display to the user.

`total`

  The total number of elements to process.

##### Returns

Nothing.

#### Method `increment()`

Increment progress.

##### Usage

    Progress$increment()

##### Returns

Nothing.

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    Progress$clone(deep = FALSE)

##### Arguments

`deep`

  Whether to make a deep clone.

### Examples

    # Create an instance
    prg <- biodb::Progress$new(msg='Processing data.', total=10)

    # Processing
    for (i in seq_len(10)) {
        print("Doing something.")
        prg$increment()
    }

[Package biodb version 1.2.2 Index]