Re: [R] list element to matrix

2007-09-06 Thread Jim Lemon
[EMAIL PROTECTED] wrote: I have created a list of matrices using sapply or lapply and wish to extract each of the matrices as a matrix. Some of them are 2x2, 3x3, etc. I can do this one at a time as: M1-as.matrix(D[[1]]) How can repeat this process for an unknown number of entries in

[R] list element to matrix

2007-09-05 Thread dverzi
I have created a list of matrices using sapply or lapply and wish to extract each of the matrices as a matrix. Some of them are 2x2, 3x3, etc. I can do this one at a time as: M1-as.matrix(D[[1]]) How can repeat this process for an unknown number of entries in the list? In other words, how

[R] list element to matrix

2007-09-05 Thread Friedrich Schuster
You get the number of list elements with length(D), the dimensions of M1 with dim(M1) see help with: ?dim ?length Hope this helps... I have created a list of matrices using sapply or lapply and wish to extract each of the matrices as a matrix. Some of them are 2x2, 3x3, etc. I can do this

Re: [R] list element to matrix

2007-09-05 Thread jim holtman
If they are already a matrix in the list, then you don't have to use 'as.matrix'; you can just say: M1 - D[[1]] Now the question is, what do you mean by how do you index M1? Do you want to go through the list applying a function to each matrix? If so, then just 'lapply'. For example, to get

[R] list

2007-07-18 Thread elyakhlifi mustapha
Hello, in using vector() we can create a vector and fill in like this v - vector() v - c(v,2) v - c(v,c(5,10,23)) but I wanna know if it's possible to do the same with the list I don't fond how? Can you help me? Thanks.

Re: [R] list

2007-07-18 Thread Christophe Pallier
'c' also works with lists: a=list(1,2,3) b=list(1,2,3) c(a,b) [[1]] [1] 1 [[2]] [1] 2 [[3]] [1] 3 [[4]] [1] 1 [[5]] [1] 2 [[6]] [1] 3 On 7/18/07, elyakhlifi mustapha [EMAIL PROTECTED] wrote: Hello, in using vector() we can create a vector and fill in like this v - vector() v -

[R] list

2007-06-06 Thread elyakhlifi mustapha
hello, I wanna know how to create a list of list if it's possible and if it isn't possible how to do without. thanks. _ [[alternative HTML version deleted]]

Re: [R] list

2007-06-06 Thread David Barron
There's no special method, just create a list in the usual way. For example: l1-list(a=letters[1:5],b=letters[6:10]) l1 $a [1] a b c d e $b [1] f g h i j l2-list(c=LETTERS[1:5],d=LETTERS[6:10]) l2 $c [1] A B C D E $d [1] F G H I J l3-list(l1,l2) l3 [[1]] [[1]]$a [1] a b c d e [[1]]$b

Re: [R] list

2007-06-06 Thread ONKELINX, Thierry
dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens elyakhlifi mustapha Verzonden: woensdag 6 juni 2007 10:59 Aan: R-help@stat.math.ethz.ch Onderwerp: [R] list hello, I wanna know how

Re: [R] list

2007-06-06 Thread John Kane
--- elyakhlifi mustapha [EMAIL PROTECTED] wrote: hello, I wanna know how to create a list of list if it's possible and if it isn't possible how to do without. thanks. Why? The question is not clear and could mean several things. Can you explain a bit?

[R] List filtration

2007-02-22 Thread Johannes Graumann
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] IPI00776145.1 [[2]]

Re: [R] List filtration

2007-02-22 Thread Dimitris Rizopoulos
3:33 PM Subject: [R] 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

Re: [R] List filtration

2007-02-22 Thread Rajarshi Guha
On Thu, 2007-02-22 at 15:33 +0100, Johannes Graumann wrote: Hello R-ologists, [snip] So: - if sublist-entry 1 start with ^IPI make it the list-entry. - otherwise chose the first ^IPI sublist-entry present. - delete the list-entry if not ^IPI sublist-entry present. One way to do it would

Re: [R] List filtration

2007-02-22 Thread Johannes Graumann
Graumann [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Sent: Thursday, February 22, 2007 3:33 PM Subject: [R] 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

[R] list of data frame objects

2007-02-18 Thread Tim McDonald
Hi Folks, I need to extract the list of all my data frame objects. With objects() I can list all objects and was hoping to use something like the following: objects()[is.data.frame(objects())] to extracts all my objects that are data frame... What am I doing wrong? Thanks - Tim

Re: [R] list of data frame objects

2007-02-18 Thread Dimitris Rizopoulos
try something like the following (untested): objs - ls() sapply(objs, function(obj) inherits(get(obj), data.frame)) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35,

[R] List-manipulation

2006-09-29 Thread Benjamin Otto
Hi, Sorry for the question, I know it should be basic knowledge but I'm struggling for two hours now. How do I select only the first entry of each list member and ignore the rest? So for $121_at -113691170 $1255_g_at 42231151 $1316_at 35472685 35472588

Re: [R] List-manipulation

2006-09-29 Thread jim holtman
Is this what you want? x - list(a=1:3, b=30:34, c=40:35) x $a [1] 1 2 3 $b [1] 30 31 32 33 34 $c [1] 40 39 38 37 36 35 lapply(x,'[', 1) $a [1] 1 $b [1] 30 $c [1] 40 unlist(lapply(x,'[', 1)) a b c 1 30 40 On 9/29/06, Benjamin Otto [EMAIL PROTECTED] wrote: Hi, Sorry for the

Re: [R] List-manipulation

2006-09-29 Thread Richard M. Heiberger
You need one of the apply family of functions. ?sapply tmp - list(a=1:2, b=3:5, c=5, dd=numeric(0), e=1:8) sapply(tmp, function(x) x[1]) a b c dd e 1 3 5 NA 1 __ R-help@stat.math.ethz.ch mailing list

Re: [R] List-manipulation

2006-09-29 Thread Tony Plate
Does this do what you want? x - list(1,2,3:7,8,9:10) sapply(x, function(xx) xx[1]) [1] 1 2 3 8 9 -- Tony Plate Benjamin Otto wrote: Hi, Sorry for the question, I know it should be basic knowledge but I'm struggling for two hours now. How do I select only the first entry

[R] list of lists to a data.frame

2006-08-18 Thread Rajarshi Guha
Hi, I have a situation where I have a list of lists. Each list can contain elements of different types (but each one will be a scalar) say of double, integer or character. However the elements of each list are always in the same order: x - list('a', 1, 2) y - list('b', 3, 4) z - list('c', 5, 6)

Re: [R] list of lists to a data.frame

2006-08-18 Thread Marc Schwartz (via MN)
On Fri, 2006-08-18 at 16:44 -0400, Rajarshi Guha wrote: Hi, I have a situation where I have a list of lists. Each list can contain elements of different types (but each one will be a scalar) say of double, integer or character. However the elements of each list are always in the same order:

[R] list to balanced array

2006-08-16 Thread Spencer Jones
I am working with a large data set of arrivals, for each day I have aggregated the arrivals into hrs (1-24) via: apply(x,2,table). On some days there are zero arrivals during some hours of the day, this leaves me with (I believe) a list of vectors of differnt lengths (see below). [[4]] 1 2 3

Re: [R] list to balanced array

2006-08-16 Thread Dimitris Rizopoulos
, 2006 5:22 PM Subject: [R] list to balanced array I am working with a large data set of arrivals, for each day I have aggregated the arrivals into hrs (1-24) via: apply(x,2,table). On some days there are zero arrivals during some hours of the day, this leaves me with (I believe) a list

[R] List 'sssitalk' closed to public posts

2006-07-13 Thread NIU Sociology Listserver
Sorry, but your posting is being returned to you. The list is temporarily restricted. If your post is substantive, dealing with SSSI issues, it will be forwarded to the list. If it is intended as private email, it will be forwarded accordingly. If you wish to subscribe to SSSITALK, send a

[R] list of interdependent functions

2006-06-20 Thread Thomas Petzoldt
Hello, I discussed the following problem on the great useR conference with several people and wonder if someone of you knows a more elegant (or more common ?) solution than the one below. The problem: I have several sets of interrelated functions which should be compared. The

Re: [R] list of interdependent functions

2006-06-20 Thread Thomas Petzoldt
Martin Morgan wrote: Here's another way: makeSolver - function() { f1 - function(x, K) K - x f2 - function(x, r, K) r * x * f1(x, K) function() f1(3,4) + f2(1,2,3) } solverB - makeSolver() solverB() makeSolver (implicitly) creates an environment, installs f1 and f2 into it,

[R] List to Array

2006-04-05 Thread Werner Wernersen
Hi, this is probably the easiest thing to do but I manage not finding the answer: I have a list with matrices of exact same format and headers. Now I would like to transform the list into an normal array. What is the proper way to do this? as.array changes the entire format and right now I only

Re: [R] List to Array

2006-04-05 Thread Dimitris Rizopoulos
: [R] List to Array Hi, this is probably the easiest thing to do but I manage not finding the answer: I have a list with matrices of exact same format and headers. Now I would like to transform the list into an normal array. What is the proper way to do this? as.array changes the entire

Re: [R] List to Array

2006-04-05 Thread Gabor Grothendieck
Please supply some test data and the expected answer since its not clear what is desired here. On 4/5/06, Werner Wernersen [EMAIL PROTECTED] wrote: Hi, this is probably the easiest thing to do but I manage not finding the answer: I have a list with matrices of exact same format and headers.

Re: [R] List to Array

2006-04-05 Thread Ben Bolker
Werner Wernersen pensterfuzzer at yahoo.de writes: Hi, this is probably the easiest thing to do but I manage not finding the answer: I have a list with matrices of exact same format and headers. Now I would like to transform the list into an normal array. What is the proper way to do

Re: [R] List to Array

2006-04-05 Thread Gabor Grothendieck
On 4/5/06, Ben Bolker [EMAIL PROTECTED] wrote: Werner Wernersen pensterfuzzer at yahoo.de writes: Hi, this is probably the easiest thing to do but I manage not finding the answer: I have a list with matrices of exact same format and headers. Now I would like to transform the list

Re: [R] List to Array

2006-04-05 Thread Werner Wernersen
Oh yes, I should give an example: m - matrix(1:6,nrow=3) L - list(m,m) Output of L: [[1]] [,1] [,2] [1,]14 [2,]25 [3,]36 [[2]] [,1] [,2] [1,]14 [2,]25 [3,]36 I would like to transform L to and array looking like this: , , 1 [,1]

Re: [R] List to Array

2006-04-05 Thread Dimitris Rizopoulos
Grothendieck [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Wednesday, April 05, 2006 3:55 PM Subject: Re: [R] List to Array Oh yes, I should give an example: m - matrix(1:6,nrow=3) L - list(m,m) Output of L: [[1]] [,1] [,2] [1,]14 [2,]25 [3,]36 [[2

Re: [R] List to Array

2006-04-05 Thread Gabor Grothendieck
/biostat/ http://www.student.kuleuven.be/~m0390867/dimitris.htm - Original Message - From: Werner Wernersen [EMAIL PROTECTED] To: Gabor Grothendieck [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch Sent: Wednesday, April 05, 2006 3:55 PM Subject: Re: [R] List to Array Oh yes, I

Re: [R] List to Array

2006-04-05 Thread Werner Wernersen
: Wednesday, April 05, 2006 3:55 PM Subject: Re: [R] List to Array Oh yes, I should give an example: m - matrix(1:6,nrow=3) L - list(m,m) Output of L: [[1]] [,1] [,2] [1,]14 [2,]25 [3,]36 [[2]] [,1] [,2] [1,]14 [2

[R] List Conversion

2006-02-08 Thread Liz Dem
Hello, I have a list (mode and class are list) in R that is many elements long and of the form: length(list) [1] 5778 list[1:4] $ID1 [1] num1 $ID2 [1] num2 num3 $ID3 [1] num4 $ID4 [1] NA I'd like to convert the $ID2 value to be in one element rather than in two.  It shows up as c(\num2\,

Re: [R] List Conversion

2006-02-08 Thread Berwin A Turlach
LD == Liz Dem [EMAIL PROTECTED] writes: LD I have a list (mode and class are list) in R that is many elements long and of the form: length(list) LD [1] 5778 list[1:4] LD $ID1 LD [1] num1 LD $ID2 LD [1] num2 num3 LD $ID3 LD [1] num4 LD $ID4 LD

Re: [R] List of lists???

2006-02-01 Thread Stephane CRUVEILLER
Thx for the hint... the div - factor(c(1,1,1,2,2)) did exactly what I was expecting... Stéphane. Le Mardi 31 Janvier 2006 15:50, Gabor Grothendieck a écrit : Your post seems to be messed up but I will assume you have a 5 column data frame and the questino is how to run f on the first three

[R] List of lists???

2006-01-31 Thread Stephane CRUVEILLER
Hi, I would like to perform computations on some variables belonging to the same dataframe. For instance my data frame has the following shape: toto1   toto2   toto3   toto4   toto5 1   1   2   3   4   5 2   6   7   8   9   10 I would like to

Re: [R] List of lists???

2006-01-31 Thread Gabor Grothendieck
Your post seems to be messed up but I will assume you have a 5 column data frame and the questino is how to run f on the first three columns and separately on the last two. I think the easiest is just the following where I have used the builtin iris data set where I have assumed that the

Re: [R] list entries file into a list

2006-01-27 Thread Albert Vilella
This worked great but I'm a bit confused about how to access the names (keys?) of a list in a loop, and why this is failing for me: I want to cross the entries in mylist (like entry0001) with the columns of a dataframe ginput: $entry0001 [1] AB0032 CF32134 DF34334 $entry0002 [1] AB0033

Re: [R] list entries file into a list

2006-01-27 Thread Seth Falcon
On 27 Jan 2006, [EMAIL PROTECTED] wrote: But mylist$entrylabel is not working inside the loop. '$' doesn't evaluate its argument. You want mylist[[entrylabel]]. I haven't been able to found my way with R lists, maybe because I'm comparing them with perl's hashes. R lists do have names, but

[R] list entries file into a list

2006-01-26 Thread Albert Vilella
Hi all, I have a file of this kind: entry0001:AB0032,CF32134,DF34334 entry0002:AB0033 entry0003:AB0032,CF32134,DF34334,DD343434,DD34222 entry0004:AB0032,CF32134 And I would like to read it into something like a hash, so that I can then loop over it by keys and values. I wonder which would be

Re: [R] list entries file into a list

2006-01-26 Thread Liaw, Andy
The following might be what you want (replace clipboard with your filename): mylist - strsplit(readLines(clipboard), :) nm - sapply(mylist, [, 1) mylist - lapply(mylist, [, -1) names(mylist) - nm mylist - lapply(mylist, function(s) strsplit(s, ,)[[1]]) mylist $entry0001 [1] AB0032 CF32134

Re: [R] List Email Statistic

2005-10-01 Thread Adaikalavan Ramasamy
This also depends on which field you are interested in, for example MEDSTATS (http://tinyurl.com/bwha8) ED-STATS (http://lists.psu.edu/archives/edstat-l.html) and a few more http://tinyurl.com/a8wo4 Regards, Adai On Fri, 2005-09-30 at 07:32 -0500, Marc Schwartz wrote: On Thu, 2005-09-29

Re: [R] List Email Statistic

2005-10-01 Thread Marc Schwartz
Indeed. I was not aware of the additional non-usenet statistics Google Groups. Some familiar names on the MEDSTATS list... :-) Thanks Adai. Marc On Sat, 2005-10-01 at 18:17 +0100, Adaikalavan Ramasamy wrote: This also depends on which field you are interested in, for example MEDSTATS

[R] List Email Statistic

2005-09-30 Thread José Raul Capablanca
Dear All, How can I can to know a mail list , to speak about exclusively statistic. Thanks. __ Espacio para todos tus mensajes, antivirus y antispam ¡gratis! __ R-help@stat.math.ethz.ch mailing list

Re: [R] List Email Statistic

2005-09-30 Thread Gabor Grothendieck
There is some discussion and data sources of the volume of email on the list in: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/27532.html On 9/30/05, José Raul Capablanca [EMAIL PROTECTED] wrote: Dear All, How can I can to know a mail list , to speak about exclusively statistic. Thanks.

Re: [R] List Email Statistic

2005-09-30 Thread Jim Lemon
José Raul Capablanca wrote: Dear All, How can I can to know a mail list , to speak about exclusively statistic. Thanks. Hola Jose, If you mean a list devoted exclusively to statistics (Si desea una lista solo para la statistica) http://www.jiscmail.ac.uk/lists/allstat.html (y una lista

Re: [R] List Email Statistic

2005-09-30 Thread Ted Harding
On 30-Sep-05 Jim Lemon wrote: José Raul Capablanca wrote: Dear All, How can I can to know a mail list , to speak about exclusively statistic. Thanks. Hola Jose, If you mean a list devoted exclusively to statistics (Si desea una lista solo para la statistica)

Re: [R] List Email Statistic

2005-09-30 Thread Marc Schwartz
On Thu, 2005-09-29 at 23:47 -0500, José Raul Capablanca wrote: Dear All, How can I can to know a mail list , to speak about exclusively statistic. Thanks. If you have access to Usenet either via an NNTP server or via Google Groups, there are three principal groups for general statistics

[R] List and Column Names in a Function?

2005-05-13 Thread khobson
In this simple function, how can I pass strings for index and column names to the function? I've posted this type of question before and received no response. Maybe this example will be easier to understand and troubleshoot. ds - function(myds, vec) {myds[[vec]]*2} ds1 - c(X=list(1:10),

Re: [R] List and Column Names in a Function?

2005-05-13 Thread Douglas Bates
[EMAIL PROTECTED] wrote: In this simple function, how can I pass strings for index and column names to the function? I've posted this type of question before and received no response. Maybe this example will be easier to understand and troubleshoot. ds - function(myds, vec)

[R] List of tables rather than an extra dimension in the table or (l)apply(xtabs)

2005-03-21 Thread Mulholland, Tom
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions. I am trying to process all the regions at the same time without using for. So I need (think, I do) a list of matrices

RE: [R] List of tables rather than an extra dimension in the table or (l)apply(xtabs)

2005-03-21 Thread Mulholland, Tom
-Help (E-mail) Subject: [R] List of tables rather than an extra dimension in the table or (l)apply(xtabs) I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions. I am

Re: [R] R: LIST function and LOOPS

2005-03-12 Thread Uwe Ligges
) { set.seed(j+1+(i-1)*6) r-rnorm(1) ss-ss+r } list(ss=ss) } } check.1-z1(3) check.1 the results is: $ss [1] -0.01516304 what i want is something that looks like this: j=1 $ss [1] -2.213343 j=2 $ss [1] -2.904235 j=3 $ss [1] -0.01516304 i know that i could use

Re: [R] R: LIST function and LOOPS

2005-03-11 Thread Clark Allan
such that there are no loops. but lets leave the loops in for now.) z1-function(w) { for (i in 1:w) { set.seed(i+6) ss-0 for (j in 1:5) { set.seed(j+1+(i-1)*6) r-rnorm(1) ss-ss+r } list(ss=ss) } } check.1-z1(3) check.1

[R] R: LIST function and LOOPS

2005-03-10 Thread Clark Allan
) { set.seed(j+1+(i-1)*6) r-rnorm(1) ss-ss+r } list(ss=ss) } } check.1-z1(3) check.1 the results is: $ss [1] -0.01516304 what i want is something that looks like this: j=1 $ss [1] -2.213343 j=2 $ss [1] -2.904235 j=3 $ss [1] -0.01516304 i know that i could use

Re: [R] R: LIST function and LOOPS

2005-03-10 Thread Adaikalavan Ramasamy
) ss-ss+r } list(ss=ss) } } check.1-z1(3) check.1 the results is: $ss [1] -0.01516304 what i want is something that looks like this: j=1 $ss [1] -2.213343 j=2 $ss [1] -2.904235 j=3 $ss [1] -0.01516304 i know that i could use the print command. (see z2) z2

Re: [R] list(0) to integer

2004-12-30 Thread Romain François
Re-Hello frederic, Don't worry, i have the same english speaking problem, here is what i suggest : n - natScan() natScan - function(){ cat(\n) cat(Give me a natural (everything after the '.' will be ignored)\n) n - scan(,

Re: [R] list(0) to integer

2004-12-27 Thread Tobias Verbeke
On Mon, 27 Dec 2004 03:18:53 -0800 (PST) Frederic renaud [EMAIL PROTECTED] wrote: Hello I've another question :-) I would like to transform a list to a integer. I must be sure that the number entered by the user is an integer! Thus, I've made : repeat{ cat(Effectif des populations

[R] list of lists question

2004-11-23 Thread Karla Sartor
Hello all, As a general programming question I can't seem to figure out how to make a list of lists in R. As matrices won't work as they have to be rectangular. I am sure that there is an easy solution but... the specific situation is this: - I have created a Tukey confidence interval table and

RE: [R] list of lists question

2004-11-23 Thread Liaw, Andy
From: Karla Sartor Hello all, As a general programming question I can't seem to figure out how to make a list of lists in R. As matrices won't work as they have to be rectangular. I am sure that there is an easy solution but... the specific situation is this: - I have created a

Re: [R] list of lists question

2004-11-23 Thread Spencer Graves
Is the following more like what you want: a=c(1,1,1,1,1) # generate the first list b=c(2,2,2)# generate a second list d=list(a,b)# make a list of a and b ( e=c(d,a) ) [[1]] [1] 1 1 1 1 1 [[2]] [1] 2 2 2 [[3]] [1] 1 [[4]] [1] 1

[R] list - environment coercion

2004-11-09 Thread Valery A.Khamenya
Hi all, there is environment-list coercion, i.e. as.list.environment. Is there any list-environment coercion? thank you. -- Valery. __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

Re: [R] list - environment coercion

2004-11-09 Thread Dimitris Rizopoulos
] To: [EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 4:56 PM Subject: [R] list - environment coercion Hi all, there is environment-list coercion, i.e. as.list.environment. Is there any list-environment coercion? thank you. -- Valery. __ [EMAIL PROTECTED

[R] List seems to drop empty levels of factors when containing them

2004-11-09 Thread Andrew Robinson
Greetings R community, I am curious about the following behaviour: if I define a factor, and then store a subset of it in a list, the stored version seems to drop levels that were not included in the subset. E.g. .. mask - c(T, F) grp.1 - factor(c(1,2)) list(grp.1) [[1]] [1] 1 2 Levels: 1 2

RE: [R] List seems to drop empty levels of factors when containin g them

2004-11-09 Thread Austin, Matt
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Andrew Robinson Sent: Tuesday, November 09, 2004 19:44 PM To: R-Help Discussion Cc: Andrew Robinson Subject: [R] List seems to drop empty levels of factors when containing them Greetings R community, I am curious about

Re: [R] List seems to drop empty levels of factors when containing them

2004-11-09 Thread Sundar Dorai-Raj
Andrew Robinson wrote: Greetings R community, I am curious about the following behaviour: if I define a factor, and then store a subset of it in a list, the stored version seems to drop levels that were not included in the subset. E.g. .. mask - c(T, F) grp.1 - factor(c(1,2)) list(grp.1) [[1]]

Re: [R] List seems to drop empty levels of factors when containin g them

2004-11-09 Thread Andrew Robinson
PM To: R-Help Discussion Cc: Andrew Robinson Subject: [R] List seems to drop empty levels of factors when containing them Greetings R community, I am curious about the following behaviour: if I define a factor, and then store a subset of it in a list, the stored version seems to drop

[R] list files ignoring the case option

2004-11-04 Thread Adaikalavan Ramasamy
Sorry if this is a question more on regular expressions. I am dealing with several files which have been badly named. For example the files are given either the extensions txt, TXT or Txt. I wish to select all those files ending with 'txt' ignoring case. Here is how I would do it in bash (Redhat

Re: [R] list files ignoring the case option

2004-11-04 Thread Prof Brian Ripley
On Thu, 4 Nov 2004, Adaikalavan Ramasamy wrote: Sorry if this is a question more on regular expressions. I am dealing with several files which have been badly named. For example the files are given either the extensions txt, TXT or Txt. I wish to select all those files ending with 'txt'

Re: [R] list files ignoring the case option

2004-11-04 Thread Adaikalavan Ramasamy
Thanks to Sundar Dorai-Raj, Prof. Ripley and Berton Gunter for the solution. I think I will take Prof. Ripley's suggestion and stick with my initial solution for code readability but I am sure the regexp stuff will come handy next time. On Thu, 2004-11-04 at 15:10, Prof Brian Ripley wrote: On

[R] R list

2004-10-29 Thread Leonardo L Miceli
Hi Is there any function to get the name of the components of a given list object? ok. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!

RE: [R] R list

2004-10-29 Thread Robert Sams
names() is what you want, if i understand your question correctly. cheers, robert -Original Message- From: Leonardo L Miceli [mailto:[EMAIL PROTECTED] Sent: Friday, October 29, 2004 3:22 PM To: [EMAIL PROTECTED] Subject: [R] R list Hi Is there any function to get the name

RE: [R] R list

2004-10-29 Thread Liaw, Andy
Yes, names(). Andy From: Leonardo L Miceli Hi Is there any function to get the name of the components of a given list object? ok. [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list

Re: [R] R list

2004-10-29 Thread Giovanni Petris
What about names() ? Giovanni Date: Fri, 29 Oct 2004 11:21:35 -0300 From: Leonardo L Miceli [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] Cc: Precedence: list Hi Is there any function to get the name of the components of a given list object? ok. [[alternative HTML

Re: [R] Proposal for New R List: Criticism? Comments?

2004-09-19 Thread Jim Lemon
It seems to me that \concept{} is simply another code for My keyword is your search term. I do not consider myself to be one of the better informed users of R, yet the frequency with which I resort to a full text search is less than once a month. For such an infrequent task, I find it no problem

RE: [R] Proposal for New R List: Criticism? Comments?

2004-09-17 Thread Martin Maechler
PROTECTED] Sent: Friday, September 10, 2004 5:26 AM To: Jonathan Baron Cc: Adaikalavan Ramasamy; John Fox; R-help; 'Berton Gunter' Subject: Re: [R] Proposal for New R List: Criticism? Comments? On Fri, 10 Sep 2004, Jonathan Baron wrote: On 09/10/04 03:54

RE: [R] Proposal for New R List: Criticism? Comments?

2004-09-17 Thread John Fox
-Original Message- From: Martin Maechler [mailto:[EMAIL PROTECTED] Sent: Friday, September 17, 2004 7:57 AM To: John Fox Cc: 'R-help' Subject: RE: [R] Proposal for New R List: Criticism? Comments? Hi John et al. I'm coming late to this thread (because of vacation), JohnF

Re: [R] Proposal for New R List: Criticism? Comments?

2004-09-10 Thread Jonathan Baron
On 09/10/04 03:54, Adaikalavan Ramasamy wrote: There is another issue to be considered. Currently you need to have the relevant packages installed before help.search() bring it up. My work around this is to install all available packages just in case the function I need is nestled in some

Re: [R] Proposal for New R List: Criticism? Comments?

2004-09-10 Thread Prof Brian Ripley
On Fri, 10 Sep 2004, Jonathan Baron wrote: On 09/10/04 03:54, Adaikalavan Ramasamy wrote: There is another issue to be considered. Currently you need to have the relevant packages installed before help.search() bring it up. My work around this is to install all available packages just in case

RE: [R] Proposal for New R List: Criticism? Comments?

2004-09-10 Thread John Fox
, September 10, 2004 5:26 AM To: Jonathan Baron Cc: Adaikalavan Ramasamy; John Fox; R-help; 'Berton Gunter' Subject: Re: [R] Proposal for New R List: Criticism? Comments? On Fri, 10 Sep 2004, Jonathan Baron wrote: On 09/10/04 03:54, Adaikalavan Ramasamy wrote: There is another issue

Re: [R] Proposal for New R List: Criticism? Comments?

2004-09-10 Thread Adaikalavan Ramasamy
Just finished updating and installing new packages from CRAN and BioConductor (including annotation data) and am happy to say that my R has just exceeded the 1 GB mark. On Fri, 2004-09-10 at 10:11, Jonathan Baron wrote: On 09/10/04 03:54, Adaikalavan Ramasamy wrote: There is another issue to

[R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread Berton Gunter
Folks: I would like to propose a new R list, tentatively labeled r-contents. I wish to briefly explain the purpose and format here and solicit public comments, pro or con, so feel free to criticize or suggest a better name and other improvements or alternatives. R presently consists of a suite

Re: [R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread Jonathan Baron
I think that a lot of posts on r-help are exactly of the form you suggest: How do I do X? Answer: Use Y. (Or maybe, Use Y. And next time RTFM. But so what. The answer is still there.) Often, when the answer is not of that form, the question is unclear. In other cases, the questioner is

RE: [R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread John Fox
AM To: [EMAIL PROTECTED] Subject: [R] Proposal for New R List: Criticism? Comments? Folks: I would like to propose a new R list, tentatively labeled r-contents. I wish to briefly explain the purpose and format here and solicit public comments, pro or con, so feel free to criticize

Re: [R] List dimention labels to plots of components

2004-08-20 Thread Uwe Ligges
White, Charles E WRAIR-Wash DC wrote: It is frustrating to see the labels I want in the dimensions of a list but not be able to extract those labels into titles for plots generated from component objects. If someone could set me straight, I would appreciate it. For your amusement, I have provided

RE: [R] List dimention labels to plots of components

2004-08-20 Thread White, Charles E WRAIR-Wash DC
My goal is more efficient code for something I anticipate doing a lot. My example code from my first message works because I insert a seemingly redundant recording of Dose Treatment in the list generated in the by command. Since Dose Treatment are already recorded in the dimensions of the list,

[R] List dimention labels to plots of components

2004-08-19 Thread White, Charles E WRAIR-Wash DC
It is frustrating to see the labels I want in the dimensions of a list but not be able to extract those labels into titles for plots generated from component objects. If someone could set me straight, I would appreciate it. For your amusement, I have provided an example of the Byzantine code I

[R] list of frames without first element

2004-08-06 Thread Luis Rideau Cruz
R-help, I have a list of several data frames. I want to compute the rowSums of the columns of these data frames but first one. Something like this lapply(my.list,rowSums) Thank you Luis Ridao Cruz Fiskirannsóknarstovan Nóatún 1 P.O. Box 3051 FR-110 Tórshavn Faroe

RE: [R] list of frames without first element

2004-08-06 Thread Liaw, Andy
From: Luis Rideau Cruz R-help, I have a list of several data frames. I want to compute the rowSums of the columns of these data frames but first one. Something like this lapply(my.list,rowSums) You're almost there: lapply(my.list, function(x)

Re: [R] list of frames without first element

2004-08-06 Thread Uwe Ligges
Luis Rideau Cruz wrote: R-help, I have a list of several data frames. I want to compute the rowSums of the columns of these data frames but first one. ... but first data.frame or but first column? but first data.frame: lapply(my.list[-1], rowSums) but first column: lapply(my.list, function(x)

[R] list problem

2004-07-27 Thread Luis Rideau Cruz
Hi all, I have the folowing frame(there are more columns than shown), 1 2 34 5 Year Total TusWhi Norw 1994 1.00 1830 0 355 1995 1.00 0 00 1995 1.00 0

Re: [R] list problem

2004-07-27 Thread Dimitris Rizopoulos
Message - From: Luis Rideau Cruz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:22 PM Subject: [R] list problem Hi all, I have the folowing frame(there are more columns than shown), 1 2 34 5 Year Total Tus

Re: [R] list problem

2004-07-27 Thread Berton Gunter
Message - From: Luis Rideau Cruz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:22 PM Subject: [R] list problem Hi all, I have the folowing frame(there are more columns than shown), 1 2 34 5 Year Total

[R] list of S3-methods

2004-07-14 Thread Meinhard Ploner
how can I get a list of all S3-methods (of a package) such that I know which functions to include in the S3method() in the NAMESPACE-file? Maybe separated by generic=T/F. thx Meinhard Ploner Vienna __ [EMAIL PROTECTED] mailing list

Re: [R] list of S3-methods

2004-07-14 Thread Uwe Ligges
Meinhard Ploner wrote: how can I get a list of all S3-methods (of a package) such that I know which functions to include in the S3method() in the NAMESPACE-file? Maybe separated by generic=T/F. thx Meinhard Ploner Vienna Since one you does not register S3 methods (except for the Namespace file),

Re: [R] list of S3-methods

2004-07-14 Thread Meinhard Ploner
Meinhard Ploner wrote: how can I get a list of all S3-methods (of a package) such that I know which functions to include in the S3method() in the NAMESPACE-file? Maybe separated by generic=T/F. thx Meinhard Ploner Vienna Since one you does not register S3 methods (except for the Namespace file),

  1   2   >