similar to: Help in splitting ists into sub-lists

Displaying 20 results from an estimated 1000 matches similar to: "Help in splitting ists into sub-lists"

2011 Apr 05
1
Help in splitting a list
Dear R users, Let's say I have a list with components being 'm' matrices (as exemplified in the "mylist" object below). Now, I'd like to subset this list based on an index vector, which will partition each matrix 'm' in 2 sub-matrices. My questions are: 1. Is there an elegant way to have the results shown in mylist2 for an arbitrary number of matrices in mylist?
2010 Oct 28
1
Merging nested lists
Hello All, I have multiple "list of lists" in the form of Mylist1[[N]][[K]]$Name_i, with N=1..6, K=1..3, and i=1..7. Each Name_i is a matrix. I have 30 of these objects Mylist1, Mylist2, ... I would like to merge these lists by each Name_i using rbind, but I couldn't figure out how to do it. What I want at the end is a single "list of lists", again in the form of
2006 Nov 14
2
Problem with file size
Hi everyone, I have 2 environments (2 different R sessions) as described below: Session 1: Name of the environment: "CrlmmInfo" Objects in the environment: index1: logical index - length 238304 index2: logical index - length 238304 priors: list of 4 - (matrix 6x6, 2 vectors of length 6, vector of length 2) - all num params: list of 4: centers [238304 x 3 x
2006 Nov 14
2
Problem with file size
Hi everyone, I have 2 environments (2 different R sessions) as described below: Session 1: Name of the environment: "CrlmmInfo" Objects in the environment: index1: logical index - length 238304 index2: logical index - length 238304 priors: list of 4 - (matrix 6x6, 2 vectors of length 6, vector of length 2) - all num params: list of 4: centers [238304 x 3 x
2009 Jan 27
1
Problem with RMA using limma, oligo and pdInfoBuilder packages
Hi, I am a Ph.D. student from Québec, Canada. I’m a beginner with R and Bioconductor. Until now the only experience I have is in analyzing microarray data using affy and limma packages. Now I am trying to analyze Rat Gene 10 st arrays and I would like to run RMA analysis and Smyth moderated t test on those arrays. Since no cdf official package is available for those arrays, after reading many
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????
2013 Mar 13
2
holding argument(s) fixed within lapply
|Hello, Given a function with several arguments, I would like to perform an lapply (or equivalent) while holding one or more arguments fixed to some common value, and I would like to do it in as elegant a fashion as possible, without resorting to wrapping a separate wrapper for the function if possible. Moreover I would also like it to work in cases where one or more arguments to the original
2010 Apr 19
2
Acceder a varias tablas
Buenas, He creado dos andamios para dos tablas a la que accedo por index1 e index2 respectivamente. En cada index puedo hacer las tareas de añadir, borrar, ver lineas... pero me gustaria saber como se hace una busqueda mas compleja...es decir si tengo una tabla Productos y otra tabla descripciones y quiero mostrar en los productos con sus descripciones... he intentado en el index1 acceder a la
2008 Sep 16
2
casting a character vector as an object
Greetings, I need to compare the ratios of vector sizes like this: length(object1) / length(object2) I have many vector objects to compare, so I would like to do it in a loop. I created a loop like this: mat1 <- matrix() for (i in 1:6) { for (j in 1:6) { mat1[i,j] <- length( paste("object",i,sep="")) /
2007 Jun 07
0
Unique :key not maintained after add_indexes?
Hi, When adding an index to another one using add_indexes I get duplicates even though I use the :key attribute. For example: def test_add_indexes_uniqueness index1 = Ferret::Index::Index.new(:key => :id) index2 = Ferret::Index::Index.new(:key => :id) # Add two items with same id index1 << {:id => 23, :data => "This is the data..."}
2010 Sep 09
0
Fast / dependable way to "stack together" data frames from a list
Hi, everybody: I asked about this in r-help last week and promised a summary of answers. Special thanks to the folks that helped me understand do.call and pointed me toward plyr. We face this problem all the time. A procedure generates a list of data frames. How to stack them together? The short answer is that the plyr package's rbind.fill method is probably the fastest method that is not
2020 Oct 14
0
which() vs. just logical selection in df
Inline. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Oct 14, 2020 at 3:23 PM 1/k^c <kchamberln at gmail.com> wrote: Is which() invoking c-level code by chance, making it slightly faster > on average? > You do not need
2010 May 05
3
concatenate values of two columns
Dear list, I'm trying to concatenate the values of two columns but im not able to do it: i have a dataframe with the following two columns: X VAR1 VAR2 1 2 2 1 3 2 4 3 5 4 6 4 what i would like to
2016 Mar 16
2
match and unique
Is the phrase "index <- match(x, sort(unique(x)))" reliable, in the sense that it will never return NA? Context: Calculation of survival curves involves the concept of unique death times. I've had reported cases in the past where survfit failed, and it was due to the fact that two "differ by machine precision" values would sometimes match and sometimes not,
2020 Oct 11
2
Manipulating DAGs in TableGen
This is a proposal to enhance TableGen's ability to analyze and manipulate DAGs. Hopefully this will allows more complex DAGs to be built in TableGen. 1. Add a new value suffix. value(index) The value must be a DAG. The index specifies the operator or an operand, whose value is produced. The index can be 0 produce the operator 1...n produce operand by
2009 Aug 07
0
Bar plots with stacked columns marked with askterisks
Hi, I'm trying to plot bar graphs with stacked columns marked with askterisks for certain columns, which follow certain criteria. I've gotten the stacked bar plots with Data set A (please refer to code below). However, I haven't figured how to put asterisks on columns based on some extra information (such as "used/unused") as in Data set B i.e. asterisks at the
2020 Oct 14
2
which() vs. just logical selection in df
Hi Dr. Snow, & R-helpers, Thank you for your reply! I hadn't heard of the {microbenchmark} package & was excited to try it! Thank you for the suggestion! I did check the reference source for which() beforehand, which included the statement to remove NAa, and I didn't have any missing values or NAs: sum(is.na(dat$gender2)) sum(is.na(dat$gender)) sum(is.na(dat$y)) [1] 0 [1] 0 [1]
2024 May 05
2
lmer error: number of observations <= number of random effects
I am running a multilevel growth curve model to examine predictors of social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a continuous numeric variable. The age variable (Index1) has been coded as 0 for age 12, 1 for age 15 and 2 for age 18. I am currently using a time varying predictor, stress (LSI), which was measured at ages 12, 15 and 18, to examine whether trajectory/variation
2024 May 05
2
lmer error: number of observations <= number of random effects
I am running a multilevel growth curve model to examine predictors of social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a continuous numeric variable. The age variable (Index1) has been coded as 0 for age 12, 1 for age 15 and 2 for age 18. I am currently using a time varying predictor, stress (LSI), which was measured at ages 12, 15 and 18, to examine whether trajectory/variation
2010 Mar 09
0
Removing Zeros from matrix:Problem fixed
Hey, Thanks for your great inputs. While "index = apply(mat == 0, MARGIN = 1, any)" gives you an idea of the rows containing zero(s), "index<-data[!apply(data==0,MARGIN=1,any),]" does the actual job of removing the rows with zeros. Kind regards Ogbos On 9 March 2010 15:12, Paul Hiemstra <p.hiemstra@geo.uu.nl> wrote: > Dimitris Rizopoulos wrote: > >>