similar to: unlist & dataframes

Displaying 20 results from an estimated 1000 matches similar to: "unlist & dataframes"

2008 Jan 15
2
Looking for simpler solution to probabilistic question
Hi I have two processes which take with a certain probability (p1 and p2) x number of years to complete (age1 and age2). As soon as thge first process is completed, the second one begins. I want to calculate the time it takes for the both processes to be completed. I have the following script which gives me the answer, butI think there must be a more elegant way of doing the calculations
2002 Nov 26
1
Reshape by multiple variables
Dear list I'm using the reshape command and want to reshape a wide data set to a long one e.g. I have the variables y1,y2,y3,age1,age2,age3,sex,ethnic I want my new long data set to consist of the variables y (which has been created from y1,y2,y3), age (which has been created from age1,age2,age3), sex and ethnic I have tried to use the command:
2007 Mar 05
1
Matrix/dataframe indexing
Hi all, I am hoping someone can help me out with this: If I have dataframe of years and ages and the first column and first row are filled with leading values: Df<- age1 age2 age3 Yr1 1 0.4 0.16 Yr2 1.5 0 0 Yr3 0.9 0 0 Yr4 1 0 0 Yr5 1.2 0 0 Yr6 1.4 0 0 Yr7 0.8 0 0 Yr8 0.6 0 0 Yr9 1.1 0 0 Now the rest of the cells need to be filled according to the previous year and age
2005 Aug 12
2
coercing created variables into a new data frame using na.omit()
Hi, I am an R newbie and one thing I am having trouble with binding variables that I have created within one data frame into a new data frame when using na.omit(). To illustrate this problem I will give the example I am working on and the approah I have been using:- data.frame1<-filepath.... attach(data.frame1) #create a new variable using a function new.variable<-rep(1,length(weight3))
2008 May 12
1
Standard error of combination of parameter estimates
Hi, Is there a simple command for computing the standard error of a combination of parameter estimates in a GLM? For example: riskdata$age1 <- riskdata$age riskdata$age2 <- ifelse(riskdata$age<67,0,riskdata$age-67) model <- glm(death~age1+age2+ldl, data=riskdata,family=binomial(link=logit)) And we want to find the standard error of the partial linear predictor for
2003 Dec 17
5
beginner programming question
Hi all, The last e-mails about beginners gave me the courage to post a question; from a beginner's perspective, there are a lot of questions that I'm tempted to ask. But I'm trying to find the answers either in the documentation, either in the about 15 free books I have, either in the help archives (I often found many similar questions posted in the past). Being an (still actual)
2011 Oct 05
1
calling a variable which in turn calls many more variables
Hi all, I am running regressions with many covariates, most of which remain the same each time (control variables). Instead of writing 30 demographic variables every regression, is there a way I could call them all at once using a variable called, perhaps "demog"? I have tried: > demog <- list(age1, age2, age3) but I get an error when I try to call a list in a regression. I also
2010 Sep 12
3
reshape matrix entities to columns
Greeting R helpers J I am not familiar with R but I have to use it to analyze data set that I have (30,000 20,000) I want to change the structure of the dataset and I am wondering how that might be possible in R A main data looks like this: some entities are empty Age No. Age No. Age No. Center1 5 2 8 7
2010 Feb 11
1
Rounding multinomial proportions
I present you with a function that solves a problem that has bugged me for many years. I think the problem may be general enough to at least consider adding this function, or a revamped version of it, to the 'stats' package, with the other multinomial functions reside. I'm using R to export data to text files, which are input data for an external model written in C++. Parts of the
2008 May 19
2
From strings to numbers
Dear all, I would like to know if there is an easy to transform a vector of strings to a vector of integers. Ex: ("ab","ab","bb","cat","cat","ab") will be (1, 1, 2, 3, 3, 1) Thx, Naira -- View this message in context: http://www.nabble.com/From-strings-to-numbers-tp17315179p17315179.html Sent from the R help mailing list archive at
2007 Nov 02
3
writing a categorical var. with condition
Hello, I want to create a new variable which includes 4 age categories in this way: if (age>=12 && age<32) age1==1 if (age>=32 && age<52) age1==2 if (age>=52 && age<72) age1==3 if (age>=72 && age<100) age1==4 but I get the results only for the first observation. how can I apply this condition to all observations? Thanks in advance,
2009 Sep 21
2
cox memory
Hi there, I have a rather large data set and perform the following cox model: test1 <- list(tstart,tstop,death1,chemo1,radio1,horm1) out1<-coxph( Surv(tstart,tstop, death1) ~ chemo1+chemo1:log(tstop+1)+horm1+horm1:log(tstop+1)+age1+grade1+grade1:log(tstop+1)+positive1+positive1:log(tstop+1)+size1+size1:log(tstop+1), test1) out1 Up to here everything works fine (with each covariate
2007 Feb 09
2
LM Model
Dear R-Users, How can I put a pre-defined regression model into to an object of class lm in order to use the predict.lm function. A simplified example: I would normally run a regression analysis on a dataset, > germany<-lm(RENT~AGE1, in.mi01) > summary(germany) Call: lm(formula = RENT ~ AGE1, data = in.mi01) Residuals: Min 1Q Median 3Q Max
2006 May 27
1
Trouble passing list or non-list to function using ...
Hello, Simply put, I'm trying to call a function "testme" with value "age=NA". I wish to use "dotlist<-list(...)" inside the function and have dotlist become: $age [1] NA I'm modifying existing code and need to minimize changing that code so it's easiest to conform how I call the existing function. My sample code fragment, results, and R.version
2009 Jan 07
12
glusterfs alternative ? :P
I know that this is not the appropriate place :). You know someone can alternative to gluserfs ?:) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20090107/63b68a0d/attachment.html>
2010 Feb 17
1
Ordered Logit in R
I'm trying to run an ordered logistic regression model. I've run the following code, but the output does not provide the p-values. Is there some command to include the p-values in the output. reg2 <- polr(trade1 ~ age2 + education2 + personal2 + economy2 + partisan2 + employment2 + union2 + home2 + market2 + race2 + income2) summary(reg2) Re-fitting to get Hessian# Call:
2006 Dec 01
1
Box Tidwell / Error Message
Dear R-Users, I used the box.tidwell () function of the car Package. When I used the following formula: semi.sub.in.mi1.boxtidwell_h<-box.tidwell(RENT_LG ~ I(age+1)+I(age2+1)+X06A + I(X08B+1) + I(X22+1) + I(X24+1) + X31A, ~B_YEAR + C_X01 + C_X14 + C_X19 + C_X29A +C_X21 + C_X23 + D_X12 + D_X17 + D_X18 + D_X25 + D_X27 + D_X30 + D_X32 + D_X35, data = semi.sub.in.mi1) everything is
2002 Jul 11
1
nls() singular graident matrix error
R-helpers; I used Proc Model in SAS to fit the following model to data: proc model data = dbsmv; a = a1*F**2; b = b1*F + b2*T + b3*F*T; tph2 = tph1 *((1 - exp(-a*age2)) / (1 - exp(-a*age)))**-b; fit tph2; and yielded the following estimated parameters after iterations: a1 = -0.15943, a2 = -1.8177, b1 = -0.01911, b2
2010 Apr 23
1
help with plotting lines linking two sets of points?
Hello everyone, I'm trying to plot the initial and final size of some tadpoles and look at their growth rates (slope of line). They are divided into 6 densities, and so far I have plotted the initial and final sizes (these are means for a pool), and color coded for the 6 densities, but I want a line to connect the initial and final value for each pool (also color coded by density). Any ideas?
2008 May 09
2
how to check linearity in Cox regression
Hi, I am just wondering if there is a test available for testing if a linear fit of an independent variable in a Cox regression is enough? Thanks for any suggestions. John Zhang ____________________________________________________________________________________ [[elided Yahoo spam]]