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:
|
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)] }
Intended is scalar output by choosing word count being maximum:
edgar/R/getBusinessDescr.R
Line 219 in b2f9b47
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)] }