|||
[siqin@siqin ~]$ yum install r
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
You need to be root to perform this command.
[siqin@siqin ~]$ su
密码:
[root@siqin siqin]# yum install r
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* epel: mirrors.neusoft.edu.cn
Setting up Install Process
No package r available.
* Maybe you meant: R
Error: Nothing to do
[root@siqin siqin]# yum install R
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* epel: mirrors.neusoft.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package R.i686 0:3.0.2-1.el6 will be installed
--> Processing Dependency: libRmath-devel = 3.0.2-1.el6 for package: R-3.0.2-1.el6.i686
--> Processing Dependency: R-java = 3.0.2-1.el6 for package: R-3.0.2-1.el6.i686
--> Processing Dependency: R-devel = 3.0.2-1.el6 for package: R-3.0.2-1.el6.i686
--> Running transaction check
---> Package R-devel.i686 0:3.0.2-1.el6 will be installed
--> Processing Dependency: R-java-devel = 3.0.2-1.el6 for package: R-devel-3.0.2-1.el6.i686
--> Processing Dependency: R-core-devel = 3.0.2-1.el6 for package: R-devel-3.0.2-1.el6.i686
---> Package R-java.i686 0:3.0.2-1.el6 will be installed
---> Package libRmath-devel.i686 0:3.0.2-1.el6 will be installed
--> Processing Dependency: libRmath = 3.0.2-1.el6 for package: libRmath-devel-3.0.2-1.el6.i686
--> Running transaction check
---> Package R-core-devel.i686 0:3.0.2-1.el6 will be installed
--> Processing Dependency: zlib-devel for package: R-core-devel-3.0.2-1.el6.i686
--> Processing Dependency: tk-devel for package: R-core-devel-3.0.2-1.el6.i686
--> Processing Dependency: texinfo-tex for package: R-core-devel-3.0.2-1.el6.i686
--> Processing Dependency: tcl-devel for package: R-core-devel-3.0.2-1.el6.i686
--> Processing Dependency: pcre-devel for package: R-core-devel-3.0.2-1.el6.i686
--> Processing Dependency: libX11-devel for package: R-core-devel-3.0.2-1.el6.i686
--> Processing Dependency: bzip2-devel for package: R-core-devel-3.0.2-1.el6.i686
---> Package R-java-devel.i686 0:3.0.2-1.el6 will be installed
---> Package libRmath.i686 0:3.0.2-1.el6 will be installed
--> Running transaction check
---> Package bzip2-devel.i686 0:1.0.5-7.el6_0 will be installed
---> Package libX11-devel.i686 0:1.5.0-4.el6 will be installed
--> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.5.0-4.el6.i686
--> Processing Dependency: pkgconfig(xproto) for package: libX11-devel-1.5.0-4.el6.i686
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.5.0-4.el6.i686
--> Processing Dependency: pkgconfig(kbproto) for package: libX11-devel-1.5.0-4.el6.i686
---> Package pcre-devel.i686 0:7.8-6.el6 will be installed
---> Package tcl-devel.i686 1:8.5.7-6.el6 will be installed
---> Package texinfo-tex.i686 0:4.13a-8.el6 will be installed
--> Processing Dependency: texinfo = 4.13a-8.el6 for package: texinfo-tex-4.13a-8.el6.i686
---> Package tk-devel.i686 1:8.5.7-5.el6 will be installed
--> Processing Dependency: libXft-devel for package: 1:tk-devel-8.5.7-5.el6.i686
---> Package zlib-devel.i686 0:1.2.3-29.el6 will be installed
--> Running transaction check
---> Package libXft-devel.i686 0:2.3.1-2.el6 will be installed
--> Processing Dependency: pkgconfig(xrender) for package: libXft-devel-2.3.1-2.el6.i686
--> Processing Dependency: pkgconfig(freetype2) for package: libXft-devel-2.3.1-2.el6.i686
--> Processing Dependency: pkgconfig(fontconfig) for package: libXft-devel-2.3.1-2.el6.i686
---> Package libxcb-devel.i686 0:1.8.1-1.el6 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.8.1-1.el6.i686
---> Package texinfo.i686 0:4.13a-8.el6 will be installed
---> Package xorg-x11-proto-devel.noarch 0:7.6-25.el6 will be installed
--> Running transaction check
---> Package fontconfig-devel.i686 0:2.8.0-3.el6 will be installed
---> Package freetype-devel.i686 0:2.3.11-14.el6_3.1 will be installed
---> Package libXau-devel.i686 0:1.0.6-4.el6 will be installed
---> Package libXrender-devel.i686 0:0.9.7-2.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing:
R i686 3.0.2-1.el6 epel 20 k
Installing for dependencies:
R-core-devel i686 3.0.2-1.el6 epel 90 k
R-devel i686 3.0.2-1.el6 epel 19 k
R-java i686 3.0.2-1.el6 epel 20 k
R-java-devel i686 3.0.2-1.el6 epel 20 k
bzip2-devel i686 1.0.5-7.el6_0 base 250 k
fontconfig-devel i686 2.8.0-3.el6 base 209 k
freetype-devel i686 2.3.11-14.el6_3.1 base 364 k
libRmath i686 3.0.2-1.el6 epel 104 k
libRmath-devel i686 3.0.2-1.el6 epel 24 k
libX11-devel i686 1.5.0-4.el6 base 1.0 M
libXau-devel i686 1.0.6-4.el6 base 14 k
libXft-devel i686 2.3.1-2.el6 base 19 k
libXrender-devel i686 0.9.7-2.el6 base 16 k
libxcb-devel i686 1.8.1-1.el6 base 174 k
pcre-devel i686 7.8-6.el6 base 318 k
tcl-devel i686 1:8.5.7-6.el6 base 162 k
texinfo i686 4.13a-8.el6 base 660 k
texinfo-tex i686 4.13a-8.el6 base 132 k
tk-devel i686 1:8.5.7-5.el6 base 496 k
xorg-x11-proto-devel noarch 7.6-25.el6 base 274 k
zlib-devel i686 1.2.3-29.el6 base 44 k
Transaction Summary
================================================================================
Install 22 Package(s)
Total download size: 4.3 M
Installed size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/22): R-3.0.2-1.el6.i686.rpm | 20 kB 00:00
(2/22): R-core-devel-3.0.2-1.el6.i686.rpm | 90 kB 00:00
(3/22): R-devel-3.0.2-1.el6.i686.rpm | 19 kB 00:00
(4/22): R-java-3.0.2-1.el6.i686.rpm | 20 kB 00:00
(5/22): R-java-devel-3.0.2-1.el6.i686.rpm | 20 kB 00:00
(6/22): bzip2-devel-1.0.5-7.el6_0.i686.rpm | 250 kB 00:00
(7/22): fontconfig-devel-2.8.0-3.el6.i686.rpm | 209 kB 00:00
(8/22): freetype-devel-2.3.11-14.el6_3.1.i686.rpm | 364 kB 00:00
(9/22): libRmath-3.0.2-1.el6.i686.rpm | 104 kB 00:00
(10/22): libRmath-devel-3.0.2-1.el6.i686.rpm | 24 kB 00:00
(11/22): libX11-devel-1.5.0-4.el6.i686.rpm | 1.0 MB 00:01
(12/22): libXau-devel-1.0.6-4.el6.i686.rpm | 14 kB 00:00
(13/22): libXft-devel-2.3.1-2.el6.i686.rpm | 19 kB 00:00
(14/22): libXrender-devel-0.9.7-2.el6.i686.rpm | 16 kB 00:00
(15/22): libxcb-devel-1.8.1-1.el6.i686.rpm | 174 kB 00:00
(16/22): pcre-devel-7.8-6.el6.i686.rpm | 318 kB 00:00
(17/22): tcl-devel-8.5.7-6.el6.i686.rpm | 162 kB 00:00
(18/22): texinfo-4.13a-8.el6.i686.rpm | 660 kB 00:00
(19/22): texinfo-tex-4.13a-8.el6.i686.rpm | 132 kB 00:00
(20/22): tk-devel-8.5.7-5.el6.i686.rpm | 496 kB 00:00
(21/22): xorg-x11-proto-devel-7.6-25.el6.noarch.rpm | 274 kB 00:00
(22/22): zlib-devel-1.2.3-29.el6.i686.rpm | 44 kB 00:00
--------------------------------------------------------------------------------
Total 473 kB/s | 4.3 MB 00:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : xorg-x11-proto-devel-7.6-25.el6.noarch 1/22
Installing : 1:tcl-devel-8.5.7-6.el6.i686 2/22
Installing : zlib-devel-1.2.3-29.el6.i686 3/22
Installing : freetype-devel-2.3.11-14.el6_3.1.i686 4/22
Installing : fontconfig-devel-2.8.0-3.el6.i686 5/22
Installing : libXau-devel-1.0.6-4.el6.i686 6/22
Installing : libxcb-devel-1.8.1-1.el6.i686 7/22
Installing : libX11-devel-1.5.0-4.el6.i686 8/22
Installing : libXrender-devel-0.9.7-2.el6.i686 9/22
Installing : libXft-devel-2.3.1-2.el6.i686 10/22
Installing : 1:tk-devel-8.5.7-5.el6.i686 11/22
Installing : R-java-3.0.2-1.el6.i686 12/22
Installing : pcre-devel-7.8-6.el6.i686 13/22
Installing : bzip2-devel-1.0.5-7.el6_0.i686 14/22
Installing : libRmath-3.0.2-1.el6.i686 15/22
Installing : libRmath-devel-3.0.2-1.el6.i686 16/22
Installing : texinfo-4.13a-8.el6.i686 17/22
Installing : texinfo-tex-4.13a-8.el6.i686 18/22
Installing : R-core-devel-3.0.2-1.el6.i686 19/22
Installing : R-java-devel-3.0.2-1.el6.i686 20/22
Installing : R-devel-3.0.2-1.el6.i686 21/22
Installing : R-3.0.2-1.el6.i686 22/22
Verifying : R-java-devel-3.0.2-1.el6.i686 1/22
Verifying : libXrender-devel-0.9.7-2.el6.i686 2/22
Verifying : texinfo-4.13a-8.el6.i686 3/22
Verifying : libRmath-3.0.2-1.el6.i686 4/22
Verifying : bzip2-devel-1.0.5-7.el6_0.i686 5/22
Verifying : texinfo-tex-4.13a-8.el6.i686 6/22
Verifying : zlib-devel-1.2.3-29.el6.i686 7/22
Verifying : pcre-devel-7.8-6.el6.i686 8/22
Verifying : R-devel-3.0.2-1.el6.i686 9/22
Verifying : libXau-devel-1.0.6-4.el6.i686 10/22
Verifying : R-java-3.0.2-1.el6.i686 11/22
Verifying : freetype-devel-2.3.11-14.el6_3.1.i686 12/22
Verifying : 1:tcl-devel-8.5.7-6.el6.i686 13/22
Verifying : libXft-devel-2.3.1-2.el6.i686 14/22
Verifying : libX11-devel-1.5.0-4.el6.i686 15/22
Verifying : xorg-x11-proto-devel-7.6-25.el6.noarch 16/22
Verifying : 1:tk-devel-8.5.7-5.el6.i686 17/22
Verifying : R-core-devel-3.0.2-1.el6.i686 18/22
Verifying : libRmath-devel-3.0.2-1.el6.i686 19/22
Verifying : fontconfig-devel-2.8.0-3.el6.i686 20/22
Verifying : R-3.0.2-1.el6.i686 21/22
Verifying : libxcb-devel-1.8.1-1.el6.i686 22/22
Installed:
R.i686 0:3.0.2-1.el6
Dependency Installed:
R-core-devel.i686 0:3.0.2-1.el6
R-devel.i686 0:3.0.2-1.el6
R-java.i686 0:3.0.2-1.el6
R-java-devel.i686 0:3.0.2-1.el6
bzip2-devel.i686 0:1.0.5-7.el6_0
fontconfig-devel.i686 0:2.8.0-3.el6
freetype-devel.i686 0:2.3.11-14.el6_3.1
libRmath.i686 0:3.0.2-1.el6
libRmath-devel.i686 0:3.0.2-1.el6
libX11-devel.i686 0:1.5.0-4.el6
libXau-devel.i686 0:1.0.6-4.el6
libXft-devel.i686 0:2.3.1-2.el6
libXrender-devel.i686 0:0.9.7-2.el6
libxcb-devel.i686 0:1.8.1-1.el6
pcre-devel.i686 0:7.8-6.el6
tcl-devel.i686 1:8.5.7-6.el6
texinfo.i686 0:4.13a-8.el6
texinfo-tex.i686 0:4.13a-8.el6
tk-devel.i686 1:8.5.7-5.el6
xorg-x11-proto-devel.noarch 0:7.6-25.el6
zlib-devel.i686 0:1.2.3-29.el6
Complete!
[root@siqin siqin]# r
bash: r: command not found
[root@siqin siqin]# R
R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: i686-redhat-linux-gnu (32-bit)
R是自由软件,不带任何担保。
在某些条件下你可以将其自由散布。
用'license()'或'licence()'来看散布的详细条件。
R是个合作计划,有许多人为之做出了贡献.
用'contributors()'来看合作者的详细情况
用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。
用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或
用'help.start()'通过HTML浏览器来看帮助文件。
用'q()'退出R.
> demo(graphics)
demo(graphics)
---- ~~~~~~~~
Type <Return> to start :
> # Copyright (C) 1997-2009 The R Core Team
>
> require(datasets)
> require(grDevices); require(graphics)
> ## Here is some code which illustrates some of the differences between
> ## R and S graphics capabilities. Note that colors are generally specified
> ## by a character string name (taken from the X11 rgb.txt file) and that line
> ## textures are given similarly. The parameter "bg" sets the background
> ## parameter for the plot and there is also an "fg" parameter which sets
> ## the foreground color.
>
>
> x <- stats::rnorm(50)
> opar <- par(bg = "white")
> plot(x, ann = FALSE, type = "n")
按<Return>键来看下一个图:
> abline(h = 0, col = gray(.90))
> lines(x, col = "green4", lty = "dotted")
> points(x, bg = "limegreen", pch = 21)
> title(main = "Simple Use of Color In a Plot",
+ xlab = "Just a Whisper of a Label",
+ col.main = "blue", col.lab = gray(.8),
+ cex.main = 1.2, cex.lab = 1.0, font.main = 4, font.lab = 3)
> ## A little color wheel. This code just plots equally spaced hues in
> ## a pie chart. If you have a cheap SVGA monitor (like me) you will
> ## probably find that numerically equispaced does not mean visually
> ## equispaced. On my display at home, these colors tend to cluster at
> ## the RGB primaries. On the other hand on the SGI Indy at work the
> ## effect is near perfect.
>
> par(bg = "gray")
> pie(rep(1,24), col = rainbow(24), radius = 0.9)
按<Return>键来看下一个图:
> title(main = "A Sample Color Wheel", cex.main = 1.4, font.main = 3)
> title(xlab = "(Use this as a test of monitor linearity)",
+ cex.lab = 0.8, font.lab = 3)
> ## We have already confessed to having these. This is just showing off X11
> ## color names (and the example (from the postscript manual) is pretty "cute".
>
> pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
> names(pie.sales) <- c("Blueberry", "Cherry",
+ "Apple", "Boston Cream", "Other", "Vanilla Cream")
> pie(pie.sales,
+ col = c("purple","violetred1","green3","cornsilk","cyan","white"))
按<Return>键来看下一个图:
> title(main = "January Pie Sales", cex.main = 1.8, font.main = 1)
> title(xlab = "(Don't try this at home kids)", cex.lab = 0.8, font.lab = 3)
> ## Boxplots: I couldn't resist the capability for filling the "box".
> ## The use of color seems like a useful addition, it focuses attention
> ## on the central bulk of the data.
>
> par(bg="cornsilk")
> n <- 10
> g <- gl(n, 100, n*100)
> x <- rnorm(n*100) + sqrt(as.numeric(g))
> boxplot(split(x,g), col="lavender", notch=TRUE)
按<Return>键来看下一个图:
> title(main="Notched Boxplots", xlab="Group", font.main=4, font.lab=1)
> ## An example showing how to fill between curves.
>
> par(bg="white")
> n <- 100
> x <- c(0,cumsum(rnorm(n)))
> y <- c(0,cumsum(rnorm(n)))
> xx <- c(0:n, n:0)
> yy <- c(x, rev(y))
> plot(xx, yy, type="n", xlab="Time", ylab="Distance")
按<Return>键来看下一个图:
> polygon(xx, yy, col="gray")
> title("Distance Between Brownian Motions")
> ## Colored plot margins, axis labels and titles. You do need to be
> ## careful with these kinds of effects. It's easy to go completely
> ## over the top and you can end up with your lunch all over the keyboard.
> ## On the other hand, my market research clients love it.
>
> x <- c(0.00, 0.40, 0.86, 0.85, 0.69, 0.48, 0.54, 1.09, 1.11, 1.73, 2.05, 2.02)
> par(bg="lightgray")
> plot(x, type="n", axes=FALSE, ann=FALSE)
按<Return>键来看下一个图:
> usr <- par("usr")
> rect(usr[1], usr[3], usr[2], usr[4], col="cornsilk", border="black")
> lines(x, col="blue")
> points(x, pch=21, bg="lightcyan", cex=1.25)
> axis(2, col.axis="blue", las=1)
> axis(1, at=1:12, lab=month.abb, col.axis="blue")
> box()
> title(main= "The Level of Interest in R", font.main=4, col.main="red")
> title(xlab= "1996", col.lab="red")
> ## A filled histogram, showing how to change the font used for the
> ## main title without changing the other annotation.
>
> par(bg="cornsilk")
> x <- rnorm(1000)
> hist(x, xlim=range(-4, 4, x), col="lavender", main="")
按<Return>键来看下一个图:
> title(main="1000 Normal Random Variates", font.main=3)
> ## A scatterplot matrix
> ## The good old Iris data (yet again)
>
> pairs(iris[1:4], main="Edgar Anderson's Iris Data", font.main=4, pch=19)
按<Return>键来看下一个图:
> pairs(iris[1:4], main="Edgar Anderson's Iris Data", pch=21,
+ bg = c("red", "green3", "blue")[unclass(iris$Species)])
按<Return>键来看下一个图:
> ## Contour plotting
> ## This produces a topographic map of one of Auckland's many volcanic "peaks".
>
> x <- 10*1:nrow(volcano)
> y <- 10*1:ncol(volcano)
> lev <- pretty(range(volcano), 10)
> par(bg = "lightcyan")
> pin <- par("pin")
> xdelta <- diff(range(x))
> ydelta <- diff(range(y))
> xscale <- pin[1]/xdelta
> yscale <- pin[2]/ydelta
> scale <- min(xscale, yscale)
> xadd <- 0.5*(pin[1]/scale - xdelta)
> yadd <- 0.5*(pin[2]/scale - ydelta)
> plot(numeric(0), numeric(0),
+ xlim = range(x)+c(-1,1)*xadd, ylim = range(y)+c(-1,1)*yadd,
+ type = "n", ann = FALSE)
按<Return>键来看下一个图:
> usr <- par("usr")
> rect(usr[1], usr[3], usr[2], usr[4], col="green3")
> contour(x, y, volcano, levels = lev, col="yellow", lty="solid", add=TRUE)
> box()
> title("A Topographic Map of Maunga Whau", font= 4)
> title(xlab = "Meters North", ylab = "Meters West", font= 3)
> mtext("10 Meter Contour Spacing", side=3, line=0.35, outer=FALSE,
+ at = mean(par("usr")[1:2]), cex=0.7, font=3)
> ## Conditioning plots
>
> par(bg="cornsilk")
> coplot(lat ~ long | depth, data = quakes, pch = 21, bg = "green3")
按<Return>键来看下一个图:
> par(opar)
>
>
>
> x <- c(1,2,3,4,5,6)
> x
[1] 1 2 3 4 5 6
> plot(x)
按<Return>键来看下一个图:
> q()
Save workspace image? [y/n/c]: y
[root@siqin siqin]#
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-26 17:29
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社