I am using getURLContent(url, userpasswrd, httpauth=1L, binary=TRUE)
to download a csv file from a server.
The data I get after using this getURLContent () is a raw vector with contents
"4d" "43" "4e" "2c" "45" "4e"
I know the dataset should have arround 400 columns and few hundred rows. How do I convert this raw vector to into appropriate data. I have used
as.raw(as.hexmode(rawvector1)
rawToChar(iconv(rawvector1, from="UTF-8"))
None of these work. Basically I dont know how to convert raw vector to the right format. Any help here is much appreciated.
Okay I tried this approach and it worked.
test1 = getURLContent(url,userpwd,httpauth = 1L, binary=TRUE)
testraw1= readBin(test1 , what='characer', n=length(t61)/4)
new.dataframe = data.frame(read.csv(textConnection(testraw1)))