I ended up with a big data.table and I have to do operations per row. (yes... I know that this is clearly not what data.table are for)
R) set.seed(1)
R) DT=d
Am I missing something, doesn't this give the min across row
set.seed(1)
DT=data.table(matrix(rnorm(100),nrow=10))
DT[,c('a','b'):=list(1:10,2:11)]
DT
cols<-c("V1", "V2", "V3", "V4", "V5", "V6", "V7", "V8", "V9", "V10")
Method 1
DT[,Min_Vi:=do.call(pmin, c(.SD, na.rm=TRUE)), .SDcols=cols]
Method 2
transform(DT,Min_Vi=pmin(get(cols)))