Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install package XML to R

Tags:

r

xml

I need to install the package "XML" to R. It always reports "XML is not available for R(Version 3.1.1)" I have tried to download the .tar but it still did'n work. Can anyone help me to solve this?

> install.packages("XML", repos = "http://www.omegahat.org/R");
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  cannot open: HTTP status was '404 Not Found'
Warning in install.packages :
  unable to access index for repository http://www.omegahat.org/R/bin/windows/contrib/3.1

   package ‘XML’ is available as a source package but not as a binary

Warning in install.packages :
  package ‘XML’ is not available (for R version 3.1.1)
like image 684
Liu Su Avatar asked Sep 25 '14 15:09

Liu Su


People also ask

Why is my R not installing packages?

Changing the configuration in R Studio to solve install packages issue. Go To Tools -> Global option -> Packages. Then uncheck the option “Use secure download method for HTTP”. For other RStudio issues refer to official Troubleshooting Guide here.

How do I install a package file in R?

Go into R, click on Packages (at the top of the R console), then click on "Install package(s) from local zip files", then find the zip file with arm from wherever you just saved it. Do the same thing to install each of the other packages you want to install.

What is XML package in R?

It stands for Extensible Markup Language (XML). Similar to HTML it contains markup tags. But unlike HTML where the markup tag describes structure of the page, in xml the markup tags describe the meaning of the data contained into he file. You can read a xml file in R using the "XML" package.

What do I do when R package is not available?

When this happens, it can often be helpful to do a websearch for "GitHub [packagename]" - and if you find a GitHub website that sounds like the right package, you can install the in-development version.


1 Answers

In general, install.packages("XML") worked well for me in the past, but I recently had an issue with R version 3.6.3.

The solution for me was:

install.packages("XML", repos = "http://www.omegahat.net/R")

Note that it's .net, not .org.

like image 179
Jaeyoung Chun Avatar answered Sep 17 '22 00:09

Jaeyoung Chun