Re: [R] Fastest way of finding if any members of vector x fall in the range of the rows of matrix y

2011-06-27 Thread Salih Tuna
will return a list of >>> those elements of v that fall within the i-th interval. >>> >> >> Maybe >> >> > v = c(1, 2, 6, 5) >> > start = c(-Inf, 1, 3, 8) >> > end = c(-Inf, 4, 5, 10) >> > v[ v <= end[findInterval(v, star

Re: [R] Fastest way of finding if any members of vector x fall in the range of the rows of matrix y

2011-06-24 Thread Salih Tuna
that someone can copy and paste > into an R session) that illustrates the problem along with the > solution you expect? > > TIA, > Dennis > > On Fri, Jun 24, 2011 at 2:30 AM, Salih Tuna wrote: > > Hi Dimitris, > > Thanks for your reply. But this is not exactly w

Re: [R] Fastest way of finding if any members of vector x fall in the range of the rows of matrix y

2011-06-24 Thread Salih Tuna
< 0 > > > I hope it helps. > > Best, > Dimitris > > > > On 6/24/2011 10:57 AM, Salih Tuna wrote: > >> Hi All, >> What is the fastest way of finding if any members of vector x fall in the >> range of the rows of matrix y? >> I do not want to

[R] Fastest way of finding if any members of vector x fall in the range of the rows of matrix y

2011-06-24 Thread Salih Tuna
Hi All, What is the fastest way of finding if any members of vector x fall in the range of the rows of matrix y? I do not want to use two for loops as this will take forever. Any help will be appreciated, best, salih [[alternative HTML version deleted]] ___

[R] CGHcall and normalization

2011-06-08 Thread Salih Tuna
Hi, i am trying to use the normalization function from CGHcall library. The command i use is normal.fullData <- normalize(fullData, method = "median", cellularity = 1) and i get the following error message. How can i solve this issue. Error in function (classes, fdef, mtable) : unable to fin

Re: [R] install the “impute” package in unix

2011-06-08 Thread Salih Tuna
salih On Wed, Jun 8, 2011 at 3:52 PM, Salih Tuna wrote: > Hi, > > I am trying to install the “impute” package in unix. but I get the > following error message. I followed the following steps. Do you know what is > causing this and how I can solve this problem? > > source(

[R] install the “impute” package in unix

2011-06-08 Thread Salih Tuna
Hi, I am trying to install the “impute” package in unix. but I get the following error message. I followed the following steps. Do you know what is causing this and how I can solve this problem? source("http://www.bioconductor.org/biocLite.R";) biocLite("impute") Using R version 2.11.1, biocins

[R] finding numbers in a range

2011-06-01 Thread Salih Tuna
Hi, Is there a quick way of finding if numbers in a vector falls in between a range defined in another matrix. As an example let x y 0 1 3 2 6 9 2515 18 I want to check one by one whether 0,2 and 25 falls in any of the ranges in y. I am using 2 for loops but it is taking a hug

Re: [R] Force the for loop to stop

2011-06-01 Thread Salih Tuna
quot;jj" as loop indices, not "i" and "j". This > makes it a lot easier to search for the loop counter in more complex scripts > - if you just search for "i", most of your hits will be something else than > the loop counter. > > > HTH, > Stephan >

Re: [R] Force the for loop to stop

2011-06-01 Thread Salih Tuna
p. If the > break condition is met in the inner loop, set the dummy variable to TRUE > before breaking and test its truth status in the outer loop. > > HTH > Stephan > > > Am 01.06.2011 21:25, schrieb Salih Tuna: > >> Hi, >> I am looking for a command in R that

[R] Force the for loop to stop

2011-06-01 Thread Salih Tuna
Hi, I am looking for a command in R that would force the for loop to stop after it finds what it is looking for. As an example for(i in 1:5){ for(j in 3:6){ if(i==j) # do something... break; } } And i don't want the loop to execute once i = 3 and stop. Is there a way to do

[R] help with tune.svm() e1071

2011-05-25 Thread Salih Tuna
Hi, I am trying to use tune.svm in e1071 package. the command i use is tobj <- tune.svm(labels, data= data, cost = 10^(1:2)) Should the last column of the 'data' contain the labels as well? I want to use the linear kernel. But it gives me the error "Error in model.frame.default(formula, data) : '

Re: [R] Group close numbers in a vector

2011-05-22 Thread Salih Tuna
the difference is > 2) > > breaks <- cumsum(c(0, diff(x) > 2)) > > # partition into different lists > > split(x, breaks) > $`0` > [1] 1 2 4 > > $`1` > [1] 7 9 10 > > $`2` > [1] 15 > > > > On Sat, May 21, 2011 at 6:03 PM, Salih Tuna

Re: [R] Group close numbers in a vector

2011-05-21 Thread Salih Tuna
` > [1] 7 9 10 > > $`2` > [1] 15 > > > > On Sat, May 21, 2011 at 6:03 PM, Salih Tuna wrote: > > Hi Robert, > > thanks for your reply. is there a way to store them in separate vectors? > > and when i try it with a different example i got different result.

Re: [R] Group close numbers in a vector

2011-05-21 Thread Salih Tuna
Hi Robert, thanks for your reply. is there a way to store them in separate vectors? and when i try it with a different example i got different result. For example if x = [1 2 8 9] i want the result to be x1 = [1 2] and x2 = [8 9]. thanks On Sat, May 21, 2011 at 7:16 PM, Robert Baer wrote: > Hi e

[R] Group close numbers in a vector

2011-05-21 Thread Salih Tuna
Hi everyone, i am trying to group close numbers in a vector. For example i have a vector x = [1 2 4 7 9 10 15]. I want the code to pick 1 2 4 (max difference between successive numbers is 2) and assign them to variable a, then pick 7 9 10 and assign them to b and 15 to c. But since i do not know ho