dna
dna copied to clipboard
Add more comprehensive error message to dna_network when all documents are excluded
Code for reproducing the error:
library("rDNA")
dna_init("dna-2.0-beta20.jar")
conn <- dna_connection("sample.dna")
congruence <- dna_network(conn,
networkType = "onemode",
statementType = "DNA Statement",
timewindow = "days",
windowsize = 11,
duplicates = "document",
excludeSources = "109")
Error message reads:
0 out of 41 statements retained. Error in .jcall(connection$dna_connection, "[J", "getTimeWindowTimes", : java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Should be something more comprehensible like: "Your exclude options removed all documents while retrieving a network. Nothing left to compute.".