I have some R code that works on a Mac but someone else is trying to run it on Windows and it doesn't seem to work. The code I have been using is:
for(i in 1:length(SNPs.needproxies)){
print(i)
system(paste0("curl -k -X GET 'https://ldlink.nci.nih.gov/LDlinkRest/ldproxy?var=",SNPs.needproxies[i],"&pop=MXL&r2_d=r2&token=",token,"' > ", dir,"out.",SNPs.needproxies[i],".txt"))
}
If I try to run this on Windows I get the error
https not supported or disabled'.
We have narrowed done the problem in that it seems to be that single quotes should be replaced with double quotes in the address. However as this is within a paste0() function, it thinks this is something else so we thought escaping the double quotes with a backslash i.e.,
\"https://ldlink.nci.nih.gov/LDlinkRest/ldproxy?var=",SNPs.needproxies[i],"&pop=MXL&r2_d=r2&token=",token,"\"
This kind of works in that it gives the output we want but it is supposed to print this to a file called something like dir/out.file.txt but it does not do this part.
The SNPs.needproxies is:
SNPs.needproxies <- c("rs709692","rs9659182","rs13064990","rs11130017","rs9832922" ,"rs36120363","rs4727815","rs7994762","rs72772387")
I have a token for the website but cannot share that but it is stored in the object called token.