R Language Common commands

Source: Internet
Author: User

0 Introduction

In the process of learning R language, will encounter a lot of common commands and their own research fields need to remember the function of command, the following is my own in the learning process encountered, to it made a small summary, convenient for later use.

1 Common commands

1.1 Multi-line comments

Simple, multi-line annotations in R can be implemented first using shortcut keys. Since there are no/**/multiline annotations in C and C + + in R, you can also implement this function with some statements.

Use the shortcut key method: #先选中要注释的多行, and then ctrl+shift+c to implement multi-line comments and uncomment.

Use the Function statement method:

#可用以下方法达到多行注释目的
if (FALSE)
{
A=matrix (dp,nrow=5); a# Matrix
dp$mcv# the name of the data
Dp<-array (Dp,c (3,4)) #向量
Dp<-as.data.frame (DP) #数据框
}

1.2

2 function commands

R Language Common commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.