的R意外的行为后安装在另一个EC2实例 [英] Unexpected behavior of R after install on another EC2 instance

查看:194
本文介绍了的R意外的行为后安装在另一个EC2实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在第二天的战斗这个问题,完全不眠夜直,我真的开始失去我的耐心和实力。这一切开始后,我为了测试我的R $ C $下论文的数据分析决定提供另一种(付费)AWS EC2实例。 previously我在测试/运行特别是code时,使用单一游离层 t1.micro 实例,这是痛苦的缓慢,尤其是。时间是远远超过每小时美分,亚马逊正在充电合理数量更有价值。

I'm fighting this problem second day straight with a completely sleepless night and I'm really starting to lose my patience and strength. It all started after I decided to provision another (paid) AWS EC2 instance in order to test my R code for dissertation data analysis. Previously I was using a single free tier t1.micro instance, which is painfully slow, especially when testing/running particular code. Time is much more valuable than reasonable number of cents per hour that Amazon is charging.

所以,我置备一个 m3.large 举例来说,我希望应该有足够的能力来处理我的数据轻松快捷。 EC2特定的设置,其中包括选择的Ubuntu 14.04 LTS的操作系统和一些安全设置后,我通过命令和apt-get安装R基本R基本开发<安装R和RStudio根据说明服务器/ code>为的Ubuntu 用户。我还创建 R用户作为运行的R会话的特殊用户。基本上,相同的步骤,在较小实例

Therefore, I provisioned a m3.large instance, which I hope should have enough power to crunch my data comfortably fast. After EC2-specific setup, which included selecting Ubuntu 14.04 LTS as an operating system and some security setup, I installed R and RStudio Server per instructions via sudo apt-get install r-base r-base-dev as ubuntu user. I also created ruser as a special user for running R sessions. Basically, the same procedure as on the smaller instance.

目前的情况是,我发出的R会话的命令行导致这样的消息的任何命令:错误:无法找到函数sessionInfo。该作品的唯一功能是 Q()。我怀疑这里的权限问题,但是,我不知道如何处理调查在研发环境许可相关的问题。我也很好奇,可能是什么原因,这种情况下,考虑到我是继从研发项目和RStudio来源的建议。

Current situation is that any command that I issuing in R session command line result in messages like this: Error: could not find function "sessionInfo". The only function that works is q(). I suspect here a permissions problem, however, I'm not sure how to approach investigating permission-related problems in R environment. I'm also curious what could be the reasons for such situation, considering that I was following recommendations from R Project and RStudio sources.

推荐答案

我能够确定,我认为造成的一切恐怖的地方 - 这只是一个小的配置文件的/ etc / R /Rprofile.site,我有previously更新,从研发专家在这里StackOverflow的帖子借来的指令。去除可疑内容后,我就能够运行R.成功命令。出于好奇和分享这种来之不易的知识,这里的拆除内容:

I was able to pinpoint the place that I think caused all that horror - it was just a small configuration file "/etc/R/Rprofile.site", which I have previously updated with directives borrowed from R experts' posts here on StackOverflow. After removing questionable contents, I was able to run R commands successfully. Out of curiosity and for sharing this hard-earned knowledge, here's the removed contents:

local({
  # add DISS_FLOSS_PKGS to the default packages, set a CRAN mirror
  DISS_FLOSS_PKGS <- c("RCurl", "digest", "jsonlite",
                       "stringr", "XML", "plyr")
  #old <- getOption("defaultPackages")
  r <- getOption("repos")
  r["CRAN"] <- "http://cran.us.r-project.org"
  #options(defaultPackages = c(old, DISS_FLOSS_PKGS), repos = r)
  options(defaultPackages = DISS_FLOSS_PKGS, repos = r)

  #lapply(list(DISS_FLOSS_PKGS), function() library)
  library(RCurl)
  library(digest)
  library(jsonlite)
  library(stringr)
  library(XML)
  library(plyr)
})

对此有何评论将AP ​​preciated!

Any comments on this will be appreciated!

这篇关于的R意外的行为后安装在另一个EC2实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆