1. 安装VSFTP 1 # yum -y install vsftpd 2. 配置vsftpd.conf文件 # vi /etc/vsftpd/vsftpd.conf 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 # Example config file /etc/vsftpd/vsftpd.conf # # The default compiled in settings are fairly paranoid. This sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd.conf.5 for all compiled in defaults. # # READ THIS: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's # capabilities. # # Allow anonymous FTP? (Beware - allowed by default if you comment this out). #anonymous_enable=YES # # Uncomment this to allow local users to log in. local_enable=YES # # Uncomment this to enable any form of FTP write command. write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user. #anon_upload_enable=YES # # Uncomment this if you want the anonymous FTP user to be able to create # new directories. #anon_mkdir_write_enable=YES # # Activate directory messages - messages given to remote users when they # go into a certain directory. dirmessage_enable=YES # # The target log file can be vsftpd_log_file or xferlog_file. # This depends on setting xferlog_std_format parameter xferlog_enable=YES # # Make sure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES # # If you want, you can arrange for uploaded anonymous files to be owned by # a different user. Note! Using root for uploaded files is not # recommended! #chown_uploads=YES #chown_username=whoever # # The name of log file when xferlog_enable=YES and xferlog_std_format=YES # WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log #xferlog_file=/var/log/xferlog # # Switches between logging into vsftpd_log_file and xferlog_file files. # NO writes to vsftpd_log_file, YES to xferlog_file xferlog_std_format=YES # # You may change the default value for timing out an idle session. idle_session_timeout=600 # # You may change the default value for timing out a data connection. data_connection_timeout=120 # # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. #nopriv_user=ftpsecure # # Enable this and the server will recognise asynchronous ABOR requests. Not # recommended for security (the code is non-trivial). Not enabling it, # however, may confuse older FTP clients. #async_abor_enable=YES # # By default the server will pretend to allow ASCII mode but in fact ignore # the request. Turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that on some FTP servers, ASCII support allows a denial of service # attack (DoS) via the command SIZE /big/file in ASCII mode. vsftpd # predicted this attack and has always been safe, reporting the size of the # raw file. # ASCII mangling is a horrible feature of the protocol. ascii_upload_enable=YES ascii_download_enable=YES # # You may fully customise the login banner string: ftpd_banner=Welcome to lightnear FTP service. # # You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. #deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd/banned_emails # # You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). chroot_local_user=YES #chroot_list_enable=YES # (default follows) #chroot_list_file=/etc/vsftpd/chroot_list # # You may activate the -R option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as ncftp and mirror assume # the presence of the -R option, so there is a strong case for enabling it. ls_recurse_enable=YES # # When listen directive is enabled, vsftpd runs in standalone mode and # listens on IPv4 sockets. This directive cannot be used in conjunction # with the listen_ipv6 directive. listen=YES # # This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6 # sockets, you must run two copies of vsftpd with two configuration files. # Make sure, that one of the listen options is commented !! #listen_ipv6=YES pam_service_name=vsftpd userlist_enable=YES userlist_deny=NO #local_root=/var/public_root ##Note: for wordpress ftp download local_root=/var/www tcp_wrappers=YES use_localtime=YES 3. 增加FTP帐户 这里设置的账户名为“cent”,密码为“cent” 1 2 # useradd cent -s /sbin/nologin # passwd cent 4. 编辑user_list文件,允许cent用户访问FTP 1 # vi /etc/vsftpd/user_list 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 # vsftpd userlist # If userlist_deny=NO, only allow users in this file # If userlist_deny=YES (default), never allow users in this file, and # do not even prompt for a password. # Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers # for users that are denied. root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody cent 5. 建立我们的根目录,并设置访问权限 1 2 3 # mkdir /var/public_root # chown -R cent /var/public_root # chmod -R 755 /var/public_root 6. 开启vsftpd服务 1 # service vsftpd start 7.默认开启vsftp服务 1 # chkconfig vsftpd on centos 卸载vsftpd方法 如果服务器上安装了vsftpd,配置出错需要卸载vsftpd 1 # rpm -aq vsftpd vsftpd-2.0.5-16.el5_5.1 #此处是查找vsftpd的返回结果 1 # rpm -e vsftpd-2.0.5-16.el5_5.1 #用rpm -e 查找结果 进行删除就ok了。 warning: /etc/vsftpd/user_list saved as /etc/vsftpd/user_list.rpmsave warning: /etc/vsftpd/ftpusers saved as /etc/vsftpd/ftpusers.rpmsave #删除时将备份vsftp的用户列表文件。 看下是否卸载了vsftpd,进行stop及start操作: 1 # /sbin/service vsftpd stop vsftpd: unrecognized service #找不到vsftpd 1 # /sbin/service vsftpd start vsftpd: unrecognized service #找不到vsftpd记住,在卸载vsftpd之前,先停止vsftpd。 zz: http://www.w3cways.com/1509.html
$ yum install r Loaded plugins: fastestmirror, priorities, refresh-packagekit, security You need to be root to perform this command. $ su 密码: # 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 # 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 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! # r bash: r: command not found # 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 , usr , usr , usr , 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 , main=Edgar Anderson's Iris Data, font.main=4, pch=19) 按Return键来看下一个图: pairs(iris , main=Edgar Anderson's Iris Data, pch=21, + bg = c(red, green3, blue) ) 按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 /xdelta yscale - pin /ydelta scale - min(xscale, yscale) xadd - 0.5*(pin /scale - xdelta) yadd - 0.5*(pin /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 , usr , usr , usr , 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) ), 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 2 3 4 5 6 plot(x) 按Return键来看下一个图: q() Save workspace image? : y #
重装Centos后,屏幕分辨率最大值远远低于实际的屏幕分辨率,因此无法通过一般命令或图形界面调整。在网上找到方法并设置成功。 参考链接: http://aaa103439.blog.163.com/blog/static/17690106720129111230424/ 主要方法(从链接地址复制,特此说明)如下: 原文: 0. telinit 3 1. remove nomodeset from kernel line in grub.conf. Just scroll to end of this line and you will see it there. 2. remove xorg.conf file ! It will load intel driver automatically 3.reboot. 译文: 0 . 执行命令 telinit 3 ,需要root权限,即退出图形界面,回到命令行界面。 1. 从文件/etc/grub.conf 的kernel行中删除“nomodeset 。只要翻到该行的末尾,就可以看到这个词。 2. 删除文件/etc/X11/xorg.conf !INTEL驱动程序会自动被加载。 3. 执行命令reboot, 重启系统。 2013/10/18 初稿 2013/10/18 为防止链接失效,复制链接中主要内容