# NOT RUN {
owd <- setwd(tempdir())
## get the path to the silly example package that is provided with
## package inlinedocs
testPackagePath <- file.path(system.file(package="inlinedocs"),"silly")
## copy example project to the current unlocked workspace that can
## be modified
file.copy(testPackagePath,".",recursive=TRUE)
## generate documentation .Rd files for this package
package.skeleton.dx("silly")
## check the package to see if generated documentation passes
## without WARNINGs.
if(interactive()){
cmd <- sprintf("%s CMD check --as-cran silly",file.path(R.home("bin"), "R"))
print(cmd)
system(cmd)
}
## cleanup: remove the test package from current workspace again
unlink("silly",recursive=TRUE)
setwd(owd)
# }
Run the code above in your browser using DataLab