阅读背景:

R使用矢量化替换数据帧记录

来源:互联网 

I'd like to know if there is any way of solving the following problem in an efficient manner. I have a collection of X-Y points. For each point I need to generate a certain number of records and, finally, I need to stack together all those records being generated. Initially I was doing it with a FOR loop and using cbind to stack data.frame at each cycle. Right now changed it a little bit by defining the dimensions of the final record stack and am trying to replace those 0's with the generated values. My code is posted below (with an ** I point out where I got stuck)..if you can give me a hint on that or even have a better solution it would be perfect!I'd like to know if there is any way of solving




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: