Re: [R] Writing a list to a file !

From: Kristel Joossens <kristel.joossens_at_econ.kuleuven.be>
Date: Tue 06 Dec 2005 - 21:04:57 EST

as.numeric?

E.g.
R> res
[1] "90" "50" "30"
R> as.numeric(res)
[1] 90 50 30

A Ezhil wrote:
> Hi All,
>
> This may be trivial in R but I have been trying with
> out any success. I have a list of 100 elements each
> having a sub list of different length. I would like to
> write the list to a ASCII file. I tried with
> write.table(), after converting my list to a matrix.
> Now it looks like
>
> Robert c("90", "50", "30")
> John c("91", "20", "25", "45")
>
> How can I get rid off c("", ..)? In my file, I would
> like to have
>
> Robert 90, 50, 30
> John 91, 20, 25, 45
>
> Thanks in advance.
>
> Regards,
> Ezhil
>
> ______________________________________________
> R-help@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

-- 
__________________________________________
Kristel Joossens        Ph.D. Student
Research Center ORSTAT  K.U. Leuven
Naamsestraat 69         Tel: +32 16 326929
3000 Leuven, Belgium    Fax: +32 16 326732
E-mail:  Kristel.Joossens@econ.kuleuven.be
http://www.econ.kuleuven.be/public/ndbae49

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

______________________________________________
R-help@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
Received on Tue Dec 06 21:33:45 2005

This archive was generated by hypermail 2.1.8 : Tue 06 Dec 2005 - 23:38:47 EST