search for: mutliply

Displaying 5 results from an estimated 5 matches for "mutliply".

Did you mean: multiply
2008 May 21
2
Problem in converting natural numbers to bits and others
...2 Col3 Sample1 1 1 1 Sample2 0 1 1 Sample3 1 0 0 ii)Besides, I would like to create a formula of Sum(3*(Element in each column for a row))..does it equivalent to 3*(data[1:3,1:2]) in this case?or I need to have Sum(3*(data[1:3,1:2])). Basically I wanted to mutliply each element of column table of a row and sum it up. iii)I would also like to know how to insert an if else statement where in the above case, I wanted to check if data[1:3,] returns me 1 or 0, it will execute some calculations. I refer to the R intro pdf and it mentioned using if (expr_1 ) expr_...
2010 Sep 21
2
multiplying values in data frame by corresponding value in the first column
I am sure there is a simple solution to this... I have a column in a data frame specifying a grouping (1, -1) for my observations, and need to mutliply each observation in all the other columns of the data frame by the corresponding value in the given column. I played with apply, and saw some suggestions for sweep, but did not manage to get it working. My table contains NAs.... Example of table as data frame Observation Group Param1 Param2 AA...
2007 Sep 12
1
vars package, impulse response functions ??
I am fitting a reduced form VAR model using VAR in the vars library. I have several endogenous variables, and two exogenous variables. I would like to explore the effects of a shock to one of the exogenous variables on one of the endogenous variables. Using irf in the vars library only calculates the irf for the endogenous variables, this is obviously by design, is there some theoretical
2002 Oct 07
0
Why are big data.frames slow? What can I do to get it fas ter?
Extracting from data frame one element at a time the way you did is expensive. I.e., test[i, 6] is slower than test$whatever[i]. As an example: > dat <- data.frame(a = sample(LETTERS, 1e6, replace=TRUE), b=1:1e6, + c=rep("A", 1e6)) > dat$a <- as.character(dat$a) > dat$c <- as.character(dat$c) > > system.time( + for(i in 1:10) { + dat[i, 3]
2004 Jun 18
21
patch: HTB update for ADSL users
OK, here it is. Near perfect bandwidth calculation for ADSL users. Patch iproute2 with the HTB stuff and then this: It''s still a hack (as far as I can tell) because we are patching the rates tables, and hence I think it is only loosly coupled with the actual calculation of bytes in each bucket. However, it works very nicely for me! I have only been lightly testing with