search for: pphi

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

Did you mean: phi
2009 Feb 10
1
Calculating variables
...ellows: This is the problem: I have 5 variables A, B, C, D and E with a range from 1 to 100 with 0.1 steps. Depending on the different values these have, the results of the formula change: alitemp <- ((Abase/llmcc$Clase)*PClase)+(((1/llmcc $Categoria)*Abase)*PCategoria)+((Abase*llmcc$Phi)*PPhi)+((Abase*llmcc $Rf)*PRf) So, alitemp (a 283 element series) changes if any of the P** values changes. I need to find a combinations of those 5 variables that approximates the desired results. Although I can make use of a 'for' loop, Im not sure of how to combine the whole 5 variable...
2009 Feb 09
2
Dataframes: conditional calculations per row .
...1.069 0.368 0.256 0.256 0.264 ... I perform an initial operation using the original variables plus one numeric (Abase) that is external and has the same number of rows than the dataframe: alitemp <- ((Abase/llmcc$Clase)*PClase)+(((1/llmcc $Categoria)*Abase)*PCategoria)+((Abase*llmcc$Phi)*PPhi)+((Abase*llmcc $Rf)*PRf) So, after I obtain the results of this calculation, I append the series by creating an additional column within the original dataframe: l lmcc$Alitmp <- alitemp Problem is: I need to calculate a new column using a formula that has different structure depending on...
2009 Feb 10
0
Dataframes: conditional calculations per row [SOLVED].
...s 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) > # Subtotal para redondeo > sumaformula <- sum(alitemp) > # Fragmentacion de la matriz segun clases... > llmcc2 <- llmcc > llmcc2$Alitmp <- alitemp > llmcc2$newExpression <- with(llmcc2,ifelse(Cl...