Re: [R] loop on list levels and names

2010-01-22 Thread Matthew Dowle
data.table is the package name too. Make sure you find ?"[.data.table" which is linked from ?data.table. You could just do a mean of one variable first, and then build it up from there e.g. dataset[, mean(epLsar), by="SPECSHOR,BONE"]. To get multiple columns of output, wrap with DT() like this

Re: [R] loop on list levels and names

2010-01-22 Thread Ivan Calandra
Thanks for your advice, I will work on it then! Just one last question. In which package can I find the function data.table? Ivan Le 1/22/2010 17:18, Matthew Dowle a écrit : Great. If you mean the crantastic r package, sorry I wasn't clear, I meant the crantastic website http://crantastic.or

Re: [R] loop on list levels and names

2010-01-22 Thread Matthew Dowle
Great. If you mean the crantastic r package, sorry I wasn't clear, I meant the crantastic website http://crantastic.org/. If you meant the description of plyr then if the description looks useful then click the link taking you to the package documentation and read it. Same for any of the othe

Re: [R] loop on list levels and names

2010-01-22 Thread Don MacQueen
Without reading all the details of your question, it looks like maybe split() is what you want. split( dataset, paste(dataset$SPECSHOR,dataset$BONE) ) or split( dataset[,3], paste(dataset$SPECSHOR,dataset$BONE) ) -Don At 5:12 PM +0100 1/21/10, Ivan Calandra wrote: Hi everybody! To use s

Re: [R] loop on list levels and names

2010-01-22 Thread Ivan Calandra
I didn't know about crantastic actually. I've looked what it is exactly and it indeed looks interesting, but I don't really see how I would know that it would help me for the task. There's a description of what it was built for, but how can I then know which function from this package can help

Re: [R] loop on list levels and names

2010-01-21 Thread Matthew Dowle
One way is : dataset = data.table(ssfamed) dataset[, < whatever "some functions" are on Asfc, Smc, epLsar, etc >, by="SPECSHOR,BONE"] Your SPECSHOR and BONE names will be in your result alongside the results of the Or try package plyr which does this sort of thing too. And sqldf may be bett