Re: [R] subsetting a data.frame based on a specific group of columns

2015-11-06 Thread jim holtman
I assume the solution is somewhat the same; you just have to define how to determine what the "distinctive" names are to create the groupings. My solution assumed it was the first character. If the group names end in a unique sequence, you can use this to form the groups, or you can provide a lis

Re: [R] subsetting a data.frame based on a specific group of columns

2015-11-06 Thread Boris Steipe
Please learn to use dput() to post example data. # This is your data: data <- structure(c(1232, 0, 43, 357, 71, 919, 23, 9, , 0, 811, 0, 9871, 795, 76, 72, 743, 14), .Dim = c(3L, 6L), .Dimnames = list( NULL, c("X1", "X2", "X3", "Y1", "Y2", "Y3"))) data # define groups and threshold expl

Re: [R] subsetting a data.frame based on a specific group of columns

2015-11-06 Thread Assa Yeroslaviz
sorry, for the misunderstanding. here is a more elaborate description of what i would like to achieve. I have a data set of counts from a RNA-Seq experiment and would like to filter reads with low counts. I don't want to set everything to 0 automatically. I would like to set each categorical grou

Re: [R] subsetting a data.frame based on a specific group of columns

2015-11-06 Thread jim holtman
Is this what you want: > x <- read.table(text = "X1X2X3Y1Y2Y3 + 1232357230987172 + 0719811795743 + 4391907614", header = TRUE) > x X1 X2 X3 Y1 Y2 Y3 1 1232 357 23 0 9871 72 20 719 811 795

[R] subsetting a data.frame based on a specific group of columns

2015-11-06 Thread Assa Yeroslaviz
Hi, I have a data frame with multiple columns, which are belong to several groups like that: X1X2X3Y1Y2Y3 1232357230987172 0719811795743 4391907614 I would like to filter such rows out, where the sums in one group