零、需求介绍 现有一张表数据如下: 此表是一张镜像表,policyno列代表一个保单号,state列代表这个保单号在snapdate当天的最后一次状态(state每天可能会变很多次,镜像表只保留snapdate时间点凌晨的最后一次状态)
I\'ve got a data frame in R, and I\'d like to perform a calculation on all pairs of rows. Is there a simpler way to do this than using a nested for loop?