Please help me in installing and loading the swirl package in R.
When I type:
install.packages("swirl")
I get:
Installing package into ‘C:/Users/Abdullah/Documents/R/win-library/3.3' (as ‘lib’ is unspecified)
trying URL 'https://ftp.iitm.ac.in/cran/bin/windows/contrib/3.3/swirl_2.4.2.zip'
Content type 'application/zip' length 212366 bytes (207 KB)
downloaded 207 KB
package ‘swirl’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Abdullah\AppData\Local\Temp\RtmpeOgzVN\downloaded_packages
The package shows as being installed:
packageVersion("swirl")
[1] ‘2.4.2’
But when I go to load it:
library(swirl)
I receive an error:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘R6’
Error: package or namespace load failed for ‘swirl’
The error "There is no package called 'R6'" tells you that you need that package installed as well. Running install.packages("R6");library(R6) should take care of that.
The swirl package load the testthat package, which loads the R6 package. Since you don't have R6 installed, you can't load testthat, and you can't load swirl.
Related
I am trying to use the library ggpmisc and even though the installation went okey it gives me an error when I try to open the library. How can I solve it?
install.packages("ggpmisc")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/ggpmisc_0.4.5.zip'
Content type 'application/zip' length 1349360 bytes (1.3 MB)
downloaded 1.3 MB
package ‘ggpmisc’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\dkafe\AppData\Local\Temp\Rtmpkh620g\downloaded_packages
library(ggpmisc)
Error: package or namespace load failed for ‘ggpmisc’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘conquer’ In addition: Warning message:
package ‘ggpmisc’ was built under R version 4.1.3
I'm fairly new to R. I'm using RStudio on Windows 10 for a class and I got this when trying to load dplyr after installing it:
> install.packages("dplyr")
Installing package into ‘C:/Users/samot/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/dplyr_1.0.5.zip'
Content type 'application/zip' length 1334630 bytes (1.3 MB)
downloaded 1.3 MB
package ‘dplyr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\samot\AppData\Local\Temp\RtmpUv0uns\downloaded_packages
> library(dplyr)
Error: package or namespace load failed for ‘dplyr’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘utf8’
Not quite sure how to get it to run. Any help would be appreciated.
We can install the package that is needed
install.packages('utf8')
Or another option is to specify the dependencies as TRUE to install all the necessary packages
install.packages('dplyr', dependencies = TRUE)
I tried to install package ggplot2in R Studio Desktop Windows. But I got the error message when I used the library :
> install.packages("ggplot2")
Installing package into ‘C:/Users/Rifqi/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/ggplot2_3.3.3.zip'
Content type 'application/zip' length 4068844 bytes (3.9 MB)
downloaded 3.9 MB
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Rifqi\AppData\Local\Temp\Rtmp005k6i\downloaded_packages
> library(ggplot2)
Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘utf8’
>
What should I do to fix this problem?
Install package utf8 and then try reinstall ggplot2 and it should be fixed
install.packages("utf8")
I installed the "digest" package in R.
> install.packages("digest")
Installing package into ‘C:/Users/user/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2017-03-15/bin/windows/contrib/3.3/digest_0.6.12.zip'
Content type 'application/zip' length 172746 bytes (168 KB)
downloaded 168 KB
package ‘digest’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘digest’
The downloaded binary packages are in
C:\Users\user\AppData\Local\Temp\RtmpaMPhK6\downloaded_packages
I confirmed that this package is installed in:
C:\Program Files\R\R-3.3.2\library\digest
My repos are:
getOption("repos")
CRAN CRANextra
"https://mran.microsoft.com/snapshot/2017-03-15" "http://www.stats.ox.ac.uk/pub/RWin"
Then I wanted to install "kableExtra" package. But I am getting an error message that the there is no "digest":
> library(kableExtra)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘digest’
Error: package or namespace load failed for ‘kableExtra’
What is wrong? Is this due to the fact that the original library is from CRAn, but for some reason this "digest" package is coming from MRAN? How can I fix this?
I am trying to load ggplot2. I am using Windows 7. R tells me that ggplot2 has loaded successfully but when I try to use the library function it says it cannot find ggplot2. Here is what it says.
install.packages("ggplot2")
Installing package into ‘C:/Users/Owner/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/ggplot2_1.0.0.zip'
Content type 'application/zip' length 2675581 bytes (2.6 Mb)
opened URL
downloaded 2.6 Mb
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Owner\AppData\Local\Temp\RtmpyesS1j\downloaded_packages
I then tried to use the library function and got this message:
library("ggplot2")
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘munsell’
Error: package or namespace load failed for ‘ggplot2’
> head(diamonds)
Error in head(diamonds) : object 'diamonds' not found
I hope someone has an idea about what I have done wrong.
You should have executed this:
install.packages("ggplot2", dependencies=TRUE)