search for: alitmp

Displaying 2 results from an estimated 2 matches for "alitmp".

Did you mean: alitemp
2009 Feb 10
0
Dataframes: conditional calculations per row [SOLVED].
...se)*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(Clase<10, > Alitmp*100/sumaformula, Alitmp*100/sumaformula)/PAnclas) > return (llmcc2) > } > There are a couple of things I have to work out first though: The > scope of an external variable (Abas...
2009 Feb 09
2
Dataframes: conditional calculations per row .
...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 the values of llmcc$Clase, thus: for any given row of llmcc where llmcc$Clase is >= 10 i would have to perform some operations with other values in the same row that are,...