formal verification in R?

Does anyone know of work applying formal methods to R?

I'm particularly interested in work attempting to formally verify R's machine learning algorithms: when a big ML system generates a counter-intuitive answer, what assurances are there that it's correctly implemented the underlying algorithms?

Thank you in advance,

Colin