R之package

包(package)是R函数、数据、预编译代码以一种定义完善的格式组合成的集合。
安装包可能遇到的问题:

Warning: 无法在貯藏處https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib中读写索引:无法打开URL’https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/PACKAGES

解决方法:chooseCRANmirror()​ 更换到 USA(CA 1)。

> install.packages("vcd")
--- 在此連線階段时请选用CRAN的鏡子 ---
还安装相依关系‘zoo’, ‘colorspace’, ‘lmtest’

试开URL’https://cran.cnr.berkeley.edu/bin/windows/contrib/3.3/zoo_1.7-14.zip'
Content type 'application/zip' length 904707 bytes (883 KB)
downloaded 883 KB

试开URL’https://cran.cnr.berkeley.edu/bin/windows/contrib/3.3/colorspace_1.3-2.zip'
Content type 'application/zip' length 441419 bytes (431 KB)
downloaded 431 KB

试开URL’https://cran.cnr.berkeley.edu/bin/windows/contrib/3.3/lmtest_0.9-34.zip'
Content type 'application/zip' length 283964 bytes (277 KB)
downloaded 277 KB

试开URL’https://cran.cnr.berkeley.edu/bin/windows/contrib/3.3/vcd_1.4-3.zip'
Content type 'application/zip' length 1266709 bytes (1.2 MB)
downloaded 1.2 MB

程序包‘zoo’打开成功,MD5和检查也通过
程序包‘colorspace’打开成功,MD5和检查也通过
程序包‘lmtest’打开成功,MD5和检查也通过
程序包‘vcd’打开成功,MD5和检查也通过

下载的二进制程序包在
        C:\Users\Administrator\AppData\Local\Temp\RtmpkFfQE4\downloaded_packages里
> library(vcd)
载入需要的程辑包:grid
> example(Arthritis)

Arthrt> data("Arthritis")

Arthrt> art <- xtabs(~ Treatment + Improved, data = Arthritis, subset = Sex == "Female")

Arthrt> art
         Improved
Treatment None Some Marked
  Placebo   19    7      6
  Treated    6    5     16

Arthrt> mosaic(art, gp = shading_Friendly)
等待页面改变的确认...

Arthrt> mosaic(art, gp = shading_max)
等待页面改变的确认...
> 

这里写图片描述

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值