rotorUnequal {centrifugeR}R Documentation

Balance Tubes of Unequal Mass

Description

rotorUnequal returns the required masses and the positions of tubes of unequal initial mass.

Usage

rotorUnequal(n, mass = NULL, seed = 2019)

Arguments

n

an integer, the number of rotor buckets.

mass

a numeric vector with optional names attribute, the masses (and optional names) of tubes.

seed

an integer, the seed for random number generation. Setting a seed ensures the reproducibility of the result. See set.seed for more details.

Details

The number of rotor buckets n ranges from 4 to 48. The number of tubes (i.e. length(mass)) should not be greater than the number of rotor buckets n.

If mass is not specified, the names and the masses of tubes must then be taken from the keyboard. In case mass has no names attribute, tubes will be named automatically (i.e. S1, S2, S3, etc.).

Value

rotorUnequal returns a data frame with three columns:

initial

a vector containing the initial masses of tubes.

required

a vector containing the required masses of tubes.

position

a vector containing the bucket positions of tubes.

rotorUnequal also plots a schematic diagram of the centrifuge rotor.

References

Sivek G. On vanishing sums of distinct roots of unity. Integers. 2010;10(3):365-8.

Peil O, Hauryliuk V. A new spin on spinning your samples: balancing rotors in a non-trivial manner. arXiv preprint arXiv:1004.3671. 2010 Apr 21.

See Also

rotorCheck for checking centrifuge rotors and rotorEqual for balancing tubes of equal mass.

Examples

# Call the function then input the names and the masses of tubes
rotorUnequal(30)
liver
10.05
gill
9.68
muscle
9.88

# Prepare the masses of tubes then call the function
samples <- round(rnorm(19, mean = 10, sd = 0.5), 2)
rotorUnequal(30, samples)

# Prepare the masses and the names of tubes then call the function
small.samples <- c(10.05, 9.68, 9.88)
names(small.samples) <- c("liver", "gill", "muscle")
rotorUnequal(30, small.samples)


[Package centrifugeR version 0.1.7 Index]