We consider the discretization in time of the equation u' + Au = 0 where A is a positive definite operator in a Hilbert space. The time discretization is based on applying the operator r(kA) at each time step where r(z) is a rational function and k the time increment. For such schemes we show stability and error bounds under various assumptions. The discussion is generalized to the case that -A is a generator of an analytic semigroup in a Banach space. Applications are given to fully discrete methods for parabolic partial differential equations where finite element approximations are used in the spatial variable.