R Markdown doesn't work (Error in file(file, “rt”) : invalid 'description' argument)

Hello everyone,

I had the wonderful idea a few hours ago to try to learn how to use knitrBootstrap and ran a code that I've obviously forgotten ( I had to run install.github or something I can't remember exactly). Anyway, I have a R markdown that was kniting well before i ran this code, and now I cannot knit any R Markdown project and i have this error : " (Error in file(file, "rt") : invalid 'description' argument)". Obviously, I tried to reinstall knitr package and I have the following error : "unable to load r code in package 'knitr'". I've also done traceback() and here is the result :


6: stop(msg, call. = FALSE, domain = NA)

5: value[[3L]](cond)

4: tryCatchOne(expr, names, parentenv, handlers[[1L]])

3: tryCatchList(expr, classes, parentenv, handlers)

2: tryCatch({
       attr(package, "LibPath") <- which.lib.loc
       ns <- loadNamespace(package, lib.loc)
       env <- attachNamespace(ns, pos = pos, deps)
   }, error = function(e) {
       P <- if (!is.null(cc <- conditionCall(e))) 
           paste(" in", deparse(cc)[1L])
       else ""
       msg <- gettextf("package or namespace load failed for %s%s:\n %s", 
           sQuote(package), P, conditionMessage(e))
       if (logical.return) 
           message(paste("Error:", msg), domain = NA)
       else stop(msg, call. = FALSE, domain = NA)

[1]1: library(knitr)

I thank anybody who could help me, I've a project to finish tomorrow night for my studies and it's quite complicated to work with those problem....

Does this happens after you run install.packages("knitr") ?

This should reinstall knitr that may currently be corrupt.

Do not forget to close any R and Rstudio running process that could have the package loaded.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.