Skip to content
Prev 157463 / 398506 Next

does there any function like sumif in excel?

Not sure if I am interpreting you question correctly, but you could do something like

datas <-data.frame(1:10,rnorm(10))
names(datas) <- c("A","B")
rslt <- datas[ datas[, 'A'] %in%(1:5) , ]

where datas[,'a'] %in%(1:5) is the example filter criteria that I used for the example.  What is the nature of your data, and what are your filter criteria?

Dan

Daniel Nordlund
Bothell, WA USA