• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

基本说明

判断:

如果(条件1){

状态1

}else if(Condition2){

状态2}

否则{

状态_最后

}

传播

对于(我在xx){

yy}

while (xx){yy}

筑巢

对于(我在xx) {

如果(我yy){

锯齿形

}

}

示例1

m-1:100

n向量(“数字”)

n

对于(我在m中){

if (i %%2==0){

向向量添加元素

} else if (i==51){

破裂

}

}

n

huhmtl5zxqh3820.png

示例2

logi=真

数字1

while(num=100){

if(逻辑){

数字=数字10

打印(数字)

logi=FALSE

}

否则{

数字=数字20

打印(数字)

logi=真

}

}

nat1phymexh3821.png

注意:R的条件循环依赖于{},而不是依赖于空格/制表符层次结构,所以R并不关心代码块与空格的对齐,只是梳理了方面的作者和读者的逻辑。

由于R的循环效率较低,计算数据结构时应尽量使用apply()族函数。

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now