Displaying 3 results from an estimated 3 matches for "alitemp".
2009 Feb 10
1
Calculating variables
Dear fellows: 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...
2009 Feb 09
2
Dataframes: conditional calculations per row .
...m 0.737 0.258 0.375 0.375 0.385 ...
$ OldCondo : num 4436 1555 2260 2260 2318 ...
$ NewA_Jon : num 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
P...
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 <- l...