translated check_NP.R to Rmarkdown doc