R语言第二天

Posted axianz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了R语言第二天相关的知识,希望对你有一定的参考价值。

查看和更改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语言第二天的主要内容,如果未能解决你的问题,请参考以下文章

第二天

python第二天 python介绍与变量

第二天

第二天 Java语言基础

汇编语言进阶和Makefile进阶---第二天

Python学习第二天