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:
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/