问题描述:

I am new to R! I would like to know how to check a vector for values greater than 1.96 and then increment a variable n by 1 for every value greater than 1.96. I know an example in C++ for an array

for(i<101)

{

if(samplespace[i]>1.96)

n=n+1;

}

Now I just need to know how to do the same thing with a vector in R. Any help would be much appreciated!

相关阅读:
Top