zoukankan      html  css  js  c++  java
  • Chapter 01—Introduction to R

    1.getwd():list the current working directory. (即获得当前工作路径)

    2.setwd("mydirectory"):change the current working directory to mydirectory.(改变当前工作路径为mydirectory

    3.dir.create("mydirectory"):创建一级路径。

    4.ls():list the objects in the current working space.(列出当前工作区的所有objects)

    注意:

    (1)如果setwd("mydirectory")中的mydirectorygetwd()函数求得的路径不一样,则会报错。

       

    (2)解决(1)中问题的办法:使用dir.create("mydirectory")函数先创建一级路径。

       注意:路径mydirectory中只能新创建最后一级路径;否则 ,创建路径无效。

        

    例如:我在H盘中创建了文件夹myprojects,即已存在的路径为"H:/myprojects" ,

    再创建路径"H:/myprojects/Listing1.1",即只创建了一级路径,是可以的;

    但若创建路径"H:/myproject/Listing1.1",会报错,因为myproject和Listing1.1这两个文件夹都是新创建,即创建了两级路径。

    Listing1.1

    5.c(object1,object2...objectN):combine its arguments into a vector or list.

    6.mean(object):calculate the object's mean.(求平均值)

      sd(object):calculate the object's standard deviaton.(求标准差)

      cor(object1,object2):calculate the object1 and object2's correlation.(求相关系数) 

      plot(object1,object2):draw the object1 and object2' scatter plot in figure.

    7.savehistory("mydirectorys"):save the commands history to myfile(default=.Rhistory).(保存命令行记录)

      save.image("mydirectorys"):save the workspace to myfile(default=.RData). (保存当前工作区)

    8.loadhistory("mydirectory"):reload a command's history(default=.Rhistory).

      load("mydirectory"):load a workspace into the current session(default=.RData). 

      

  • 相关阅读:
    php中运算符的分类及注意事项
    ecshopv3.6安装
    phpstudy多站点配置教程
    织梦dedecms出现DedeCMS Error: (PHP 5.3 and above) Please set 'request_order' ini value to i解决办法
    thinkphp3.2批量删除功能
    怎么使用阿里图标库
    人人网,微博,QQ空间,朋友圈,常用API调用实现方法
    ueditor注意事项
    大图在小于自身的div中,水平居中
    thinkphp3.2 实现分页功能
  • 原文地址:https://www.cnblogs.com/wangshenwen/p/3186086.html
Copyright © 2011-2022 走看看