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