You did not give a good description of your problem, or what you wanted as a
solution (what is a 'button'), or a reasonable idea of what you data is.

Here is one solution

x <- read.table(textConnection("Deafness, EYA4, DIAPH1, MYO7A, TECTA,
COL11A2, POU4F3, MYH9, ACTG1, MYO6"),
    as.is=TRUE, sep=',')
output <- file('output.txt', 'w')
for (i in seq(nrow(x))){
    for (j in 2:ncol(x)){
        cat(x[i,1], ',', x[i,j], '\n', file=output)
    }
}
close(output)

****output.txt file*****
Deafness ,  EYA4
Deafness ,  DIAPH1
Deafness ,  MYO7A
Deafness ,  TECTA
Deafness ,      COL11A2
Deafness ,  POU4F3
Deafness ,  MYH9
Deafness ,  ACTG1
Deafness ,  MYO6


On Thu, Apr 22, 2010 at 7:07 AM, mhalsham <mhalsham@bradford.ac.uk> wrote:

>
> Thanks a lot for the help, but it’s not what I needed.
> --
> View this message in context:
> http://r.789695.n4.nabble.com/R-loop-tp1979620p2020386.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

	[[alternative HTML version deleted]]

