I want to save the object that is the result of the htmlParse command. Here is some code to illustrate my problem. Simply, I want to be able to save the parse HTML page to an object and load it into a future session.
library(XML)
PATH = "/colleges/Bentley-University"
URL <- paste("http://www.cappex.com", PATH, sep="")
doc <- htmlParse(URL)
mylist <- list(doc)
mylist[[1]]
save(mylist, file="mylist.Rdata")
rm(list=ls())
load("mylist.Rdata")
However, when I try to recall the contents of my list, this is the error I get:
> mylist[[1]]
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file '/var/folders/hv/wtvckymn0230hpsdwylmtf0r0000gn/T//Rtmp8Mrpev/fileed256550e50': No such file or directory
stron mylist gives:List of 1 $ :Classes 'HTMLInternalDocument', 'XMLInternalDocument' <externalptr>