Displaying 5 results from an estimated 5 matches for "llmcc".
Did you mean:
llvmcc
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
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. Although I can make...
2009 Feb 13
1
Add columns to data frame automatically
...ave 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 <- AlicuotaBruta
clase <- llmcc$Clase
as.numeric(peso)
df.clases <- data.frame()
df.clases[,i] <- (abase/llmcc$Clase)*peso[1]
peso[1] <- peso[1]+(.01)
cat("Modelos de Alicuotas:", i, peso[1], "\n")
}
return (df.clases)
Problem is: the function does not work, and I just cant seem to
u...
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...
2009 Feb 15
0
Porcentual separation
...ers (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 already stored in a
dataframe called combmatrix.
df.clases = sapply(seq(1,by=1,length=3921225),function(x)
((AlicuotaBruta/llmcc$Clase)*combmatrix[1,x]+((1/llmcc
$Categoria)*AlicuotaBruta)*combmatrix[2,x]+(AlicuotaBruta*llmcc
$Phi)*combmatrix[3,x]+ (AlicuotaBruta*llmcc$Rf)*combmatrix[4,x]))
The number 3921225 corresponds to the number of dimensions of the
combmatrix created with the combd function using 4 elements per...