我正在尝试使用edgarWebR
包从 EDGAR 获取公司及其归档信息。特别是,我想使用包中的两个函数 -filing_information
和company_filings
.
我实际上cik
在不同的数据集中有数千个,但上面的两个函数都不能处理cik
. 这是一个例子——
library(edagrWebR)
comp_file <- company_filings(c("1000045"), before = "20201231",
type = "10-K", count = 100,
page = 1)
head(comp_file)
accession_number act file_number filing_date accepted_date
1 <NA> 34 000-26680 2020-06-22 2020-06-22
2 <NA> 34 000-26680 2019-06-28 2019-06-28
3 <NA> 34 000-26680 2018-06-27 2018-06-27
4 <NA> 34 000-26680 2017-06-14 2017-06-14
5 <NA> 34 000-26680 2016-06-14 2016-06-14
6 <NA> 34 000-26680 2015-06-15 2015-06-15
href
1 https://www.sec.gov/Archives/edgar/data/1000045/000156459020030033/0001564590-20-030033-index.htm
2 https://www.sec.gov/Archives/edgar/data/1000045/000156459019023956/0001564590-19-023956-index.htm
3 https://www.sec.gov/Archives/edgar/data/1000045/000119312518205637/0001193125-18-205637-index.htm
4 https://www.sec.gov/Archives/edgar/data/1000045/000119312517203193/0001193125-17-203193-index.htm
5 https://www.sec.gov/Archives/edgar/data/1000045/000119312516620952/0001193125-16-620952-index.htm
6 https://www.sec.gov/Archives/edgar/data/1000045/000119312515223218/0001193125-15-223218-index.htm
type film_number
1 10-K 20977409
2 10-K 19927449
3 10-K 18921743
4 10-K 17910577
5 10-K 161712394
6 10-K 15931101
form_name
1 Annual report [Section 13 and 15(d), not S-K Item 405]
2 Annual report [Section 13 and 15(d), not S-K Item 405]
3 Annual report [Section 13 and 15(d), not S-K Item 405]
4 Annual report [Section 13 and 15(d), not S-K Item 405]
5 Annual report [Section 13 and 15(d), not S-K Item 405]
6 Annual report [Section 13 and 15(d), not S-K Item 405]
description size
1 <NA> 14 MB
2 <NA> 10 MB
3 <NA> 5 MB
4 <NA> 5 MB
5 <NA> 5 MB
6 <NA> 7 MB
我需要在函数中使用href
变量。filing_information
实际上,我试图以这种方式使用它-
file_info <- filing_information(comp_file$href)
但它不起作用。我收到了这条消息-
Error in parse_url(url) : length(url) == 1 is not TRUE
我实际上可以通过href
如下方式放置每个变量值来做到这一点
x <- "https://www.sec.gov/Archives/edgar/data/1000045/000156459020030033/0001564590-20-030033-index.htm"
file_info <- filing_information(x)
函数也是如此company_filings
,我只使用一个cik
- “1000045”,但在另一个文件中,我有数千个cik
我想运行该company_filings
函数的所有文件。手动这是不可能的,因为我有数千个cik
.
任何人都知道如何在 LARGE 向量上自动执行这两个功能。
谢谢