This is not an error with Rmarkdown, it is an error with R saying you don't have any CRAN repo configure. If you have a call to install.package or else in your Rmd doc, it could cause the error.
Just configure a cran mirror if you haven't one. Are you using RStudio IDE BTW?