similar to: Calculating variables

Displaying 20 results from an estimated 100 matches similar to: "Calculating variables"

2009 Feb 09
2
Dataframes: conditional calculations per row .
Dear Sirs: I've been working with several variables in a dataframe that serve as part of a calculation that I need to perform in a different way depending on its value. Let me explain: The main dataframe is called llmcc llmcc : 'data.frame': 283 obs. of 11 variables: $ Area : num 308.8 105.6 51.4 51.4 52.9 ... $ mFondo : num 30.1 10 10.2 10.2 40.4 ... $ mFachada :
2009 Feb 10
0
Dataframes: conditional calculations per row [SOLVED].
> Thank you very much Jorge, Phil and David: I was finally able to > perform the operations I needed. I changed the function in order to > adapt it to the simplest form like the following: > ali <- function(Abase) { > alitemp <- ((Abase/llmcc$Clase)*PClase)+(((1/llmcc > $Categoria)*Abase)*PCategoria)+((Abase*llmcc$Phi)*PPhi)+((Abase*llmcc > $Rf)*PRf) >
2009 Feb 13
1
Add columns to data frame automatically
Hello fellows: I've een trying to set up a function that performs 100 loops producing the coresponding 100 series. I want to save all those datasets in a dataframe, so I wrote this... prep <- function() # Clase[1]/Categoria[2]/Phi[3]/Rf[4] peso <- c(.0,.03,.3,.6) # Extension del calculo for (i in 1:100) { # Calculos de todas las curvas # Variables (Valor Base) abase
2009 Feb 15
0
Porcentual separation
Dear Fellows: Thanks you all for your great help. Without your guidance I'd not have been able to get this far. So this is the current problem: I have a series (dataframe with 1 column and 283 rows, all with numbers (no NA's) that go from 0 to 3 or 4 with up to 14 decimals. They indicate a percentage. I have to apply a formula to that dataframe that uses 4 variables I have
2009 Nov 05
1
stepAIC(coxph) forward selection
Dear R-Help, I am trying to perform forward selection on the following coxph model: >my.bpfs <- Surv(bcox$pfsdays, bcox$pfscensor) > b.cox <- coxph(my.bpfs ~ Cbase + Abase + Cbave + CbSD + KPS + gender + as.factor(eor) + Age)>stepAIC(b.cox, scope=list(upper =~ Cbase + Abase + Cbave + CbSD + KPS + gender + as.factor(eor) + Age, lower=~1), direction= c("forward")) However
2001 Nov 17
1
rsync hangs or exists without copying anything
I am trying to mirror a file system using rsync. The command I am using is of the form: rsync -a /fs/home/6/ /usr/fs/home/6 /fs/home/6/ is an NFS file system, /usr/fs/home/6 is a local disk. With versions 2.4.6 and 2.4.7pre1, rsync hangs at random places during the building file list phase. I tried with and without -v option(s) and tried breaking the file system down into smaller chunks with no
2012 Jul 17
1
FW: rsync hanging after working reliably for years on one of my shares
Thanks for the suggestions - I have done my best to follow them. I inserted the debug shim script and changed the rsync executable in rsync so that it called that instead, and got the same results. Here is the tail from that: 21381 0.000108 open("www.athenshousing.org/xmlrpc.php", O_RDONLY|O_LARGEFILE) = 3 21381 0.000122 fstat64(3, {st_mode=S_IFREG|0644, st_size=294, ...}) =
2009 Jul 13
2
transfer option and pressing #
Hi I have setup forwarding - xfering - where you press # and then the extension. I add t to the dial cmd. My problem is that when you call something like internet banking they want #, but when # is pressed asterisk gets it instead. is there a way around this ? I haven't been able to get asterisk to listen to flash either Alex -- Why is it there are so many more horses' asses than
2009 Feb 05
3
impossible packet length ...
Hi, on 2 different servers, running 7.1-stable + zfs, I get this error rather frequently: Feb 5 17:01:03 warhol-00 kernel: impossible packet length (543383918) from nfs server sunfire:/dist Feb 5 17:01:03 warhol-00 kernel: impossible packet length (1936028704) from nfs server sunfire:/dist Feb 5 17:01:03 warhol-00 kernel: impossible packet length (1869363744) from nfs server sunfire:/dist
2006 Apr 25
0
Processes freezing and monopolising the CPU
HP-UX 11.00 Samba 3.0.21a PDC OpenLDAP backend When we log on to an XP box, the smbd process freezes for one to two minutes, while taking up almost 100% CPU. However, this does NOT happen when logging on to an NT box. We use no roaming profiles, so it's not that XP is copying files or something. In fact the pc seems to do nothing but wait. Moreover we often have the same effect when using
2005 Jun 16
5
Vectorization
Greetings, Can anyone suggest me if we can vectorize the following problem effectively? I have two datasets, one dataset is portfolio of stocks returns on a historical basis and another dataset consist of a bunch of factors (again on a historical basis). I intend to compute a rolling n-day sensitivitiesfor each stock for each factor, so the output will be a data frame with
2000 Jun 30
1
I have a dream of creating a program on statistical analyses.
2006 Feb 23
2
lighttpd and blank page
Hi all: I have been using lighttpd on os x with RoR. It normally works great, however, when I use it for one project, kill the process, then switch to another project and start up using ./script/server, all I get is a blank page. No errors or html. The only solution I have found so far is to restart my machine, but that seems terribly inneficient. How does everybody else handle this, or do you
2007 Jan 23
3
[fixed] vectorized nested loop: apply a function that takes two rows
(Extremely sorry, disregard previous email as I hit send before pasting the latest version of the example; this one is smaller too) Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally, one should avoid loops in R, but after reading the docs for do.call, apply, etc, I still don't know
2007 Jan 23
3
[fixed] vectorized nested loop: apply a function that takes two rows
(Extremely sorry, disregard previous email as I hit send before pasting the latest version of the example; this one is smaller too) Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally, one should avoid loops in R, but after reading the docs for do.call, apply, etc, I still don't know
2005 Nov 19
5
help with apply, please
Dear list, I have a problem with a toy example: mtrx <- matrix(c(1,1,0,1,1,1,0,1,1,0,0,1), nrow=3) rownames(ma) <- letters[1:3] I would like to determine which is the minimum combination of rows that "covers" all columns with at least a 1. None of the rows covers all columns; all three rows clearly covers all columns, but there are simpler combinations (1st and the 3rd, or 2nd
2007 Jan 23
0
vectorized nested loop: apply a function that takes two rows
Dear R users, I want to apply a function that takes two vectors as input to all pairs (combinations (nrow(X), 2))of matrix rows in a matrix. I know that ideally, one should avoid loops in R, but after reading the docs for do.call, apply, etc, I still don't know how to write the nested loop in a vectorized way. Example data: x = matrix(rnorm(1000), 100, 100) zeros = runif(90) x[] # this is
2005 Mar 23
0
Question on class 1, 2 output for RandomForest
The `1' and `2' columns are the error rates within those classes. E.g., the last row of the `1' column should correspond to the class.error for "-", and the last row of the `2' column to the class.error for "+". (I would have thought that that should be fairly obvious, but I guess not. It mimics what Breiman and Cutler's Fortran code does.) I suspect
2004 Oct 16
7
sapply and loop
Dear all, I am doing 200 times simulation. For each time, I generate a matrix and define some function on this matrix to get a 6 dimension vector as my results. As the loop should be slow, I generate 200 matrice first, and save them into a list named ma, then I define zz<-sapply(ma, myfunction) To my surprise, It almost costs me the same time to get my results if I directly use a loop
2004 Oct 16
7
sapply and loop
Dear all, I am doing 200 times simulation. For each time, I generate a matrix and define some function on this matrix to get a 6 dimension vector as my results. As the loop should be slow, I generate 200 matrice first, and save them into a list named ma, then I define zz<-sapply(ma, myfunction) To my surprise, It almost costs me the same time to get my results if I directly use a loop