Hello RStudio community, I'm having trouble installing the XML package on Windows 10 and hoping someone else may have encountered this and know how to solve this (and hopefully this is an appropriate forum for asking this type of question).
In short; I cannot install the XML library on Windows 10 because it requires compilation, and the compiler can't find the appropriate libxml2 header files. XML is a dependency of another package that I'm trying to install.
I'm currently running R and RStudio under Windows 10 with Rtools 3.5 installed.
Here is the output of my
> sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale:  LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252  LC_NUMERIC=C LC_TIME=English_United Kingdom.1252 attached base packages:  stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached):  compiler_3.5.1 tools_3.5.1
When I try to install the XML package, I receive the following error:
* installing *source* package 'XML' ... ** package 'XML' successfully unpacked and MD5 sums checked ** libs *** arch - i386 C:/Rtools/mingw_32/bin/gcc -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I/include/libxml2 -I/include -D_R_=1 -DUSE_R=1 -DUSE_XML_VERSION_H=1 -DLIBXML -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DUMP_WITH_ENCODING=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DLIBXML2=1 -DHAVE_XML_HAS_FEATURE -DLIBXML_STATIC -O3 -Wall -std=gnu99 -mtune=generic -c DocParse.c -o DocParse.o In file included from DocParse.c:10:0: DocParse.h:18:27: fatal error: libxml/parser.h: No such file or directory #include <libxml/parser.h> ^ compilation terminated. make: *** [C:/PROGRA~1/R/R-35~1.1/etc/i386/Makeconf:208: DocParse.o] Error 1 ERROR: compilation failed for package 'XML'
I've downloaded the windows binaries for libxml from https://www.zlatkovic.com/projects/libxml/ , which expand out to a directory containing
lib/ which I'm familiar with from linux, but I'm not sure how to link these to the compiler on Windows.