首页 > 解决方案 > creating loop in downloading files

问题描述

My purpose is to download each of the files from EDGAR website, parse them, and write them in .txt file. Update: Here is the code snippet:


How do I create a loop so that x will be replaced by integers e.g. 1, 2, 3,.. and I can manage downloading the files? Thanks,

标签: r

解决方案


以下内容会让您到达您想去的地方吗?注意,seq_along(masterIndex$EDGAR_LINK)相当于说1:length(masterIndex$EDGAR_LINK)。所以换句话说,这个循环将autoparse()x1、2、3 等处运行,直到masterIndex$EDGAR_LINK你希望它停止的长度或任何地方。

for(i in seq_along(masterIndex$EDGAR_LINK)){
  autoparse(i)
}

推荐阅读