XML Install - Complete Novice

Hi,

i am trying to install XML, but get an error message that it cant be found.

install.packages(xml)
Error in install.packages : object 'xml' not found

R version is 3.6.1.

Complete novice at using R studio, so apologies if this is a simple issue :slight_smile:

James

Hi @jingamells and welcome! Looks like there are a couple little things here. First, is that when you use install.packages(), you need to put the the name of the package in quotes ("package_name"). The other thing is that there is a package called XML and a package called xml2. I'm not sure which package you are intending to use, but you could install them both by running:

install.packages(c("XML", "xml2"))

Thanks @mfherman

This is what i get - still issues with the XML package?

install.packages(c("XML", "xml2"))
Installing packages into β€˜C:/Users/jingamel/Documents/R/win-library/3.6’
(as β€˜lib’ is unspecified)
Warning in install.packages :
package β€˜XML’ is not available (for R version 3.6.1)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/xml2_1.3.2.zip'
Content type 'application/zip' length 3178186 bytes (3.0 MB)
downloaded 3.0 MB

package β€˜xml2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\jingamel\AppData\Local\Temp\28\RtmpI9k2Nk\downloaded_packages

Ah. I see -- XML requires R 4.0 or higher and it appears that you have R 3.6.1 installed. If you want to install the XML package, you'll need to upgrade to a more recent version of R. The current version is 4.0.2. You can install the latest version for your operating system here: https://cran.r-project.org/

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