I'm using R software now to code the DEA models. I want to model Ruggiero's 1996 model. However, I'm not sure how to include if condition in linear programming in R.
The If statement is a standard part of the R programming language.
Free documentation is available online.
The are several implementations of DEA in r eg "rDEA" and "Benchmarking" which I have not used but they are unlikely to enable you to change the model without you altering the underling R code as they are designed to enable you to run the standard models on your data set.
You will should look at Peter Bogetoft and Lars Otto; Benchmarking with DEA, SFA, and R; Springer 2011
There are some CRAN packages in R for DEA. However, none of them mentioned about Ruggiero's 1996 model. If you want to do this model in R, you should make your own loop. To do so, you may need to use some functions and loops(for, if-else etc.).