Re: [R] stuk at another point: simple question

2011-03-01 Thread Dennis Murphy
Hi: This is *really* ugly, but given the number of variables you have in mind, it seems rather necessary, at least to me. # Given an original data frame dataf, find the max ID number: Mvars <- names(dataf)[grep('^M', names(dataf))] # Pick out the number of variables that start with M: n <- max(as

Re: [R] stuk at another point: simple question

2011-02-28 Thread Umesh Rosyara
Dear All I now realized that it is not simple to deal with realworld problems! This what I tried without any success: a <- seq(1, nvar, by = 2) b <- seq(2, nvar, by = 2) #df2 <- transform(df2, ima1p1 = df2$x1[df2$Parent1], # Parent 1's allele 1 #ima2p1 = df2$x2[df2$Parent1],

[R] stuk at another point: simple question

2011-02-28 Thread Umesh Rosyara
Dear R-community members. I am really appreciate R-help group. Dennis has been extrremely helpful to solve some of my questions. I am following Dennis recommendation in the following email, yet I am stuck at another point (hope this will took me to end of this project. Ind <- c(1:5) Parent1 <