简体   繁体   English

包装编织者不使用Rstudio

[英]The package knitr without using Rstudio

As a beginner I do not know whether I can use the package knitr without using Rstudio and only with using open-source R (not with a special graphical user interface for R) or with using Revolution R enterprise? 作为初学者,我不知道我是否可以在不使用Rstudio的情况下使用包编织器,只使用开源R(不使用R的特殊图形用户界面)或使用Revolution R企业?

I have not found any example or tutorial to use knitr in Revolution R enterprise or open-source R. 我没有找到任何在Revolution R企业或开源R中使用knitr的示例或教程。

As far as I know, In Rstudio, I can create an R Sweave document and then compile Pdf for a document with Rnw extension but what should I do to make a Sweave document in Revolution R Enterprise or in open-source R. 据我所知,在Rstudio中,我可以创建一个R Sweave文档,然后为具有Rnw扩展名的文档编译Pdf但是我该如何在Revolution R Enterprise或开源R中制作Sweave文档。

Thanks in advance for any help 在此先感谢您的帮助

Finally, I had to make a Sweave document in Rstudio (called Latex.Rnw) and run the following commands in Revolution R Enterprize since I could not find how to make a Sweave document in Revolution R Enterprize! 最后,我必须在Rstudio中创建一个Sweave文档(称为Latex.Rnw)并在Revolution R Enterprize中运行以下命令,因为我无法在Revolution R Enterprize中找到如何制作Sweave文档!

library(knitr)
Myfile = system.file("Latex","Latex.Rnw", package = "knitr")
knit(Myfile,output="C:/Users/shima/Documents/R/win-library/2.14/knitr/Latex/Latex.tex")
setwd("C:/Users/shima/Documents/R/win-library/2.14/knitr/Latex")
tools::texi2pdf("C:/Users/shima/Documents/R/win-library/2.14/knitr/Latex/Latex.tex")

It was a really tedious job to compile the document from Revolution R Enterprize and I eventually gave it up. 从Revolution R Enterprize编译文档是一项非常繁琐的工作,我最终放弃了。

knitr is a stand-alone R package that can be used with any version of R. To install in any version of R, just type: knitr是一个独立的R包,可以与任何版本的R一起使用。要安装在任何版本的R中,只需输入:

install.packages("knitr")

Documentation and demos can be found at http://yihui.name/knitr/ 文档和演示可以在http://yihui.name/knitr/找到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM