R语言实战 代码清单1-3 使用一个新的包
代码清单1-3 使用一个新的包
> help.start()
如果什么都不发生的话,你应该自己打开‘http://127.0.0.1:17671/doc/html/index.html’
> install.packages("vcd")
还安装相依关系‘zoo’, ‘colorspace’, ‘lmtest’
试开URL’https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/zoo_1.8-12.zip'
Content type 'application/zip' length 1020320 bytes (996 KB)
downloaded 996 KB
试开URL’https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/colorspace_2.1-0.zip'
Content type 'application/zip' length 2633785 bytes (2.5 MB)
downloaded 2.5 MB
试开URL’https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/lmtest_0.9-40.zip'
Content type 'application/zip' length 405787 bytes (396 KB)
downloaded 396 KB
试开URL’https://mirrors.sjtug.sjtu.edu.cn/cran/bin/windows/contrib/4.3/vcd_1.4-11.zip'
Content type 'application/zip' length 1267746 bytes (1.2 MB)
downloaded 1.2 MB
程序包‘zoo’打开成功,MD5和检查也通过
程序包‘colorspace’打开成功,MD5和检查也通过
程序包‘lmtest’打开成功,MD5和检查也通过
程序包‘vcd’打开成功,MD5和检查也通过
下载的二进制程序包在
C:\Users\83819\AppData\Local\Temp\Rtmp6N8DVh\downloaded_packages里
> help(package="vcd")
> library(vcd)
载入需要的程辑包:grid
> help(Arthritis)
> Arthritis
ID Treatment Sex Age Improved
1 57 Treated Male 27 Some
2 46 Treated Male 29 None
3 77 Treated Male 30 None
4 17 Treated Male 32 Marked
5 36 Treated Male 46 Marked
6 23 Treated Male 58 Marked
7 75 Treated Male 59 None
8 39 Treated Male 59 Marked
9 33 Treated Male 63 None
10 55 Treated Male 63 None
11 30 Treated Male 64 None
12 5 Treated Male 64 Some
13 63 Treated Male 69 None
14 83 Treated Male 70 Marked
15 66 Treated Female 23 None
16 40 Treated Female 32 None
17 6 Treated Female 37 Some
18 7 Treated Female 41 None
19 72 Treated Female 41 Marked
20 37 Treated Female 48 None
21 82 Treated Female 48 Marked
22 53 Treated Female 55 Marked
23 79 Treated Female 55 Marked
24 26 Treated Female 56 Marked
25 28 Treated Female 57 Marked
26 60 Treated Female 57 Marked
27 22 Treated Female 57 Marked
28 27 Treated Female 58 None
29 2 Treated Female 59 Marked
30 59 Treated Female 59 Marked
31 62 Treated Female 60 Marked
32 84 Treated Female 61 Marked
33 64 Treated Female 62 Some
34 34 Treated Female 62 Marked
35 58 Treated Female 66 Marked
36 13 Treated Female 67 Marked
37 61 Treated Female 68 Some
38 65 Treated Female 68 Marked
39 11 Treated Female 69 None
40 56 Treated Female 69 Some
41 43 Treated Female 70 Some
42 9 Placebo Male 37 None
43 14 Placebo Male 44 None
44 73 Placebo Male 50 None
45 74 Placebo Male 51 None
46 25 Placebo Male 52 None
47 18 Placebo Male 53 None
48 21 Placebo Male 59 None
49 52 Placebo Male 59 None
50 45 Placebo Male 62 None
51 41 Placebo Male 62 None
52 8 Placebo Male 63 Marked
53 80 Placebo Female 23 None
54 12 Placebo Female 30 None
55 29 Placebo Female 30 None
56 50 Placebo Female 31 Some
57 38 Placebo Female 32 None
58 35 Placebo Female 33 Marked
59 51 Placebo Female 37 None
60 54 Placebo Female 44 None
61 76 Placebo Female 45 None
62 16 Placebo Female 46 None
63 69 Placebo Female 48 None
64 31 Placebo Female 49 None
65 20 Placebo Female 51 None
66 68 Placebo Female 53 None
67 81 Placebo Female 54 None
68 4 Placebo Female 54 None
69 78 Placebo Female 54 Marked
70 70 Placebo Female 55 Marked
71 49 Placebo Female 57 None
72 10 Placebo Female 57 Some
73 47 Placebo Female 58 Some
74 44 Placebo Female 59 Some
75 24 Placebo Female 59 Marked
76 48 Placebo Female 61 None
77 19 Placebo Female 63 Some
78 3 Placebo Female 64 None
79 67 Placebo Female 65 Marked
80 32 Placebo Female 66 None
81 42 Placebo Female 66 None
82 15 Placebo Female 66 Some
83 71 Placebo Female 68 Some
84 1 Placebo Female 74 Marked
> example(Arthritis)
运行结果