`
szpapas
  • 浏览: 105085 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

Install R on mac OSX

阅读更多

1. 下载 安装 R

R-2.10.1.pkg

 

 

 

2. 下载安装 git

git-1.6.6.1-intel-leopard.dmg

然后安装

 

 

3. 下载rsruby

git clone git://github.com/alexgutteridge/rsruby.git

设定 R_HOME 变量,在.profile 里面 export 

export  R_HOME=/Library/Frameworks/R.framework/Resources

cd rsruby/

ruby setup.rb config -- --with-R-dir=$R_HOME 

ruby setup.rb setup

sudo ruby setup.rb install

 

4. 验证

 

require 'rsruby'

 

r = RSRuby.instance

 

# construct data to plot, graph of x vs sqrt(x)

xs = 10.times.collect {|i| i}

ys = xs.collect {|x| r.sqrt(x)}

 

r.png("example.png")  # tell R we will create png file

r.plot(:x => xs,

     :y => ys,            # (x,y) coordinates to plot

     :type=> "o",         # draw a line through points

     :col=> "blue",       # colour the line blue

     :main=> "Plot of x against sqrt(x)",  # add title to graph

     :xlab => "x", :ylab => "sqrt(x)")     # add labels to axes

r.eval_R("dev.off()")                        # finish the plotting

 

 

liu-juns-macbook-pro:~ liujun$ irb

 


5. 输出的图片 


Ref:

1. http://github.com/alexgutteridge/rsruby

2. http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html

3. http://cran.r-project.org/bin/macosx/

 

 

  • 大小: 21.9 KB
分享到:
评论

相关推荐

    OSInstall替换文件,需二者都替换

    This patch enables the installation of Mac OSX 10.6.3 Retail (Build 10D575) on MBR formatted hard disks, thus allowing multiple booting with other Windows OS. Like in the previous 10.6 version, you ...

    mysql-server-5.6-osx-x64:MySQL Server 5.6 for Mac OSX x86 64 位 NPM 包

    适用于 Mac OSX x86 64 位的 MySQL 服务器 5.6 在应用程序目录中的当前用户下安装并运行。 npm install mysql-server-5.6-osx-x64 提供用于生成具有可选配置设置的 MySQL 服务器实例的功能。 返回 。 每个应用...

    Unlocker 2.1.1 vmware装最新OSX解锁程序

    osx-install.sh - patches VMware osx-uninstall.sh - restores VMware 7. ESXi ------- ESXi is no longer supported as there are too many errors on newer versions due to VMware hardening the ESXi image. ...

    Oracle SQL Developer 2.1.0.63.73 for mac-osx-no-jre.part1

    Oracle SQL Developer 2.1.0.63.73 for mac-osx-no-jre下载地址: part1: http://download.csdn.net/source/1990322 part2: http://download.csdn.net/source/1990328 -------------------------------------------...

    query-hello-world:使用 SQL 方言查询 Atscale 的示例 JDBC 代码

    先决条件JavaMac: : 在此处下载 JDK: : Windows: : Linux: : Maven: 或$ brew install maven on Mac OSX运行示例克隆仓库: $ git clone https://github.com/AtScaleInc/query-hello-world.git 移动到目录: $ ...

    wine-on-mac:如何在Mac上安装Wine

    如何在Mac上安装/关于Wine 随着这个问题的出现越来越近,我正在制作此基本指南。 先决条件; 安装或更高版本 运行OS X 10.8至macOS 10.14 *( ) 推荐的安装Winehq软件包的方式; 使用安装wine一旦安装了homebrew...

    Oracle SQL Developer 2.1.0.63.73 for mac-osx-no-jre.part2

    Oracle SQL Developer 2.1.0.63.73 for mac-osx-no-jre下载地址: part1: http://download.csdn.net/source/1990322 part2: http://download.csdn.net/source/1990328 -------------------------------------------...

    安装黑苹果用到的工具

    This patch enables the installation of Mac OSX 10.6.3 Retail (Build 10D575) on MBR formatted hard disks, thus allowing multiple booting with other Windows OS. Like in the previous 10.6 version, you ...

    javabiginteger源码-as3proto-osx:OSX平台上Actionscript3.0的protobuf

    on OSX platform 该项目搭建了AS3 protobuf所需的 MAC OSX 运行环境以及AS3类库,整合了**Google [protobuf][1]和[protobuf-actionscript3][2]**第三方插件资源 [1]: "[v2.3.0] " [2]: "" 使用方法 #####编译安装...

    vmware8 mac补丁

    On Mac OS X you will need to be either root or use sudo to run the scripts. This is really only needed if you want to use client versions of Mac OS X. You may need to ensure the contents of the osx ...

    vmware unlocker 2.0.6最新版(vm虚拟机破解安装Mac OS)

    On Mac OS X you will need to be either root or use sudo to run the scripts. This is really only needed if you want to use client versions of Mac OS X. You may need to ensure the OS X scripts have ...

    chatty:使用 Express、Redis 和 SocketIO 进行实时网络聊天

    工作仍在进行中####Install 并在本地机器上运行: $ git clone https://github.com/accraze/chatty.git$ cd chatty$ bower install && npm install$ npm start#####Notes:starting rabbitmq on mac osx: /usr/local...

    operation-wave4:使用亚马逊 MWS 监控 Wave4 Amiibo

    第 4 波行动 创建项目是为了监控发布到 Amazon US 和 Amazon CA 的 Wave 4 Amiibo 的更改。...# On Mac OSX. $ vim ~ /.profile # On Linux $ vim ~ /.bashrc export VARIABLE_NAME=value # Save file. # Start scr

    ruby-irkit:IRKit Ruby客户端

    红外套件 Ruby客户端 要求Ruby2.0 + Mac OSX或Linux安装对于Mac % gem install irkit适用于Debian / Ubuntu Linux % sudo apt-get install libavahi-compat-libdnssd-dev% gem install irkitirkit命令% irkit --help...

    voxel-hologram-example:体素全息图主题演示

    体素全息图示例 体素全息图主题的演示。 :star: 现场演示实时演示在上的上托管。 :person_rowing_boat: 开始吧该项目取决于以下工具:宝石 :top_hat: 提示使用和可以轻松管理NodeJS和Ruby安装...git clone git@github....

    vmware workstation 11 unlock

    On Mac OS X you will need to be either root or use sudo to run the scripts. This is really only needed if you want to use client versions of Mac OS X. You may need to ensure the OS X scripts have ...

    mudgee:此工具用于从设备流量跟踪(PCAP)生成制造商使用说明(MUD)

    Windows: follow instructions at: https://nmap.org/npcap/ 玛文 Follow instructions at: https://www.baeldung.com/install-maven-on-windows-linux-mac for installation.安装$ git clone ...

    haskell-jobqueue

    > cd haskell-jobqueue/> cabal install jobqueue/ --only-dependencies --extra-include-dirs=/usr/local/include/zookeeper # if you use brew on Mac OSX> cabal install jobqueue/ jobqueue-examples/如何使用...

    vmware unlocker 2.0.3

    On Mac OS X you will need to be either root or use sudo to run the scripts. This is really only needed if you want to use client versions of Mac OS X. You may need to ensure the OS X scripts have ...

Global site tag (gtag.js) - Google Analytics