阅读背景:

避免使用循环来获取R中的行总和,我想在每行的不同列上开始和停止总和

来源:互联网 

I am relatively new to R from Stata. I have a data frame that has 100+ columns and thousands of rows. Each row has a start value, stop value, and 100+ columns of numerical values. The goal is to get the sum of each row from the column that corresponds to the start value to the column that corresponds to the stop value. This is direct enough to do in a loop, that looks like this (data.frame is df, start is the start column, stop is the stop column):I am relatively new to R from Stata. I have a d




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

分享到: