问题标签 [rstudio]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
748 浏览

pdf - Rstudio 中的 Latex 错误

*编辑)这很奇怪,以前发生在我身上。我将在其他一些编辑器(例如 TeXshop)中制作文档,然后它会编译。然后我将代码复制并粘贴到 RStudio 中,点击编译,它会工作,但在 TeXshop 中编译之前无法工作。下次发生这种情况时我会扔掉日志文件

我正在尝试改用 LaTex,但行话和技术细节使这看起来很霸道。

在使用 Rstudio 并编辑 .tex 文档时,为了我,我似乎无法“编译 pdf”。

“运行 texi2dvi...工具中的错误:::texi2dvi(文件 = 文件名,pdf = TRUE,索引 = 索引):在 'lab5real.tex' 上运行 'texi2dvi' 失败。消息:/usr/bin/texi2dvi: pdflatex 已退出状态不佳,退出。/usr/bin/texi2dvi:请参阅 lab5real.log 了解错误。”

0 投票
1 回答
747 浏览

r - 什么是基于 R 的 Web 界面?它们有什么特点?

基于 R 的 Web 控制台有哪些特点?它们的优点和缺点是什么?

0 投票
1 回答
3530 浏览

git - 从 RStudio 推送到 Github

当您使用 RStudio 时,您的 git 工作流程是什么样的?

我想开始使用 github 对我的脚本进行源代码控制。我知道您可以使用命令行/终端来推送存储库,但一直找不到 git 的包。有什么建议吗?

或者,我可以使用以下system命令:system("git push")

谁能建议一个更好/更优雅的方法来做到这一点?

0 投票
1 回答
948 浏览

r - 在 Rstudio 服务器中使用 regsubset 穷举方法时如何实现多核处理器

我将如何重写我的代码,以便我可以在 Rstudio 服务器上实现多核的使用,以regsubsets使用“穷举”方法从跨越包运行?数据有 1200 个变量和 9000 个 obs,所以这里的代码被缩短了:

我们的服务器是一个四核 7.5 GB 内存,对于这样的等式是否足够?

0 投票
7 回答
29472 浏览

r - Plotting during a loop in RStudio

I am implementing a solution to the Traveling Salesman Problem (TSP) in R (simulated Annealing) and I want to output the current best path periodically. I have searched quite a bit for how to output plots during a for loop and have thus far failed.

I use RStudio, and want to see the graphs as they are generated. If you have ever watched TSP solvers do their thing, you will understand how cool it is to watch. Here is a sample of the graphics output I want to see http://www.staff.science.uu.nl/~beuke106/anneal/anneal.html

I don't think that the memory usage will be a problem (during about 500,000 iterations, I am only expecting 50-100 plots). Here is a sample function, where we would expect to see 10 different plots during the time the function runs:

When I run this, all I see is the final plot produced (in RStudio). How can I see the plots as they're generated?

Also: I am on Ubuntu (whatever the newest stable release is). Don't know if that is relevant.

Thank you everyone in advance.

EDIT: Per Captain Murphy's suggestion, I tried running this in the Linux terminal, and the graphics appeared. I still think the question of "How to do this in RStudio?" Is still relevant, however. It's such a good program, so maybe someone has an idea of what could be done to get this to work?

EDIT2: As Thilo stated, this is a known bug in Rstudio. If anyone has any other ideas to solve this without the software itself being fixed, then there is still something to discuss. Otherwise, consider this question solved.

0 投票
1 回答
2339 浏览

macos - 系统路径与 Sys.getenv('PATH')

这可能是一个相当微不足道的问题,但让我困惑了很长一段时间。当我安装通用文档转换器pandoc并将其添加到我的路径时,这一切都开始了。因此,当我echo $PATH在 Mac OS X 上的默认终端上执行操作时,它会显示pandoc并且我能够执行它。

但是,当我尝试在 R 会话中使用 调用相同的内容时system(pandoc --version),它无法识别pandoc. 进一步检查显示,system('echo $PATH')它不会返回我在终端上得到的相同路径。

任何人都可以帮我解决正在发生的事情吗?我喜欢RStudiopandoc. 因此需要弄清楚这一点。

0 投票
2 回答
2582 浏览

r - 在需要更新版本的 R 的 Ubuntu 10.04 上从源代码安装 RStudio

当尝试从源代码 R 在 Ubuntu 10.04 上安装 RStudio 时,需要预先安装,在尝试使用 cmake 功能安装 RStudio 时,需要经过一系列步骤来安装最新版本的 R(即版本 2.14.1)它仍然会抛出一个错误,说我的版本太旧了,我至少需要 R 版本 2.11。

从错误消息中,我查看了 CMakeLists.txt,但我不太确定该怎么做才能使其指向正确的新版本 R。

下面是它在 EC2 实例上创建的问题的说明。

任何帮助,将不胜感激...

这是 CMakeLists.txt 文件

0 投票
6 回答
127417 浏览

r - 不使用 dev.off() 将图形参数重置为默认值

例如边距、方向等...

dev.off()对我不起作用。我经常使用带有内置图形设备的 RStudio。然后我有绘图功能,我想在默认的 RStudio 图形设备中进行绘图,或者如果我调用X11()了 ,则在新窗口中进行绘图。

此行为不适用于dev.off(). 如果我的绘图函数总是调用dev.off(),它可能会无意中关闭X11()窗口,而是在 RStudio 设备中绘图。如果我总是调用dev.off()后跟X11(),它总是会在新窗口中绘制,即使我想在 RStudio 设备中绘制。

通常这可以用 解决getOption("device"),但是,总是返回RStudioGD

0 投票
1 回答
1314 浏览

r - RStudio Server CentOS 错误 ELF 类

我正在使用 CentOS 6 并试图让 RStudio Server 运行。当我执行 rstudio-server 验证安装时,将显示以下内容:

停止 rstudio-server:[OK] /usr/lib/rstudio-server/bin/rsession:加载共享库时出错:libgfortran.so.1:错误的 ELF 类:ELFCLASS32 启动 rstudio-server:[OK]

验证了 java、R 和 RStudio 的 64 位版本。

有人知道我做错了什么吗?

谢谢

0 投票
1 回答
1558 浏览

oracle-call-interface - RStudio 服务器 ROracle 抛出:.oci.Driver() 中的错误:ROracle 内部错误 [rociDrvInit, 1, -1]

我已经设置了 RStudio 服务器并指出它使用现有的 R (2.13) 安装。从 R 访问时,ROracle 可以正常工作,但从 RStudio 网络界面则不能正常工作。

> library(ROracle)

Loading required package: DBI

> drv <- dbDriver("Oracle")

Error in .oci.Driver() : ROracle internal error [rociDrvInit, 1, -1]

我使用 --nodeps 安装了 RStudio 服务器,后来通过在 /etc/rstudio/rserver.conf 文件中设置值将其指向现有的 R 安装。

尝试从 RStudio 支持获得帮助,但被指向“堆栈溢出”。 http://support.rstudio.org/help/discussions/problems/1879-rstudio-roracle-internal-error

在此先感谢,赛。