search for: mulitplying

Displaying 3 results from an estimated 3 matches for "mulitplying".

2010 Dec 26
4
Parsing a Simple Chemical Formula
...and bromine, O or Br, there is no following number meaning a 1 is implied). Let's say > form <- "C5H11BrO" I'd like to get the count of each element, so in this case I need to extract C and 5, H and 11, Br and 1, O and 1 (I want to calculate the molecular weight by mulitplying). Sounds pretty simple, but my experiments with grep and strsplit don't immediately clue me into an obvious solution. As I said, I don't need a general solution to the problem of calculating molecular weight from an arbitrary formula, that seems quite challenging, just a way to co...
2010 May 11
1
Splines under tension
Does anyone know if R has a function for splines under tension. I know there are numerous packages for spline interpolation within R i just can't find one that lets you determine the tension factor. Any help would be much appreciated! Sam -- View this message in context: http://r.789695.n4.nabble.com/Splines-under-tension-tp2173887p2173887.html Sent from the R help mailing list archive at
2006 Jul 17
1
multiplying multidimensional arrays (was: Re: [R] Manipulation involving arrays)
I am moving this to r-devel. The problem and solution below posted on r-help could have been a bit slicker if %*% worked with multidimensional arrays multiplying them so that if the first arg is a multidimensional array it is mulitplied along the last dimension (and first dimension for the second arg). Then one could have written: Tbar <- tarray %*% t(wt) / rep(wti, each = 9) which is a bit