2012-12-26 2 views
1

어떻게 도움말 출력 파일을 txt 파일에 저장할 수 있습니까?도움말 출력을 텍스트 파일에 저장

write(help(reshape),file="/home/debian/test") 

이 작동하지 않습니다.

+0

아마도 이런 일이 도움이 될 것입니다 :'CP /usr/lib64/R/library/stats/html/reshape.html/홈/데비안/테스트 ' –

답변

4

발굴 및 utils:::print.help_files_with_topic의 내장에서 적응 :

file <- help("reshape") 
pkgname <- basename(dirname(dirname(file))) 
temp <- tools::Rd2txt(utils:::.getHelpFile(file), out = tempfile("Rtxt"), 
        package = pkgname) 
file.copy(temp,"~/test.txt") 
관련 문제