Displaying 2 results from an estimated 2 matches for "lmcc".
Did you mean:
lmc
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 : num 22.95 6.7 4.72 4.72 4.72 ...
$ Marca : Factor w/ 132 levels "AA_Movilnet",..: 11 32 82 82 32
32 32 32 32 3...
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)
> # Subtotal para redondeo
> sumaformula <- sum(alitemp)
> # Fragmentacion de la matriz segun clases...
> llmcc2 <- llmcc
> llm...