On Sun, 6 Feb 2011, Tomoaki NISHIYAMA wrote:
Thanks Brian,
That is simply wrong. fileEncoding is a convenience for those too
intellectually challenged to be able to use a file() connection,
something which was always supported.
While I have not found the right document yet,
do you mean that by 2.12 one more line was required for setting encoding,
and as of 2.13, it becomes just one more argument?
You forgot to close the connection.
in old style:
fc <- file('filename', encoding='UTF-8')
write.table(data.frame, file=fc,...)
new style:
write.table(data.frame, file='filename', fileEncoding='UTF-8',...)
I actually noticed "All of these functions can write to a connection which
allows an encoding to be specified for the file,"
but unfortunately it was not linked to any place, and finding the
way to do it required more searches.
Connections are a basic part of R (e.g. in the R Data Import/Export
manual). Why do you expect there to be links to basic concepts?
--
Tomoaki NISHIYAMA
Advanced Science Research Center,
Kanazawa University,
13-1 Takara-machi,
Kanazawa, 920-0934, Japan
--
Brian D. Ripley, rip...@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
_______________________________________________
R-sig-DB mailing list -- R Special Interest Group
R-sig-DB@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-db