精华内容
下载资源
问答
  • linux R语言 安装

    2018-07-27 16:42:23
    R安装有多种方式,使用yum或者源码编译安装,我用的是下载源码压缩文件,然后配置编译安装的。 安装过程: 1、下载 我在root文件夹下创建了一个install的文件夹,把我下载的东西都放在那 创建install文件夹,...

    R安装有多种方式,使用yum或者源码编译安装,我用的是下载源码压缩文件,然后配置编译安装的。

    安装过程:

    1、下载

    我在root文件夹下创建了一个install的文件夹,把我下载的东西都放在那

    创建install文件夹,指令:mkdir install

    进入install文件夹,指令:cd install

     

     

    下载地址:https://www.r-project.org/

    2、解压

    指令:tar -zxvf R-3.5.1.tar.gz

    3、配置

    进入到R-3.5.1文件夹,指令:cd R-3.5.1

    配置指令:./configure --enable-R-shlib

    R需要依赖很多其他软件和包,系统一般不可能都已经安装好,或者满足其版本。这时候往往由于系统环境不同,会出现一些问题,而且不同的电脑出现的问题往往不一样(有些环境配的很全的就不会出现问题)。

    但是问题其实都是一样的,就是缺少依赖软件或者软件版本低了

    例如下图这个就是缺少realine导致的配置错误

    我在./configure遇到了两个问题:

    问题1:没有pcre

    下载,指令:wget    https://netix.dl.sourceforge.net/project/pcre/pcre/8.40/pcre-8.40.tar.gz

    解压,指令:tar -zxvf   pcre-8.40.tar.gz

    配置,指令:./configure

    编译,指令:make

    安装,指令:make install

     

    问题2:没有libcurl

    下载,指令:wget    https://curl.haxx.se/download/curl-7.61.0.tar.gz

    解压,指令:tar -zxvf   curl-7.61.0.tar.gz

    配置,指令:./configure

    编译,指令:make

    安装,指令:make install

    每次遇到一个问题,解决后都要重新回到R-3.5.1文件夹下配置R,在解决完这两个问题后,

    配置,指令:./configure --enable-R-shlib

    显示成功,如下图:

     

    4、编译

    指令:make

    5、安装

    指令:make install

    6、测试是否安装成功

    指令:R

    能进入R环境说明成功,如下图

    注:

    1. 如果安装完不能进入R,可能是没有配置环境变量(一般不用)

    指令:

    export R_HOME= /usr/local/lib64/R/   (我的安在了/usr/local/lib64/下面)

    Export PATH=$R_HOME/bin

    source .bash_profile   (让环境变量生效)

    查看系统所有环境变量,指令:export

    1. 不同的linux版本本系统安装软件时有可能不同,所以常常需要查看系统内核版本,

    指令:uname -a  或者  cat /proc/version

     

    参考:

    [1] https://blog.csdn.net/qq_21383435/article/details/79537548

    展开全文
  • R的包(package)通常有两种:1 binary package:这种包属于即得即用型(ready-to-use),但是依赖与平台,即Win和Linux平台下不同。2 Source package:此类包可以跨平台使用,但用之前需要处理或者编译(compiled)。以下...

    R的包(package)通常有两种:

    1 binary package:这种包属于即得即用型(ready-to-use),但是依赖与平台,即Win和Linux平台下不同。

    2 Source package: 此类包可以跨平台使用,但用之前需要处理或者编译(compiled)。

    以下一些常用的包相关的函数:

    .libPaths():查看包的安装目录

    library():查看已经安装的包目录

    library(mypackage):载入mypackage包

    getOption("defaultPackages"):查看启动R时自动载入的包。

    help(package = 'mypackage'):查看‘mypackage’的帮助

    args(function):查看函数的参数

    example(function):自动运行该函数帮助文档中的例子,很赞!

    demo("package"):展示一些包中demostration,需要再看下??

    vignette('mypackage'):有的包,特别是bioconductor的包有vignette,用函数查看

    openVignette('mypackage'):这个函数也可以查看vignette,更好用一些

    RSiteSearch("helpinfor"):搜索R网站上的“helpinfor”相关信息

    help.start():查看已经安装包的详细HTML文档,这个命令非常爽。

    更新:

    search():查看当前载入的包

    sessionInfo():查看R中载入的包

    methods():查看某个S3泛型函数中所有的方法或者一个类中所有的方法(S3:S version 3)

    showMethods(class = "myClass"):查看S4类的方法

    findMethods("myMethods"):查看method的代码

    class(myObject):查看某个对象的类

    getClass(“class/package”):查看某个class或者包的具体内容

    getSlots("class"):查看某个class的slot

    slotNames(MyObject):查看某个对象的slot。

    可以使用Myobject@slotNames访问对象的slot值,这个@设计实在是太爽了,可以连续用。

    查询包内信息:1. ?function/method:查看某个“函数”或者“方法”的详细内容

    2. class?graph::graph:查看“组”的详细内容的一个例子。这个例子的来源是查询graph包时候,查看其中class的信息,输入??graph后出现一个graph::graph-class。

    ls("package:mypackage"):查看"mypackage"中的所有对象。

    安装source package方法

    1 在终端输入 # R CMD INSTALL /.../mypackage.tar.gz

    使用此方法,需要解决包依赖问题,即安装此包所依赖的包,安装过程有提示

    2 也可以使用R的install.packages()函数安装

    回答:可以使用install.packages()函数安装,而且比较简便,即联网即可装,装了就可用。

    # R

    > install.packages('mypackage')

    回答2:可以使用install.packages()安装本地下载的包,尤其适用于在服务器上安装包

    $ R

    > install.packages( c("XML_0.99-5.tar.gz", "http://www.cnblogs.com/Interfaces/Perl/RSPerl_0.8-0.tar.gz"), repos = NULL, configure.args = c(XML = '--with-xml-config=xml-config', RSPerl = "--with-modules='IO Fcntl'"))

    3 Bioconductor的安装方法

    > source("http://bioconductor.org/biocLite.R")

    > biocLite("mypackage")

    4 卸载package

    remove.packages("mypackage")

    remove.packages(utils)

    remove.packages()所属R语言包:utils

    remove.packages(pkgs, lib)

    参数:pkgs

    a character vector with the names of the packages to be removed.

    要删除的软件包的名称与特征向量。

    参数:lib

    a character vector giving the library directories to remove the packages from.  If missing, defaults to the first element in .libPaths().

    给一个字符向量库目录中删除软件包。如果缺少,默认的第一个元素在.libPaths()

    5 查看R及其package的version

    R version: version 或者 R.version

    R package version:

    6 更新包

    update.packages( )  可以定期执行以下

    7 使用别人安装的包

    修改.bashrc文件,添加环境变量R的lib路径

    export R_LIBS=/home/.../R/lib64/R/library

    R中用.libPaths()函数查看lib路径,如果有多个lib,install.packages()默认是安装在第一个目录下

    展开全文
  • 这篇看一下Linux 平台下R 环境的安装。一. 用YUM解决依赖包问题R 下载地址:http://www.r-project.org/Linux 下的R 安装需要如下rpm包:[root@rac1 linux_rpm]# lslibRmath-2.10.0-2.el5.x86_64.rpm R-core-2.10.0-2...

    这篇看一下Linux 平台下R 环境的安装。

    一. 用YUM解决依赖包问题

    R 下载地址:

    http://www.r-project.org/

    Linux 下的R 安装需要如下rpm包:

    [root@rac1 linux_rpm]# ls

    libRmath-2.10.0-2.el5.x86_64.rpm        R-core-2.10.0-2.el5.x86_64.rpm

    libRmath-devel-2.10.0-2.el5.x86_64.rpm  R-devel-2.10.0-2.el5.x86_64.rpm

    R-2.10.0-2.el5.x86_64.rpm

    [root@rac1 linux_rpm]# ll

    total 32086

    -rwxr-xr-x. 1 root root   104394 Mar 4 12:18 libRmath-2.10.0-2.el5.x86_64.rpm

    -rwxr-xr-x. 1 root root   151494 Mar 4 12:18 libRmath-devel-2.10.0-2.el5.x86_64.rpm

    -rwxr-xr-x. 1 root root    14688 Mar 4 12:18 R-2.10.0-2.el5.x86_64.rpm

    -rwxr-xr-x. 1 root root 32495231 Mar  4 12:30 R-core-2.10.0-2.el5.x86_64.rpm

    -rwxr-xr-x. 1 root root    88663 Mar 4 12:18 R-devel-2.10.0-2.el5.x86_64.rpm

    但是安装这些包会牵涉到很多依赖的包,我们可以使用YUM 来解决这个问题。

    用YUM 解决依赖包:

    [root@rac1 linux_rpm]# yum install pcre-devel

    Loaded plugins: refresh-packagekit

    Setting up Install Process

    Resolving Dependencies

    --> Running transaction check

    ---> Package pcre-devel.x86_640:7.8-3.1.el6 will be installed

    --> Finished Dependency Resolution

    Dependencies Resolved

    Package                  Arch                 Version                     Repository          Size

    Installing:

    pcre-devel               x86_64               7.8-3.1.el6                 dave               317 k

    Transaction Summary

    Install       1 Package(s)

    Total download size: 317 k

    Installed size: 954 k

    Is this ok [y/N]: y

    Downloading Packages:

    Running rpm_check_debug

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Warning: RPMDB altered outside of yum.

    Installing : pcre-devel-7.8-3.1.el6.x86_64                       1/1

    Installed:

    pcre-devel.x86_64 0:7.8-3.1.el6

    Complete!

    [root@rac1 linux_rpm]# yum install tcl-devel

    Loaded plugins: refresh-packagekit

    Setting up Install Process

    Resolving Dependencies

    --> Running transaction check

    ---> Package tcl-devel.x86_641:8.5.7-6.el6 will be installed

    --> Processing Dependency: tcl =1:8.5.7-6.el6 for package: 1:tcl-devel-8.5.7-6.el6.x86_64

    --> Processing Dependency:libtcl8.5.so()(64bit) for package: 1:tcl-devel-8.5.7-6.el6.x86_64

    --> Running transaction check

    ---> Package tcl.x86_64 1:8.5.7-6.el6will be installed

    --> Finished Dependency Resolution

    Dependencies Resolved

    Package                 Arch                 Version                      Repository          Size

    Installing:

    tcl-devel              x86_64               1:8.5.7-6.el6                dave               161 k

    Installing for dependencies:

    tcl                     x86_64               1:8.5.7-6.el6                dave               1.9 M

    Transaction Summary

    Install       2 Package(s)

    Total download size: 2.1 M

    Installed size: 5.1 M

    Is this ok [y/N]: y

    Downloading Packages:

    Total                                                               16 MB/s | 2.1 MB     00:00

    Running rpm_check_debug

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Installing : 1:tcl-8.5.7-6.el6.x86_64                                                        1/2

    Installing : 1:tcl-devel-8.5.7-6.el6.x86_64                                                  2/2

    Installed:

    tcl-devel.x86_64 1:8.5.7-6.el6

    Dependency Installed:

    tcl.x86_64 1:8.5.7-6.el6

    Complete!

    You have new mail in /var/spool/mail/root

    [root@rac1 linux_rpm]# yum install zlib-devel

    Loaded plugins: refresh-packagekit

    Setting up Install Process

    Resolving Dependencies

    --> Running transaction check

    ---> Package zlib-devel.x86_640:1.2.3-25.el6 will be installed

    --> Finished Dependency Resolution

    Dependencies Resolved

    Package                  Arch                 Version                     Repository          Size

    Installing:

    zlib-devel               x86_64               1.2.3-25.el6                dave                43 k

    Transaction Summary

    Install       1 Package(s)

    Total download size: 43 k

    Installed size: 115 k

    Is this ok [y/N]: y

    Downloading Packages:

    Running rpm_check_debug

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Installing : zlib-devel-1.2.3-25.el6.x86_64                                                  1/1

    Installed:

    zlib-devel.x86_64 0:1.2.3-25.el6

    Coplete!

    [root@rac1 linux_rpm]# yum install bzip2-devel

    Loaded plugins: refresh-packagekit

    Setting up Install Process

    Resolving Dependencies

    --> Running transaction check

    ---> Package bzip2-devel.x86_640:1.0.5-7.el6_0 will be installed

    --> Finished Dependency Resolution

    Dependencies Resolved

    Package                  Arch                Version                       Repository         Size

    Installing:

    bzip2-devel              x86_64              1.0.5-7.el6_0                 dave              250 k

    Transaction Summary

    Install       1 Package(s)

    Total download size: 250 k

    Installed size: 412 k

    Is this ok [y/N]: y

    Downloading Packages:

    Running rpm_check_debug

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Installing : bzip2-devel-1.0.5-7.el6_0.x86_64                                                1/1

    Installed:

    bzip2-devel.x86_640:1.0.5-7.el6_0

    Complete!

    [root@rac1 linux_rpm]# yum install libX11-devel

    Loaded plugins: refresh-packagekit

    Setting up Install Process

    Resolving Dependencies

    --> Running transaction check

    ---> Package libX11-devel.x86_640:1.3-2.el6 will be installed

    --> Processing Dependency:pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.3-2.el6.x86_64

    --> Processing Dependency: libXau-develfor package: libX11-devel-1.3-2.el6.x86_64

    --> Processing Dependency:pkgconfig(kbproto) for package: libX11-devel-1.3-2.el6.x86_64

    --> Processing Dependency:pkgconfig(xcb) for package: libX11-devel-1.3-2.el6.x86_64

    --> Processing Dependency:libXdmcp-devel for package: libX11-devel-1.3-2.el6.x86_64

    --> Processing Dependency:pkgconfig(xproto) for package: libX11-devel-1.3-2.el6.x86_64

    --> Running transaction check

    ---> Package libXau-devel.x86_640:1.0.5-1.el6 will be installed

    ---> Package libXdmcp-devel.x86_640:1.0.3-1.el6 will be installed

    ---> Package libxcb-devel.x86_640:1.5-1.el6 will be installed

    ---> Package xorg-x11-proto-devel.noarch0:7.4-35.el6 will be installed

    --> Finished Dependency Resolution

    Dependencies Resolved

    Package                          Arch               Version                 Repository        Size

    Installing:

    libX11-devel                     x86_64             1.3-2.el6               dave             1.0 M

    Installing for dependencies:

    libXau-devel                     x86_64             1.0.5-1.el6             dave              13 k

    libXdmcp-devel                   x86_64             1.0.3-1.el6             dave             9.1 k

    libxcb-devel                     x86_64             1.5-1.el6               dave             138 k

    xorg-x11-proto-devel             noarch             7.4-35.el6              dave             249 k

    Transaction Summary

    Install       5 Package(s)

    Total download size: 1.4 M

    Installed size: 4.5 M

    Is this ok [y/N]: y

    Downloading Packages:

    Total                                                               10 MB/s | 1.4 MB     00:00

    Running rpm_check_debug

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Installing : xorg-x11-proto-devel-7.4-35.el6.noarch                                           1/5

    Installing : libXau-devel-1.0.5-1.el6.x86_64                                                 2/5

    Installing : libxcb-devel-1.5-1.el6.x86_64                                                   3/5

    Installing : libXdmcp-devel-1.0.3-1.el6.x86_64                                               4/5

    Installing : libX11-devel-1.3-2.el6.x86_64                                                    5/5

    Installed:

    libX11-devel.x86_64 0:1.3-2.el6

    Dependency Installed:

    libXau-devel.x86_64 0:1.0.5-1.el6             libXdmcp-devel.x86_640:1.0.3-1.el6

    libxcb-devel.x86_64 0:1.5-1.el6               xorg-x11-proto-devel.noarch0:7.4-35.el6

    Complete!

    You have new mail in /var/spool/mail/root

    [root@rac1 linux_rpm]# yum install tk-devel

    Loaded plugins: refresh-packagekit

    Setting up Install Process

    Resolving Dependencies

    --> Running transaction check

    ---> Package tk-devel.x86_641:8.5.7-5.el6 will be installed

    --> Processing Dependency: tk =1:8.5.7-5.el6 for package: 1:tk-devel-8.5.7-5.el6.x86_64

    --> Processing Dependency: libXft-develfor package: 1:tk-devel-8.5.7-5.el6.x86_64

    --> Processing Dependency:libtk8.5.so()(64bit) for package: 1:tk-devel-8.5.7-5.el6.x86_64

    --> Running transaction check

    ---> Package libXft-devel.x86_640:2.1.13-4.1.el6 will be installed

    --> Processing Dependency:fontconfig-devel >= 2.2-1 for package: libXft-devel-2.1.13-4.1.el6.x86_64

    --> Processing Dependency:freetype-devel >= 2.1.9-2 for package: libXft-devel-2.1.13-4.1.el6.x86_64

    --> Processing Dependency:pkgconfig(xrender) for package: libXft-devel-2.1.13-4.1.el6.x86_64

    --> Processing Dependency:pkgconfig(freetype2) for package: libXft-devel-2.1.13-4.1.el6.x86_64

    --> Processing Dependency:pkgconfig(fontconfig) for package: libXft-devel-2.1.13-4.1.el6.x86_64

    --> Processing Dependency: libXrender-develfor package: libXft-devel-2.1.13-4.1.el6.x86_64

    ---> Package tk.x86_64 1:8.5.7-5.el6will be installed

    --> Running transaction check

    ---> Package fontconfig-devel.x86_640:2.8.0-3.el6 will be installed

    ---> Package freetype-devel.x86_640:2.3.11-6.el6_0.2 will be installed

    ---> Package libXrender-devel.x86_640:0.9.5-1.el6 will be installed

    --> Finished Dependency Resolution

    Dependencies Resolved

    Package                     Arch              Version                        Repository       Size

    Installing:

    tk-devel                    x86_64            1:8.5.7-5.el6                  dave            496 k

    Installing for dependencies:

    fontconfig-devel            x86_64            2.8.0-3.el6                    dave            209 k

    freetype-devel              x86_64            2.3.11-6.el6_0.2               dave            362 k

    libXft-devel                x86_64            2.1.13-4.1.el6                 dave             18 k

    libXrender-devel            x86_64            0.9.5-1.el6                    dave             15 k

    tk                          x86_64            1:8.5.7-5.el6                  dave            1.4 M

    Transaction Summary

    Install       6 Package(s)

    Total download size: 2.5 M

    Installed size: 7.4 M

    Is this ok [y/N]: y

    Downloading Packages:

    Total                                                               13 MB/s | 2.5 MB     00:00

    Running rpm_check_debug

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Installing : freetype-devel-2.3.11-6.el6_0.2.x86_64                                           1/6

    Installing : fontconfig-devel-2.8.0-3.el6.x86_64                                             2/6

    Installing : 1:tk-8.5.7-5.el6.x86_64                                                         3/6

    Installing : libXrender-devel-0.9.5-1.el6.x86_64                                              4/6

    Installing : libXft-devel-2.1.13-4.1.el6.x86_64                                              5/6

    Installing : 1:tk-devel-8.5.7-5.el6.x86_64                                                   6/6

    Installed:

    tk-devel.x86_641:8.5.7-5.el6

    Dependency Installed:

    fontconfig-devel.x86_64 0:2.8.0-3.el6           freetype-devel.x86_640:2.3.11-6.el6_0.2

    libXft-devel.x86_64 0:2.1.13-4.1.el6            libXrender-devel.x86_640:0.9.5-1.el6

    tk.x86_64 1:8.5.7-5.el6

    Complete!

    [root@rac1 linux_rpm]# yum install tetex-latex

    Loaded plugins: refresh-packagekit

    Setting up Install Process

    Resolving Dependencies

    --> Running transaction check

    ---> Package texlive-latex.x86_640:2007-56.el6 will be installed

    --> Processing Dependency: texlive-dvips= 2007-56.el6 for package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency: texlive-texmf-errata= 2007 for package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency: texlive =2007-56.el6 for package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency: texlive-utils= 2007-56.el6 for package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency:texlive-texmf-latex = 2007 for package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency:/usr/bin/fmtutil-sys for package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency:/usr/bin/fmtutil for package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency: netpbm-progsfor package: texlive-latex-2007-56.el6.x86_64

    --> Processing Dependency:/usr/bin/texconfig-sys for package: texlive-latex-2007-56.el6.x86_64

    --> Running transaction check

    ---> Package netpbm-progs.x86_640:10.47.05-11.el6 will be installed

    --> Processing Dependency: netpbm =10.47.05-11.el6 for package: netpbm-progs-10.47.05-11.el6.x86_64

    --> Processing Dependency:libnetpbm.so.10()(64bit) for package: netpbm-progs-10.47.05-11.el6.x86_64

    ---> Package texlive.x86_640:2007-56.el6 will be installed

    --> Processing Dependency:texlive-texmf-fonts = 2007 for package: texlive-2007-56.el6.x86_64

    --> Processing Dependency: texlive-texmf= 2007 for package: texlive-2007-56.el6.x86_64

    --> Processing Dependency:libkpathsea.so.4()(64bit) for package: texlive-2007-56.el6.x86_64

    ---> Package texlive-dvips.x86_640:2007-56.el6 will be installed

    --> Processing Dependency:texlive-texmf-dvips = 2007 for package: texlive-dvips-2007-56.el6.x86_64

    --> Processing Dependency: psutils forpackage: texlive-dvips-2007-56.el6.x86_64

    ---> Package texlive-texmf-errata.noarch0:2007-7.1.el6 will be installed

    ---> Package texlive-texmf-latex.noarch0:2007-35.el6 will be installed

    --> Processing Dependency:texlive-texmf-errata-latex = 2007 for package:texlive-texmf-latex-2007-35.el6.noarch

    --> Processing Dependency: tex-previewfor package: texlive-texmf-latex-2007-35.el6.noarch

    ---> Package texlive-utils.x86_640:2007-56.el6 will be installed

    --> Running transaction check

    ---> Package kpathsea.x86_640:2007-56.el6 will be installed

    ---> Package netpbm.x86_640:10.47.05-11.el6 will be installed

    ---> Package psutils.x86_640:1.17-34.el6 will be installed

    ---> Package tex-preview.noarch 0:11.85-10.el6will be installed

    ---> Package texlive-texmf.noarch0:2007-35.el6 will be installed

    ---> Package texlive-texmf-dvips.noarch0:2007-35.el6 will be installed

    --> Processing Dependency:texlive-texmf-errata-dvips = 2007 for package: texlive-texmf-dvips-2007-35.el6.noarch

    ---> Packagetexlive-texmf-errata-latex.noarch 0:2007-7.1.el6 will be installed

    ---> Package texlive-texmf-fonts.noarch0:2007-35.el6 will be installed

    --> Processing Dependency:texlive-texmf-errata-fonts = 2007 for package: texlive-texmf-fonts-2007-35.el6.noarch

    --> Running transaction check

    ---> Packagetexlive-texmf-errata-dvips.noarch 0:2007-7.1.el6 will be installed

    ---> Packagetexlive-texmf-errata-fonts.noarch 0:2007-7.1.el6 will be installed

    --> Finished Dependency Resolution

    Dependencies Resolved

    Package                             Arch            Version                    Repository     Size

    Installing:

    texlive-latex                       x86_64          2007-56.el6                dave           82 k

    Installing for dependencies:

    kpathsea                           x86_64          2007-56.el6                dave          117 k

    netpbm                              x86_64          10.47.05-11.el6            dave          802 k

    netpbm-progs                        x86_64          10.47.05-11.el6            dave          1.7 M

    psutils                             x86_64          1.17-34.el6                dave           46 k

    tex-preview                         noarch          11.85-10.el6               dave           49 k

    texlive                             x86_64          2007-56.el6                dave          1.8 M

    texlive-dvips                       x86_64          2007-56.el6                dave          193 k

    texlive-texmf                       noarch          2007-35.el6                dave          2.8 M

    texlive-texmf-dvips                 noarch          2007-35.el6                dave          237 k

    texlive-texmf-errata                noarch          2007-7.1.el6               dave          4.8 k

    texlive-texmf-errata-dvips          noarch          2007-7.1.el6               dave          4.8 k

    texlive-texmf-errata-fonts          noarch          2007-7.1.el6               dave          5.0 k

    texlive-texmf-errata-latex          noarch          2007-7.1.el6               dave          4.9 k

    texlive-texmf-fonts                 noarch          2007-35.el6                dave           48 M

    texlive-texmf-latex                 noarch          2007-35.el6                dave          5.3 M

    texlive-utils                       x86_64          2007-56.el6                dave          253 k

    Transaction Summary

    Install     17 Package(s)

    Total download size: 62 M

    Installed size: 162 M

    Is this ok [y/N]: y

    Downloading Packages:

    Total                                                               38 MB/s |  62 MB     00:01

    Running rpm_check_debug

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

    Installing : texlive-texmf-errata-2007-7.1.el6.noarch                                        1/17

    Installing : texlive-texmf-2007-35.el6.noarch                                                2/17

    Installing : kpathsea-2007-56.el6.x86_64                                                    3/17

    Installing : texlive-texmf-errata-fonts-2007-7.1.el6.noarch                                  4/17

    Installing : netpbm-10.47.05-11.el6.x86_64                                                  5/17

    Installing : netpbm-progs-10.47.05-11.el6.x86_64                                            6/17

    Installing : texlive-texmf-errata-dvips-2007-7.1.el6.noarch                                  7/17

    Installing : texlive-texmf-dvips-2007-35.el6.noarch                                          8/17

    Installing : texlive-texmf-fonts-2007-35.el6.noarch                                          9/17

    Installing : texlive-2007-56.el6.x86_64                                                    10/17

    Installing : texlive-texmf-errata-latex-2007-7.1.el6.noarch                                 11/17

    Installing : psutils-1.17-34.el6.x86_64                                                     12/17

    Installing : texlive-dvips-2007-56.el6.x86_64                                              13/17

    Installing : texlive-utils-2007-56.el6.x86_64                                              14/17

    Installing : texlive-texmf-latex-2007-35.el6.noarch                                         15/17

    Installing : texlive-latex-2007-56.el6.x86_64                                              16/17

    Installing : tex-preview-11.85-10.el6.noarch                                                17/17

    Installed:

    texlive-latex.x86_64 0:2007-56.el6

    Dependency Installed:

    kpathsea.x86_64 0:2007-56.el6                    netpbm.x86_640:10.47.05-11.el6

    netpbm-progs.x86_640:10.47.05-11.el6           psutils.x86_64 0:1.17-34.el6

    tex-preview.noarch 0:11.85-10.el6                texlive.x86_640:2007-56.el6

    texlive-dvips.x86_64 0:2007-56.el6               texlive-texmf.noarch0:2007-35.el6

    texlive-texmf-dvips.noarch 0:2007-35.el6         texlive-texmf-errata.noarch0:2007-7.1.el6

    texlive-texmf-errata-dvips.noarch 0:2007-7.1.el6texlive-texmf-errata-fonts.noarch 0:2007-7.1.el6

    texlive-texmf-errata-latex.noarch 0:2007-7.1.el6texlive-texmf-fonts.noarch 0:2007-35.el6

    texlive-texmf-latex.noarch 0:2007-35.el6         texlive-utils.x86_640:2007-56.el6

    Complete!

    You have new mail in /var/spool/mail/root

    [root@rac1 linux_rpm]#

    二.开始安装R

    2.1 安装llibRmath包

    这2个包没什么依赖,好安装

    [root@rac1 linux_rpm]# rpm -ivhlibRmath-2.10.0-2.el5.x86_64.rpm

    warning: libRmath-2.10.0-2.el5.x86_64.rpm:Header V3 DSA/SHA1 Signature, key ID 97d3544e: NOKEY

    Preparing...                ###########################################[100%]

    1:libRmath              ########################################### [100%]

    [root@rac1 linux_rpm]# rpm -ivhlibRmath-devel-2.10.0-2.el5.x86_64.rpm

    warning:libRmath-devel-2.10.0-2.el5.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID97d3544e: NOKEY

    Preparing...               ########################################### [100%]

    1:libRmath-devel        ########################################### [100%]

    [root@rac1 linux_rpm]#

    2.2 安装R-core,这个要先安装:

    [root@rac1 linux_rpm]# rpm -Uvh R-core-2.10.0-2.el5.x86_64.rpm

    warning: R-core-2.10.0-2.el5.x86_64.rpm:Header V3 DSA/SHA1 Signature, key ID 97d3544e: NOKEY

    error: Failed dependencies:

    libtcl8.4.so()(64bit) is needed by R-core-2.10.0-2.el5.x86_64

    libtk8.4.so()(64bit) is needed by R-core-2.10.0-2.el5.x86_64

    perl(File::Copy::Recursive) is needed by R-core-2.10.0-2.el5.x86_64

    --这里安装报错,说要8.4 的tcl 包,实际我们已经通过yum安装了8.5的,所以这里我们可以强制安装。

    [root@rac1 linux_rpm]# rpm -qa|grep tcl

    tcl-devel-8.5.7-6.el6.x86_64

    tcl-8.5.7-6.el6.x86_64

    强制安装R-core:

    [root@rac1 linux_rpm]# rpm -Uvh R-core-2.10.0-2.el5.x86_64.rpm --force --nodeps

    warning: R-core-2.10.0-2.el5.x86_64.rpm:Header V3 DSA/SHA1 Signature, key ID 97d3544e: NOKEY

    Preparing...                ###########################################[100%]

    1:R-core                ########################################### [100%]

    2.3 安装R-devel

    [root@rac1 linux_rpm]# rpm -ivh R-devel-2.10.0-2.el5.x86_64.rpm

    warning: R-devel-2.10.0-2.el5.x86_64.rpm:Header V3 DSA/SHA1 Signature, key ID 97d3544e: NOKEY

    Preparing...               ########################################### [100%]

    1:R-devel               ########################################### [100%]

    2.4 最后安装R

    [root@rac1 linux_rpm]# rpm -ivh R-2.10.0-2.el5.x86_64.rpm

    warning: R-2.10.0-2.el5.x86_64.rpm: HeaderV3 DSA/SHA1 Signature, key ID 97d3544e: NOKEY

    Preparing...               ########################################### [100%]

    1:R                     ########################################### [100%]

    You have new mail in /var/spool/mail/root

    [root@rac1 linux_rpm]#

    至此,R 环境安装完毕。

    三.测试

    继续Windows 下的测试用例:

    [root@rac1 ~]# xhost +

    access control disabled, clients canconnect from any host

    [root@rac1 ~]# R

    R version 2.10.0 (2009-10-26)

    Copyright (C) 2009 The R Foundation forStatistical Computing

    ISBN 3-900051-07-0

    R is free software and comes withABSOLUTELY NO WARRANTY.

    You are welcome to redistribute it undercertain conditions.

    Type 'license()' or 'licence()' fordistribution details.

    Natural language support but running in an English locale

    R is a collaborative project with manycontributors.

    Type 'contributors()' for more informationand

    'citation()' on how to cite R or R packagesin publications.

    Type 'demo()' for some demos, 'help()' foron-line help, or

    'help.start()' for an HTML browserinterface to help.

    Type 'q()' to quit R.

    >vol=trees[["Girth"]]^2*trees[["Height"]]/(4*pi)

    > hist(vol,col=1)

    >

    然后弹出窗口。

    展开全文
  • 更多R语言资讯,欢迎关注我的新浪微博:Jenny爱学习 微信公众号:R语言数据分析与实践   关于Linux的配置及安装, 请点击链接查看 : 在Mac 上搭建Linux虚拟机--MacOS & VMware10 & CentOS 7 ...

    更多R语言资讯,欢迎关注我的新浪微博:Jenny爱学习

    微信公众号:R语言数据分析与实践

     

    关于Linux的配置及安装, 请点击链接查看 : 在Mac 上搭建Linux虚拟机--MacOS & VMware10 & CentOS 7

    很多Linux系统已经预先安装好R,可以在UNIX或者BASH窗口中运行R,只要键入命令:

               R

    即可打开一个R的解释器,接下来就可以运行R命令,并在完成工作之后,通过命令q()关闭解释器。但是你可能想要最新的版本。CRAN网站提供了适用于Debian、Redhat、SUSE和Ubuntu系统的R源代码文件,可以通过单击Download R for Linux获得。

     

    1. 登陆官网:

        https://www.r-project.org点击打开链接

        找到左侧Download下方CRAN

     

    进入CRAN,会出现如下镜像位置的下载链接:

     

     

    拖动网页,找到China的下载链接,选择离自己地理位置最近的镜像文件链接进行安装,(几个链接位置分别是清华大学、中国科学与技术大学、浙江大学)

          将会打开如下网页:选择第一个Download R for Linux

    不同的Liunx系统,安装过程会略有不同,CRAN针对不同的源代码版本提供了对应的文档手册或者README文件以解释不同版本的具体安装方法。

     

     

    如果本篇文章对您有帮助,

    展开全文
  • Linux安装R语言环境

    2019-08-22 19:48:43
    Linux安装R语言环境 更新包列表 sudo apt-get update 安装R sudo apt install r-base 启动shell sudo -i R 到此安装成功 测试
  • [转帖]来自:http://cos.name/cn/topic/110517最近在学习R,数据保存在数据库,所以希望... 安装R-3.0.0 (安装目录:F:\Program Files\R\R-3.0.0)2. 安装Rtools (安装目录:F:\Rtools)Rtools下载地址 http://cran.r-...
  • 1. R包介绍R的包(package)通常有两种:二进制代码包(Binary package):这种包属于即得即用型(ready-to-use),但是依赖与平台,比如Windows和Linux平台下不同。源代码包(Source package): 此类包可以跨平台使用,但用...
  • 安装过程的所有命令行:wget http://lib.stat.cmu.edu/R/CRAN/src/base/R-3/R-3.0.0.tar.gztar xzf R-3.0.0.tar.gzcd R-3.0.0mkdir -p ~/software/R./configure --prefix=~/software/R --enable-R-shlib./configure ...
  • R语言LinuxR语言的下载与安装

    万次阅读 2016-01-11 14:49:42
    LinuxR语言的下载与安装 1、下载R语言 2、安装R语言
  • key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 # add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed add-apt-repository "deb...
  • R的包(package)通常有两种:1 binary package:这种包属于即得即用型(ready-to-use),但是依赖与平台,即Win和Linux平台下不同。2 Source package: 此类包可以跨平台使用,但用之前需要处理或者编译(compiled)。....
  • Linux系统安装R语言

    千次阅读 2018-01-15 23:42:02
    目前网上一些linux安装R语言的教程太过繁琐。其实,在ubuntu linux 系统下利用其提供的apt-get命令可以方便的安装R语言。工具/原料 ubuntu5.10 方法/步骤 进入系统,打开终端。输入命令:sudo -s。回车,输入用户...
  • R语言是主要用于统计分析、绘图的语言和操作环境。官方网站:http://www.r-project.org/Windows下面有直接的安装包,直接下载安装很方便,但是对于刚出的CentOS6.0上不能直接通过yum 安装R,需要自己编译。下载页面...
  • R语言 linux安装

    2016-12-17 16:02:13
    由于希望在Hadoop集群上配置RHadoop,自然需要在每个服务器节点上安装R语言。在安装过程也碰到了一些小问题,因此记录一下。    首先服务器系统版本为centos5.6,R版本为2.13.2。下面是安装步骤:  1、解压...
  • 1、下载wget http://mirror.bjtu.edu.cn/cran/src/base/R-3/R-3.0.1.tar.gz2、解压:tar -zxvf R-3.0.1.tar.gzcd R-3.0.13、安装yum install readline-develyum install libXt-devel./configure如果使用rJava需要...
  • R语言 Linux安装详解

    千次阅读 2016-10-18 11:17:34
    R语言 Linux安装详解 1、下载 wget http://mirror.bjtu.edu.cn/cran/src/base/R-3/R-3.2.5.tar.gz   2、解压: tar -zxvf R-3.2.5.tar.gz cd R-3.2.5   3、安装  yum install readline-devel yum install...
  • linuxR语言离线安装依赖包

    千次阅读 2018-12-18 16:26:56
    linuxR语言离线安装依赖包 shell命令行执行 R CMD INSTALL package.tar.gz
  • Linux安装R语言

    千次阅读 2013-11-07 11:35:30
    下面是安装步骤: 首先上传文件:rz -e 1、解压文件:tar –zvxf R-2.13.2.tar.gz 2、进入R源文件目录:cd R-2.13.2 3、执行./configure --prefix /home/work/R(--prefix是关键,R是自建文件夹) 下面这些保留...
  • Linux环境下安装R语言

    2016-03-30 13:32:04
    Linux环境下安装R语言 1. 新建文件夹 mkdir software 2. 打开software 文件夹 cd software 3. 下载R压缩包 wget http://mirror.bjtu.edu.cn/cran/src/base/R-3/R-3.2.4.tar.gz 4. 解压
  • 安装R语言的包的方法:1. 自动安装(在线安装)在R的控制台,输入install.packages("gridExtra") # 安装 gridExtrainstall.packages("stepNorm", contriburl="http://www.your.url", dependencies = TRUE) # 安装 ...
  • Ubuntu下安装R很方便,可以在软件管理中心搜索r-base直接安装,也可以将CRAN的相关目录添加到源,然后通过apt-get安装:sudo apt-get install r-base不过如果想清楚地知道R安装过程中的细节并控制相关的设置,可以...
  • 【R】Linux安装R语言包(Installing R packages on Linux) 转自: http://www.cnblogs.com/xianghang123/archive/2013/01/08/2851450.html   有关install.packages()函数的详见:R包 package 的安装(install...
  • tar -zxvf R-3.4.1.tar.gz cd R-3.4.1yum install gcc-gfortran yum install gcc gcc-c++ yum install readline-devel yum install libXt-devel yum install zlib-devel yum -y install bzi
  • R语言——linux如何离线安装R包

    千次阅读 2017-11-29 10:03:07
    但是很多时候,我们的生产环境都是linux,且都无法上网,只能离线安装,下面讲述了how to install R packages offline. 方法1: 以安装clue包为例,首先我们下载tar.gz为结尾的安装包,上传到linux某个目录下面,然后...
  • 作为一个初次接触R的小白,第一步便是在Linux服务器上安装R程序和R语言包,踩了很多坑,痛定思痛,在此写下Linux安装R程序和R语言包的过程,给大家参考。 安装R程序包 R安装包下载地址 ./configure --prefix=<...
  • Linux安装R语言

    千次阅读 2015-06-04 10:36:16
    二进制代码包(Binary package):这种包属于即得即用型(ready-to-use),但是依赖与平台,比如Windows和Linux平台下不同。 源代码包(Source package): 此类包可以跨平台使用,但用之前需要处理或者编译...
  • linuxR语言源码安装

    2016-01-30 04:00:31
    1、下载 wget http://mirror.bjtu.edu.cn/cran/src/base/R-3/R-3.2.3.tar.gz2、解压: ...cd R-3.0.13、安装 yum install readline-devel yum install libXt-devel yum install glibc-headers gcc-

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 778
精华内容 311
关键字:

linuxr语言安装

linux 订阅