Displaying 1 result from an estimated 1 matches for "vecr".
Did you mean:
vec
2011 Nov 17
3
.Call in R
Hi R developers,
I am new to this forum and hope someone can help me with .Call in R.
Greatly appreciate any help!
Say, I have a vector called "vecA" of length 10000, I generate a vector
called "vecR" with elements randomly generated from Uniform[0,1]. Both vecA
and vecR are of double type. I want to replace elements vecA by elements in
vecR only if sum of elements in vecR is greater than or equal to 5000.
Otherwise, vecR remain unchanged. This is easy to do in R, which reads
vecA<-...