Re: [R] Is there in R a function equivalent to the mround, as found in most spreadsheets?

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Fri, 09 May 2008 09:39:17 +0000 (UTC)

Dr. Ottorino-Luca Pantani <ottorino-luca.pantani <at> unifi.it> writes:

>
> In a lab experiment I have to mix three solutions to get different
> concentrations of various molecules in a cuvette
>
> I've used R to calculate the necessary µliters for each of the level of
> the experiment and I must confess that it is more useful and easier to
> achieve the results than using spreadsheets.
>
> But there's a problem.
>
> Imagine that for a particular cuvette (I have 112 different cuvettes !!)
> you have to mix the following volumes of solution A, B, and C respectively.
>
> c(1803.02, 193.51, 3.47)
>
> Each solution is to be taken with 3 different pipettes (5000, 250 and 10
> µL Volume max) and each of those delivers volumes in steps of 50 µL, 5
> µL or 1µL, respectively
> Since the above values would eventually become
>
> c(1800, 195, 3)
>
> it is then necessary to recalculate all the final concentrations
> of A, B and C, because the volumes are changed.

A first guess would be

a = c(1803.02, 193.51, 3.47)
round(a / 5)*5

which gives

1805 195 5

This is not exactly what you want, but it shows that the problem is a bit ill-defined. In the example you gave, why do you want 1800, and not 1805, which is possible with the pipettes? I assume that you laboratory experience is working in the background, telling you to stop pipetmanning when you are close to the result in some "percentage" feeling.

Dieter



R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 09 May 2008 - 09:42:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 09 May 2008 - 11:30:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive