similar to: Add columns to data frame automatically

Displaying 20 results from an estimated 600 matches similar to: "Add columns to data frame automatically"

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 :
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**
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) >
2009 Feb 15
0
Porcentual separation
Dear Fellows: Thanks you all for your great help. Without your guidance I'd not have been able to get this far. So this is the current problem: I have a series (dataframe with 1 column and 283 rows, all with numbers (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
2009 Nov 05
1
stepAIC(coxph) forward selection
Dear R-Help, I am trying to perform forward selection on the following coxph model: >my.bpfs <- Surv(bcox$pfsdays, bcox$pfscensor) > b.cox <- coxph(my.bpfs ~ Cbase + Abase + Cbave + CbSD + KPS + gender + as.factor(eor) + Age)>stepAIC(b.cox, scope=list(upper =~ Cbase + Abase + Cbave + CbSD + KPS + gender + as.factor(eor) + Age, lower=~1), direction= c("forward")) However
2002 Sep 20
1
warning in binomial analysis
Hi, I have make an analise with presence and absence, y=(1 e 0). I have a area continuous data and a sp data with 25 levels. I have 300 points. When I make glm((presenca/peso)~area,weights=peso,family=binomial,maxit=1000) where presenca is 0 or 1. peso is the unit = 1. area is the continuous data. The analysis is OK. When I put the sp and interactions in analysis this warning appear.
2002 Jun 20
2
understanding the output
Hi all, I try to understand the output of the summary(model). I make a simple model. > summary(m1anova) Call: glm(formula = peso ~ gen) Deviance Residuals: Min 1Q Median 3Q Max -4.3114 -2.3788 -0.9167 2.1581 5.7856 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.8660 0.9808 4.961 0.000101 *** gen2g 3.8504
2003 Oct 14
2
different results depending of variable position.
Hi, I make an analysis and depending of the order of the variables, the significance change, look. m1 <- glm((infec/ntot)~idade+sexo+peso,family=binomial,weights=ntot) > anova(m1,test="F") Analysis of Deviance Table Model: binomial, link: logit Response: (infec/ntot) Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev F Pr(>F)
2013 Dec 03
3
seleccionar columnas de un dataframe mediante variables
Pues este es el culpable... como soy nuevo en esto, disculpad si las estrategias de creación de datframes, etc. son poco ortodoxas. Y por cierto... esto del slicing con R es un poco... duro library(RPostgreSQL) library(reshape) #CARGA DE DATOS conn<-dbConnect("PostgreSQL",dbname="OFIDAT",user="antares") #consulta<-dbSendQuery(conn,"select
2006 May 15
4
Problems with make ARCH=xen
Hi! I`m trying to install xen 3.0.2 on my Debian system! But, the "make ARCH=xen menuconfig" don`t work! debian:/home/peso/xen-3.0.2/xen-3.0.2/linux-2.6.16-xen0# make ARCH=xen menuconfig Makefile:439: /home/peso/xen-3.0.2/xen-3.0.2/linux-2.6.16-xen0/arch/xen/Makefile: No such file or directory make: *** No rule to make target `/home/peso/xen-3.0.2/xen-3.0.2/linux-
2005 Nov 25
1
glmmPQL
Hi, My name is Jos?? Mar??a G??mez, and I am pretty new in R. Thus, I apologize deeply if my questions are extremmely na??ve.I have checked several available books and URL's, without finding any answer. I'm trying to fit Generalized Linear Mixed Models via PQL. Below I provide the structure of my data set. Year and Plot are random variables. Fate is the binomial dependent. I have severe
2009 Nov 11
7
Gr�fico xyplot
Hola a todos, Tengo que construir un gráfico para una base de datos que tengo en el que representar para los individuos de esta base su altura vs peso en función de su edad. Para ello, hay que utilizar los gráficos condicionados. En primer lugar usé la función coplot pero cargando el paquete lattice se pueden utilizar funciones que generan gráficos más completos, como es el caso de la función
2015 Jul 21
2
glm com etiquetas en las variables
Hola: Si aún hay alguien que no está de vacaciones, igual me pueden ayudar. Quiero ajustar unos modelos: REG_LOG <- glm (low ~ X, family = "binomial", data = DATOS) Ejemplo: library(MASS) data(birthwt, package="MASS") birthwt$low <- factor(birthwt$low) birthwt$race <- factor(birthwt$smoke) REG_LOG <- glm (low ~ smoke, family =
2015 Jun 08
4
columna de un data.table puede ser data.frame?
Hola, yo quiero construir un data.table donde una columna (Parametros) son caracteres y otra el resultado de la función information.gain, que devuelve un data.frame. El código que he usado es este, pero me da error PesosParam <- data.table(,.(Parametros, Peso:= information.gain(In.hospital_death~., ParamCol))) Es posible hacer lo que digo? o debo hacer una transformación del data.frame a
2008 Jul 01
3
plot window
Hi list, I want to know how can i creat a plot window with this configuration: _______________________________ | | | PLOT 1 | | | |-----------------------------| | | | | | | | PLOT 2 | PLOT 3 | | | | | | |
2001 Nov 17
1
rsync hangs or exists without copying anything
I am trying to mirror a file system using rsync. The command I am using is of the form: rsync -a /fs/home/6/ /usr/fs/home/6 /fs/home/6/ is an NFS file system, /usr/fs/home/6 is a local disk. With versions 2.4.6 and 2.4.7pre1, rsync hangs at random places during the building file list phase. I tried with and without -v option(s) and tried breaking the file system down into smaller chunks with no
2009 Mar 06
2
Numbers
Hi, I know the function LETTERS, but, now I have some letters to convert it in numbers, like A=1,B=2, etc... Is any function to do that? Atenciosamente, Leandro Lins Marino Centro de Avalia??o Funda??o CESGRANRIO Rua Santa Alexandrina, 1011 - 2? andar Rio de Janeiro, RJ - CEP: 20261-903 R (21) 2103-9600 R.:236 ( (21) 8777-7907 ( leandro at cesgranrio.org.br "Aquele que suporta o peso da
2018 Mar 01
2
Agregar variable ponderando con otra
Buenas tardes, Estoy intentando conseguir la media de la variable "numerocaracteres" por "producto" de mi base de datos, datos. Lo estoy haciendo con la función aggregate de este modo: AggregatedData<- aggregate(numerocaracteres ~ producto, data=datos, FUN=mean) El problema me viene porque quiero utilizar una variable de ponderación de modo que para construir la media
2009 Nov 24
1
Pregunta sobre LM
Hola Buen día, estoy ajustando una regresión multiple, pero sucede que tengo un factor de expanción, digamos que deseo ajustar el modelo ingreso ~ edad + ocupacion mi problema es que cada observación tienen un factor de expanción, es decir cada variable no representa una observación sino más, que no es un número fijo para cada observación. por lo que a mí se me ocurrio usarlas como peso
2012 Jan 11
2
problems with glht for ancova
I've run an ancova, edadysexo is a factor with 3 levels,and log(lcc) is the covariate (continous variable) I get this results > ancova<-aov(log(peso)~edadysexo*log(lcc)) > summary(ancova) Df Sum Sq Mean Sq F value Pr(>F) edadysexo 2 31.859 15.9294 803.9843 <2e-16 *** log(lcc) 1 11.389 11.3887 574.8081 <2e-16 ***