码迷,mamicode.com
首页 > 编程语言 > 详细

R语言第二天

时间:2018-11-25 16:21:57      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:ble   图书   student   分享   语言   dbase   bubuko   tor   lib   

查看和更改R语言工作空间

getwd() 显示当前工作空间
技术分享图片

setwd()更改当前工作空间

技术分享图片

 列出当前工作空间的对象

ls()
技术分享图片

rm() 移除(删除)一个或多个对象

> ls()
 [1] "b"       "c"       "course"  "d"       "dat1"    "depart"  "dim1"   
 [8] "dim2"    "dim3"    "en"      "grade"   "i"       "id"      "math"   
[15] "mylist"  "name"    "sc"      "Score"   "setdata" "student" "sum"    
[22] "x"       "y"      
> rm(b,c,d)
> ls()
 [1] "course"  "dat1"    "depart"  "dim1"    "dim2"    "dim3"    "en"     
 [8] "grade"   "i"       "id"      "math"    "mylist"  "name"    "sc"     
[15] "Score"   "setdata" "student" "sum"     "x"       "y"   

 q()退出R

q()

 library()能显示有多少个程序包

R程序包是多个函数的集合

> library()

图书馆‘D:/R-3.5.1/library’里有个程辑包:

base                   The R Base Package
boot                   Bootstrap Functions (Originally by Angelo
                       Canty for S)
class                  Functions for Classification
cluster                "Finding Groups in Data": Cluster Analysis
                       Extended Rousseeuw et al.
codetools              Code Analysis Tools for R
compiler               The R Compiler Package
datasets               The R Datasets Package
foreign                Read Data Stored by Minitab, S, SAS,
                       SPSS, Stata, Systat, Weka, dBase,
                       ...
graphics               The R Graphics Package
grDevices              The R Graphics Devices and Support for
                       Colours and Fonts
grid                   The Grid Graphics Package
KernSmooth             Functions for Kernel Smoothing Supporting
                       Wand & Jones (1995)
lattice                Trellis Graphics for R
MASS                   Support Functions and Datasets for Venables
                       and Ripleys MASS
Matrix                 Sparse and Dense Matrix Classes and Methods
methods                Formal Methods and Classes
mgcv                   Mixed GAM Computation Vehicle with Automatic
                       Smoothness Estimation
nlme                   Linear and Nonlinear Mixed Effects Models
nnet                   Feed-Forward Neural Networks and Multinomial
                       Log-Linear Models
parallel               Support for Parallel computation in R
rpart                  Recursive Partitioning and Regression Trees
spatial                Functions for Kriging and Point Pattern
                       Analysis
splines                Regression Spline Functions and Classes
stats                  The R Stats Package
stats4                 Statistical Functions using S4 Classes
survival               Survival Analysis
tcltk                  Tcl/Tk Interface
tools                  Tools for Package Development
translations           The R Translations Package
utils                  The R Utils Package

 

R语言第二天

标签:ble   图书   student   分享   语言   dbase   bubuko   tor   lib   

原文地址:https://www.cnblogs.com/axianz/p/10015426.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!