search for: sublists

Displaying 20 results from an estimated 86 matches for "sublists".

Did you mean: sublist
2008 Jul 01
1
extracting elements from a list in vectorized form
Hi; It seems to me that has probably been asked in the past. But I cannot find the track. I usually need to extract elements from a list and contruct vector from them; e.g., to create a table. Perhaps there is a way to directly extract them without looping? Simple example: > S.lst $sublist.1 $sublist.1$age [1] 24.58719 $sublist.1$weight [1] 60.82861 $sublist.2 $sublist.2$age [1] 32.39551
2010 Sep 22
2
efficient list indexing
...elp with lists inside lists (a good way to emulate a struct)\ Assume that there is a small list called fred: fred <- list(happy = 1:10, name = "squash") and a big list called bigfred that includes fred list 5 times bigfred <- rep(fred,5) Is it possible somehow to index all these sublists(fred) inside bigfred with a more direct way like this: bigfred[1] shows the first sublist fred bigfred[2][2] shows the second sublist fred, the second element of the fred list So far I found some way to do this by refering to the sublists by the following: bigfred[1+index*length(fred)] where inde...
2013 Oct 26
1
Compare two lists, with their sublists that have same structure
Dear all, I would like to ask your help concering two R lists. If I did everything should have the same structure (that means the same number of sublists, and their sublists also the same number of sublists). What would change between the two lists is the contents of each element in the lists. Could you please help me understand how I can do that in R? I would like to thank you in advance for your help Regards Alex [[alternative HTML version del...
2011 Aug 04
2
How to extract sublist from a list?
Hi everyone, Suppose I have a list named "lst", see below: > lst $sub1 ... $sub1$x ... $sub1$y .... $sub2 ... $sub2$x ... $sub2$y ? $sub3 ... ... ... Now, I want to extract the sub-sublist $y from every sublist(sub1, sub2...) and then storage them to a new list. I know how to extract them by subscript or list name one by one, but I wonder if there exist some tricks to finish this
2007 Feb 22
3
List filtration
Hello R-ologists, Imagine you have a list "list" like so: >list [[1]] [1] "IPI00776145.1" "IPI00776187.1" [[2]] [1] "Something" "IPI00807764.1" "IPI00807887.1" [[3]] [1] "IPI00807764.1" [[4]] [1] "Somethingelse" What I need to achieve is a filtered list "list2" like so: >list2 [[1]] [1]
2012 Dec 22
1
plotting and saving diagrams automatically
...or easy understanding]Dear useRs, i was wondering that if its possible in R to automatically generate plots and get it saved at the desired location? i have data of cancer patients, from about 1000 cities around the world. i have converted that data into a list (called tcp) and that list has 1000 sublists. the sublists are named, according to the city name. the orientation of the sublists are as follow $ Tokyo month 2009 2010 20111 515 356 1212 444 145 1203 478 147 1244 147 236 1245 785 142 1256 478 111 4787 478 856 7858 147 786 4569 147 122 12310 786 123 14711 123 787 25812 110 898 369 $ Nagoya m...
2006 May 26
0
Hellp needed with sublist plugin
Is there somebody out there who has built a working thingy with the Sublist plugin? I can''t get it to work. I get this error message: undefined method `stringify_keys!'' for "2005":String RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace E:/Programmeren/Ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1506:in
2008 Nov 04
2
strange list structure question
my problem is more complex than below but I think below can suffice. i have a list and the name of it at the top level is GGG. so, if i do an lapply and operate on lower components in the sublist, then I can do as shown in EXAMPLE 1 and what will come back will be named GGG at the top level. but, suppose that , the function inside the lapply function was more complex and i wanted to
2012 Mar 14
2
Apply a loop containing a function on a list
Hi all, I want to do this: B.list$aa= (a loop containing My.fun acting on the reults of second function on a A.list$aa)) or, overally B.list$aa = function (A.list$aa) B.list and A.list has many sublists aa, ab and.... Is there a way I can apply the function and loop on all sublists of A.list and get B.list? Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/Apply-a-loop-containing-a-function-on-a-list-tp4471188p4471188.html Sent from the R help mailing list archiv...
2011 Oct 14
3
Split a list
I have a list of dataframes i.e. each list element is a dataframe with three columns and differing number of rows. The third column takes on only two values. I wish to split the list into two sublists based on the value of the third column of the list element.  Second issue with lists as well. I would like to reduce each of the sublist based on the range of the second column, i.e. if the range of the second column is greater than twenty for example keep the list element. Could someone help me w...
2009 Mar 15
4
primitives again
Dear R Gurus: How do I find the functions which are primitives, please? Thanks, Edna Bell
2012 Jun 11
1
saving sublist lda object with save.image()
Greetings R experts, I'm having some difficulty recovering lda objects that I've saved within sublists using the save.image() function. I am running a script that exports a variety of different information as a list, included within that list is an lda object. I then take that list and create a list of that with all the different replications I've run. Unfortunately I've been having difficul...
2006 Jul 02
4
:order in partial
Hi, i was looking through the docs and couldn''t find a good clean solution for ordering a partial with an :order clause. say i was iterating over categories and thier corresponding sub-categories (regular belongs to) and wanted to order the subcategories according to a certain column; <% for category in @categories %> <% render: partial => ''sublist'',
2011 Nov 16
3
access sublists by a variable
Dear list, I'd like to access the elements of a list within another list with the help of a variable. dict <- list( "24" = c(1,2,3,6,12,24,48,72,96,120,144,168,720), "168" = c(1,12,24,48,72,96,120,144,168,336,504,672), "8760" = c(1,24,168,730,4380,8760) ) dict$"24" works fine, but a <- "24" dict$a returns
2012 Feb 13
2
best subset selection on random effects model
Hi, I know leaps() computes the best subset selection for linear model, and the bestglm() computes the best subset selection for generalized linear model. Is there any package for best subset selection on random effects model, or mixed effects model? Thank you so much. Tao [[alternative HTML version deleted]]
2008 May 14
4
Accessing items in a list of lists
Using R 2.6.2, say I have the following list of lists, "comb": data1 <- list(a = 1, b = 2, c = 3) data2 <- list(a = 4, b = 5, c = 6) data3 <- list(a = 3, b = 6, c = 9) comb <- list(data1 = data1, data2 = data2, data3 = data3) So that all names for the lowest level list are common. How can I most efficiently access all of the sublist items "a" indexed by the outer
2005 Dec 30
1
metaprogramming in controller: accessing instance variables
Hi all, I''m trying to move a bunch of methods out of a controller into a library that I can include and call a class method to have it dynamically add a bunch of methods to the controller. The goal is to just add to each controller: include UIEnhancements::SubList sub_list ''Note'', ''incomplete'' and have the sub_list method create all the methods
2006 Oct 30
2
which duplicated rows to delete
Hi Say I've this vector with several duplicates >x<-c(1,2,3,4,2,6,2,8,2,3) >which(duplicated(x)) [1] 5 7 9 10 11 But what I realy want is somthing like: List({2,5,7}, {3,10}, ...) Then from each sublist I can specify which of the duplicate items to drop res<-NULL for(vec in myDuplicateList) res<-rbind(res, subset(data[vec,], myCrit)) I'll get some of the way by
2013 Jan 07
2
list of lists to matrix
...of 16 and each of of that is further subdivided into variable number of lists. So, i have a kind of list into lists phenomenon. [[1]]$'1' 1 2 3 4 5 6 7 8 9 [[1]]$'2' 1 2 3 4 5 6 7 8 9 i want to convert both these sublists into one column and then cbind it in the following way col1 col2 1 1 2 2 3 3.. 9 9 i want to the same operations on all the 16 lists. thanks in advance, elisa -------------- next part -------------- An embedded and charset-unspecified text wa...
2016 Aug 17
5
code to sort otherwise-unsortable "ilist"s, e.g. symbol tables
Dear all, The below has been tested quite thoroughly by now, including performance-testing by the way of using a modified compiler that triggers the below while compiling at least an old part of LLVM ["Function.cpp"] and sorting a symbol table with >7000 global variables. Unfortunately, the optimization I have been working on for which I _thought_ I needed the ability to sort a