Lines 113-119 in the getFilingsHTML() function utilize an "if" statement that contains a condition with a length greater than 1.
|
if(!grepl(pattern ='<xml>|<type>xml|<html>', filing.text, ignore.case=T)){ |
|
|
|
filing.text <- gsub("\t"," ", filing.text) |
|
filing.text <- gsub("<CAPTION>|<S>|<C>", "", filing.text, ignore.case = T) |
|
## Append with PRE to keep the text format as it is |
|
filing.text <- c("<PRE style='font-size: 15px'>", filing.text, "</PRE>") |
|
} |
As of R 4.2.0, "if" statements with conditions of length greater than one are now an error (rather than a warning). This change in how R treats such "if" statements broke this function and produces the following error message:
Error in if (!grepl(pattern = "<xml>|<type>xml|<html>", filing.text, ignore.case = T)) { :
the condition has length > 1
I am running R version 4.2.2 (2022-10-31 ucrt).
Lines 113-119 in the
getFilingsHTML()function utilize an "if" statement that contains a condition with a length greater than 1.edgar/R/getFilingsHTML.R
Lines 113 to 119 in b2f9b47
As of R 4.2.0, "if" statements with conditions of length greater than one are now an error (rather than a warning). This change in how R treats such "if" statements broke this function and produces the following error message:
I am running R version 4.2.2 (2022-10-31 ucrt).