-
Notifications
You must be signed in to change notification settings - Fork 18
"getHTMLFilings( )" function broken for R versions 4.2.0 or newer #6
Copy link
Copy link
Open
Description
Lines 113-119 in the getFilingsHTML() function utilize an "if" statement that contains a condition with a length greater than 1.
Lines 113 to 119 in b2f9b47
| 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).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels