search for: ijkl

Displaying 4 results from an estimated 4 matches for "ijkl".

Did you mean: ijk
2012 Jun 28
3
Storing results in a single file after looping over all files
Hi All, I have a whole lot of *.raw files in my working folder and I am doing the same analysis on each of those and want to save all the results in a single file. I am making some mistake here and can't figure out how to solve it. Say, the *.raw files are ABCD.raw, EFGH.raw, IJKL.raw ... The files are of this format ID PHI?? aa1? aa2? aa3 .... 1??? 1???? 1.3?? 2.0?? 1.0 2??? 0???? 1.5?? NA?? 0.9 3??? 1???? 0.1?? 0.2?? 1.5 ...... .. My code is as follows: files <- list.files(pattern="*.raw") for(i in files){ of <- strsplit(i, "\\.")[[1]] o...
2011 Feb 10
2
for loop to merge .csvs
...separate .csv files) ab<-merge(a,b,all=TRUE) cd<-merge(c,d,all=TRUE) ef<-merge(e,f,all=TRUE) gh<-merge(g,h,all=TRUE) ij<-merge(i,j,all=TRUE) kl<-merge(k,l,all=TRUE) no<-merge(m,n,all=TRUE) pq<-merge(p,q,all=TRUE) abcd<-merge(ab,cd,all=TRUE) efgh<-merge(ef,gh,all=TRUE) ijkl<-merge(ij,kl,all=TRUE) nopq<-merge(no,pq,all=TRUE) ah<-merge(abcd,efgh,all=TRUE) iq<-merge(ijkl,nopq,all=TRUE) aq<-merge(ah,iq,all=TRUE) all<-merge(aq,r,all=TRUE) write.csv(all,file="all.merged.csv") [[alternative HTML version deleted]]
2006 Aug 08
1
fixed effects constant in mcmcsamp
..., U[i], V[j], W[k]) = U[i] + V[j] + W[k] + a[l] where X[ijk] is the ordinal response to question k for individual j in area i. The U, V, and W are random effects and the a's are fixed effects. Here's a function to simulate data which mimics this setup (with a sequence of binary responses Y[ijkl] = 1 iff X[ijk] = l): sim <- function(n = c(10, 10, 10), sd = c(0.5, 2, 0.5), a = seq(-5, 1, 2)) { u <- rnorm(n[1], 0, sd[1]) v <- rnorm(prod(n[1:2]), 0, sd[2]) w <- rnorm(n[3], 0, sd[3]) i <- factor(rep(1:n[1], each = prod(n[2:3]))) j <- factor(rep(1:prod(n[1:2]), each =...
2009 Oct 02
3
break up a string into strings with a fixed length
dear all, I have some very long strings and would like to break up each long string into multiple strings with a fixed length, e.g. to break up abcdefghijkl into abc, def, ghi, jkl I tried a couple of commands but was not successful. Any help will be appreciated. Best, Jimmy -- View this message in context: http://www.nabble.com/break-up-a-string-into-strings-with-a-fixed-length-tp25712955p25712955.html Sent from the R help mailing list archive at...