In general, it seems that roxygen2 will list parameters in the order they are mentioned in the @param documentation. In this case, p is mentioned first, then r and K (by reference). It seems that some authors like to document their parameters in a different order than they are listed in the function. I find it odd, but I assume it is deliberate. If you want to preserve this ability, perhaps the way to do this is with a flag (@sortParams?) that if defined will reorder the entries in the Rd file to be the same as in the function declaration(s). In the case of multiple functions being documented in the same Rd file, I would guess that the order would be all the parameters in order for the first function defined, then the parameters for the second function (that were not already defined) in order, etc.
Although it's challenging when you have multiple usage statements. I guess you need to parse the usage statements, and then order by there first appearance? Also challenging if you're documenting multiple parameters in a single params (e.g. @params x,y ...). This may be beyond the current scope of roxygen2.
I'll attempt an implementation by changing process_inherit_params so that the order of the \param tags matches the order in the formals. In a first version, the reordering will be applied only if it can be determined without doubt (i.e., same formals and params, only order is wrong). We can think of enhancements later.
@hadley: Do you think the order should be imposed also for functions without @inheritParams?