Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将.Rd文件转换为纯文本_R_Plaintext_Rd - Fatal编程技术网

将.Rd文件转换为纯文本

将.Rd文件转换为纯文本,r,plaintext,rd,R,Plaintext,Rd,我正在尝试将R文档文件(扩展名.Rd)转换为纯文本。我知道RdUtils包含一个名为的工具,但据我所知,它只能从命令行使用。有没有办法从R会话中访问Rdconv(或类似的转换工具?您可以随时调用系统命令,例如使用system2功能: input <- '~/Projekty/stringi/man/stri_length.Rd' output <- '/tmp/out.txt' system2('R', paste('CMD Rdconv -t txt', filename, '-o

我正在尝试将R文档文件(扩展名.Rd)转换为纯文本。我知道RdUtils包含一个名为的工具,但据我所知,它只能从命令行使用。有没有办法从R会话中访问Rdconv(或类似的转换工具?

您可以随时调用系统命令,例如使用
system2
功能:

input <- '~/Projekty/stringi/man/stri_length.Rd'
output <- '/tmp/out.txt'
system2('R', paste('CMD Rdconv -t txt', filename, '-o', output))
readLines(output)
## [1] "Count the Number of Characters"
## ...
输入尝试


调用
系统
?请参阅
?工具::rd2Text
帮助页上的其他导出选项
tools::Rd2txt("path/to/file.Rd")