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]]

______________________________________________
[email protected] 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.

Reply via email to