install rmetrics

本文介绍如何安装Rmetrics包,包括从CRAN下载最新版本的R,使用方便的R脚本安装所有Rmetrics包,以及如何安装Rmetrics开发包。文章还提供了详细的步骤说明和注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Install R

Download the most recent version of R from The Comprehensive R Archive Network (CRAN). The R FAQ and the R Installation and Administration Manual contain detailed instructions for installing R on various platforms (Linux, OS X, and Windows being the main ones).

Install all Rmetrics packages

Installing Rmetrics is relatively easy. You can use the convenient R script which lists all Rmetrics packages.

The script installs all Rmetrics packages from your default CRAN repository ('repos'). This will ensure that all packages are up-to-date.

Open an R process and type the following :

   source("http://www.rmetrics.org/Rmetrics.R")
   install.Rmetrics()

'install.Rmetrics()' is just a wrapper function of 'install.packages()' which passes the list of all Rmetrics packages with 'pkgsRmetrics()' to the argument 'pkgs'.

The arguments of 'install.Rmetrics()' are
Arguments     Definition
pkgs     character vector of the short names of packages/bundles whose current versions should be downloaded from the repositories.
…     further arguments to be passed to 'install.packages()'

Install Rmetrics development packages

To be able to install the Rmetrics packages from source it is important that you have the required tools to install (and compile) packages from source. Please read the R's help pages

  >INSTALL

for further details.
Local install

Before you proceed you need to be familiar with the version control system Subversion (“SVN”). The svnbook and the Rmetrics page on R-forge has detailed instructions.
For Anonymous Subversion Access

This project's SVN repository can be checked out through anonymous access with the following command(s).

     svn checkout svn://svn.r-forge.r-project.org/svnroot/rmetrics/pkg rmetrics_pkg

install.RmetricsDev()

When you have checked out all source code, start an R session in the folder 'rmetrics_pkg' and proceed with

   source("RmetricsTools.R")
   install.RmetricsDev("[Rmetrics package to be installed]")

Remark

The default R function to install a package is 'install.packages()' and it is possible to directly install package from R-Forge with

  install.packages(pkg, repos="http://R-Forge.R-project.org")

*But* this process is *not* recommanded to install one of the Rmetrics development packages because you might run into compatibilty problem with other Rmetrics packages already installed on your system. Indeed, 'install.package()' will only install depended packages of 'pkg' only if they are not yet installed and will thus not update your existing packages with the latest development version.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值