R: update SIR functions, add sir class operations.