Skip to content
Prev 387296 / 398502 Next

Help Required for R Markdown function.

I am sure you can get more done with a caret than a stick. I need a stick for another problem, though.

A serious question. I somehow upset my R/RSTUDIO setup while trying to see why a markdown only allowed me to save an HTML version, not PDF and DOC as it used to. It now fails on any such document with a code that indicates it is not set to find a CRAN mirror:

It seems to be upset by a simple call to get the tidyverse loaded and may succeed in one sense but not continue:

" Installing package into ?C:/Users/avid2016/Documents/R/win-library/4.0?
(as ?lib? is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyverse_1.3.0.zip'
Content type 'application/zip' length 439972 bytes (429 KB)
downloaded 429 KB

package ?tidyverse? successfully unpacked and MD5 sums checked
..."

The R Markdown lower console window says:

"Error in contrib.url(repos, "source") : trying to use CRAN without setting a mirror calls <Anonymous> ...
withVisible -> eval -> eval install.packages -> contrib.url Exection halted"

I have done some work that failed. I am running on windows with the latest versions of both R and RSTUDIO after removing all old versions and re-installing both. I have seen hints I need to set some definitions in a .Rprofile or so and tried but it continues to fail. So I now can knit nothing!

Anyone have a pointer on problems like this? My next attempt would be to reinstall the programs on another hard disk entirely in case the problem is in my folder structure of ~/R and below but I dod not want to toss years of work because of one errant configuration file or the lack thereof.

Thanks in advance for any advice. It may be something trivial such as kit not knowing where to place a library so it puts it into a temp area?

Avi

-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of John Kane
Sent: Saturday, February 27, 2021 3:07 PM
To: Kishor raut <rautkishor01 at gmail.com>
Cc: R. Help Mailing List <r-help at r-project.org>
Subject: Re: [R] Help Required for R Markdown function.

The "confusionMatrix" function appears to be from the 'caret' package.
Have you loaded 'caret' with the library(caret) command?
On Sat, 27 Feb 2021 at 14:20, Kishor raut <rautkishor01 at gmail.com> wrote:

            
--
John Kane
Kingston ON Canada


______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.