[R] convert list to text file

T.Galesloot at ebh.umcn.nl T.Galesloot at ebh.umcn.nl
Thu Mar 1 11:28:46 CET 2012


Dear R users,

Is it possible to write the following list to a text-file?

List:

[[1]]
[1] 500

[[2]]
[1] 1

[[3]]
    [,1] [,2] [,3] [,4] [,5] 
FID    1    2    3    4    5    
Var    2    0    2    1    1    

I would like to have the textfile look like this:

500
1
FID 1 2 3 4 5 
Var 2 0 2 1 1

Thank you very much in advance for your help!

Kind regards,

Tessel Galesloot
Department of Epidemiology, Biostatistics and HTA (133)
Radboud University Nijmegen Medical Centre



Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629.
The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629.



More information about the R-help mailing list