Is it acceptable to put programming code as proof in paper? I used statistical language R to fit probability distribution to acquired data. Instead of doing it by hand I relied on code. I wrote something like "probability density function was computed using programming language R (for more details see appendix A)". And appendix A has exact code to compute this. I also put reference to R package documentation. Is it bad to rely external tools for proof?
From what I can guess about the context, I would avoid putting the code in your paper unless:


the code is really short (say no more than half a column);
the code is interesting in itself;
and you know that your average reader understands the language R.


Otherwise, it would probably better to omit the code altogether and write, in a note, something like:


  To those interested, the authors can provide the R code employed to compute the probability density functions described in this work.