Re: [R] Subtracting elements of a vector from each other stepwise

2013-09-13 Thread Michael Budnick
gt; writes: > >>> > >>>> > >>>> Hi, > >>>> Not sure this is what you wanted: > >>>> > >>>> sapply(seq_along(x), function(i) {x1<- x[i]; x2<- x[-i]; > >>> x3<-x2[which.min(abs(x1-x2))];c(x1,x3)}

[R] Subtracting elements of a vector from each other stepwise

2013-09-10 Thread Michael Budnick
I am trying to figure out how to create a loop that will take the difference of each member of a vector from each other and also spit out which one has the least difference. I do not want the vector member to subtract from itself or it must be able to disregard the 0 obtained from subtracting from

[R] Creating mean C columns out of As and Bs

2013-03-26 Thread Michael Budnick
d like TissueExpressionC <- HTissue[1:22284, c[mean(29,30), mean(39,40), mean(57,58) ... mean(159,160)] I hope that makes sense. If you know of any other method of merging data sets like this any help would be appreciated. Michael Budnick Graduate Researcher St. John's University [[al