Zheng Da
2014-Nov-13 19:51 UTC
[R] "R CMD Rd2txt" generate "_^H" for in all section titles
Hello, I'm trying to generate plain text from the .Rd files. I run "R CMD Rd2txt xx.Rd -o xx.txt" to get the plain text file. When I open the text file, I see "_^H" in front of each character in all section titles. I can't figure out where the problem is. If I don't specify -o argument, "R CMD Rd2txt" prints on the standard output correctly. What should I do to output everything correctly to a file? Thanks, Da
Duncan Murdoch
2014-Nov-14 00:59 UTC
[R] "R CMD Rd2txt" generate "_^H" for in all section titles
On 13/11/2014, 2:51 PM, Zheng Da wrote:> Hello, > > I'm trying to generate plain text from the .Rd files. I run "R CMD > Rd2txt xx.Rd -o xx.txt" to get the plain text file. When I open the > text file, I see "_^H" in front of each character in all section > titles. I can't figure out where the problem is. If I don't specify -o > argument, "R CMD Rd2txt" prints on the standard output correctly. What > should I do to output everything correctly to a file?That's the old-fashioned way to do underlining. Set the "underline_titles" option (see ?Rd2txt_options) to FALSE if you don't want it. Duncan Murdoch
David Winsemius
2014-Nov-14 01:29 UTC
[R] "R CMD Rd2txt" generate "_^H" for in all section titles
On Nov 13, 2014, at 11:51 AM, Zheng Da wrote:> Hello, > > I'm trying to generate plain text from the .Rd files. I run "R CMD > Rd2txt xx.Rd -o xx.txt" to get the plain text file. When I open the > text file, I see "_^H" in front of each character in all section > titles. I can't figure out where the problem is. If I don't specify -o > argument, "R CMD Rd2txt" prints on the standard output correctly. What > should I do to output everything correctly to a file?I think your (unstated) editor is displaying backspaces with ^H. The Section Header convention in Rd files is with interspersed underscores so they look like: _D_e_s_c_r_i_p_t_i_o_n: The ^H's are apparently being put in to "erase" or squeeze together the text separated by <underscores> and your editor is not handling it in the manner expected.> > Thanks, > Da > > ______________________________________________ > R-help at 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 > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA