create_dataset {Rcurvep}R Documentation

Create concentration-response datasets that can be applied in the run_rcurvep()

Description

The input dataset is created either by summarizing the response data or by simulating the response data.

Usage

create_dataset(d, n_samples = NULL, vdata = NULL)

Arguments

d

Datasets with concentration-response data. Examples are zfishbeh and zfishdev.

n_samples

NULL (default) for not to simulate responses or an integer number to indicate the number of responses per concentration to simulate.

vdata

NULL (default) for not to simulate responses or a vector of numeric responses in vehicle control wells to use as error. This parameter only works when n_samples is not NULL; an experimental feature.

Details

Curvep requires 1-to-1 concentration response relationship. For the dataset that does not meet the requirement, the following strategies are applied:

Summary (when n_samples = NULL)

Simulation (when n_samples is a positive integer)

Value

The original dataset with a new column, sample_id (if n_samples is not NULL) or the summarized dataset with columns as zfishbeh.

See Also

run_rcurvep()

Examples


# datasets with continuous response data
data(zfishbeh)

## default
d <- create_dataset(zfishbeh)

## add samples
d <- create_dataset(zfishbeh, n_samples = 3)

## add samples and vdata
d <- create_dataset(zfishbeh, n_samples = 3, vdata = rnorm(100))

# dataset with dichotomous response data
data(zfishdev)

## default
d <- create_dataset(zfishdev)

## add samples
d <- create_dataset(zfishdev, n_samples = 3)


[Package Rcurvep version 1.3.1 Index]