solveCell {wpm} | R Documentation

## Affects a sample to the chosen cell in the plate

### Description

This function chooses a sample randomly from among those who respect the neighborhood constraints and who have not yet been assigned to a well.

### Usage

    solveCell(m, d, i, j, already_drawn, constraint)

### Arguments

`m` | Matrix representing the plate plan.
`d` | Dataframe containing the samples to place.
`i` | Line index of the chosen well.
`j` | Column index of the chosen well.
`already_drawn` | Vector of samples already affected to wells.
`constraint` | Character. Corresponds to the neighborhood constraint mode.

### Value

If there is no possibility to find a valid sample, the function returns an error value (1). If a sample is chosen, then this function returns two objects: * __m__ The matrix updated with the new added sample. * __already_drawn__ The vector of already placed samples updated.

[Package wpm version 1.2.1 Index]