zoukankan      html  css  js  c++  java
  • R: for installing package 'RODBC'

    Today, i try to install a package in R named 'DOBDC', while i meet a message:

    > install.packages('RODBC')

    package ‘RODBC’ is available as a source package but not as a binary

    警告信息:
    package ‘RODBC’ is not available (for R version 3.1.2)

    Then, i opened 'R package installer', choosed 'CRAN(sources)' and enter 'RODBC' for searching. 

    Greatfully, there comed a package named 'RODBC', I enter 'install Selected' quickly. (choose 'install dependencies')

    After a moment, R told me that it had put it in this:

    下载的程序包在
    ‘/private/var/folders/y2/gh_0bmkn42qbgvj7hjjvtjb40000gn/T/RtmpkO2JlR/downloaded_packages’里

    I opened it up and saw it. I wrote these into R:

    > install.packages('RODBC_1.3-10.tar.gz',repos=NULL,tpye='source')
    错误: 文件‘RODBC_1.3-10.tar.gz’不是OS ​​X的二进制软件包

    Pay attention here:

    i have tried to use Rstudio to install 'RODBC' by 'install packages' in 'Tool', while it still gives me:

    > install.packages("RODBC")

    package ‘RODBC’ is available as a source package but not as a binary

    Warning in install.packages :
    package ‘RODBC’ is not available (for R version 3.1.2)

    so , i have to ues R Console again.

     ####################################

    Question is what I can do now.

    e.g. seceed install as:

    > install.packages('animation')
    试开URL’http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/animation_2.3.tgz'
    Content type 'application/x-gzip' length 460758 bytes (449 Kb)
    打开了URL
    ==================================================
    downloaded 449 Kb


    The downloaded binary packages are in
    /var/folders/y2/gh_0bmkn42qbgvj7hjjvtjb40000gn/T//Rtmp4p2EbR/downloaded_packages
    > library(animation)

    ##########################################################

    haha! i have find a way to solve last question, that is, 

    open 'R Package Installer' in 'packages & data'. i choose 'local source package' under 'Packages Repository', enter 'install...'. R  will tell us to choose a package. here i choose the package i just download before:

    下载的程序包在
    ‘/private/var/folders/y2/gh_0bmkn42qbgvj7hjjvtjb40000gn/T/RtmpkO2JlR/downloaded_packages’里

    Then, it works!!!!!!!! 

    I think every time i meet the problem about this , i can solve them as the same way.

    ##########################################################################

    i have meet the followint problem too. Make sure u have solved them.

    some importance:

     I had the same problem ("ODBC headers sql.h and sqlext.h not found") on OS X, and fixed it by installing unixodbc (brew install unixodbc)

  • 相关阅读:
    mongoDB 获取系统时间
    android应用程序监听SMS Intent广播
    安卓开发之探秘蓝牙隐藏API
    Android内存优化解决 资料和总结的经验分享
    android 访问SMS短信收件箱
    Android 和 PHP 之间进行数据加密传输
    Android开发 MMS支持 创建和编辑MMS
    android 动态改变屏幕方向
    Android 使用 Gmail 来发送邮件
    android数据库操作之直接读取db文件
  • 原文地址:https://www.cnblogs.com/monne/p/4281237.html
Copyright © 2011-2022 走看看