r - File path with write.zoo -


i'm using r on mac osx , following guide download , maintain collection of csvs stock prices.

http://www.thertrader.com/2015/12/13/maintaining-a-database-of-price-files-in-r/

library(quantmod)  startdate = "2000-01-01" thepath = ""  source(paste("listofinstruments.r",sep=""))  (ii in theinstruments){  print(ii)  data = getsymbols(symbols = ii,                     src = "yahoo",                     = startdate,                     auto.assign = false)  colnames(data) = c("open","high","low","close","volume","adj.")  write.zoo(data,paste(thepath,ii,".csv",sep=""),sep=",",row.names=false) } 

i'm trying keep r files separately csv files, change variable "thepath" existing subdirectory named csv. e.g. thepath = "\\csv\\"

however creates file named \csv\^gspc.csv opposed writing subfolder.

what correct way specify write.zoo path?


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -