Re: [R] R function command on a list

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Thu, 28 Jun 2007 14:23:44 -0300

Try whit "rownames".

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

On 28/06/07, G E <georgehret_at_gmail.com> wrote:

>
> Hello R:
> I am working with a self-defined function and I wish to subject a list
> (t) to this function. My list is a list of tables:
> $rs7609589
> 2/2 2/4 4/4 2/2 2/4 4/4
> 89 188 87 89 188 87
>
> $rs3909907
>
> 1/1 1/4 4/4
> 94 178 92
>
> $rs12748004
>
> 0/0 1/3 3/3
> 37 150 177
>
> $rs6695928
>
> 2/2 2/4 4/4
> 35 129 200
>
> My function looks as follows:
> delete_nocall_listoftables<-function(i){
> names<-names(i)
> i
> if (names[1] == "0/0"){
> i[-(1:1)]
> }else{
> i
> }
> }
>
>
> Within the function, how can I access the table name of a given element (
> e.g.
> $rs3909907)? Using names(i) I get the header of the table...
>
> Thanking you!
> Georg.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]

______________________________________________ R-help_at_stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Thu 28 Jun 2007 - 18:24:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Jun 2007 - 20:34:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.