-
Notifications
You must be signed in to change notification settings - Fork 18
getBusinDescr() issue with tie in maximum word count #9
Copy link
Copy link
Open
Description
getBusinDescr(cik.no = 'ALL', filing.year = 1996)
Error in if ((!is.na(product.descr)) & (max(words.count) > 100)) { :
the condition has length > 1
Intended is scalar output by choosing word count being maximum:
Line 219 in b2f9b47
| product.descr <- product.descr[which(words.count == max(words.count))] |
However above results in a vector output if there's a tie in maximum word count.
Perhaps using the below would solve the issue? I can PR if it seems fine. Thank you.
if (length(product.descr) > 1) { product.descr <- product.descr[which.max(words.count)] }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels