protected void saveTotalsAsDataFrame(String saveName) { // TODO Implement some basic redundancy avoidance. String cmd = ""; // Save the frequency totals to a temporary variable String tempTotals = Deducer.getUniqueName("freqTotals"); // Deducer.execute(tempTotals + " <- " + tfDialog.getTermFreqCall(this.getExtraTermFreqArgs())); cmd += tempTotals + " <- " + tfDialog.getTermFreqCall(this.getExtraTermFreqArgs()) + "\n"; String totalType = this.tfDialog.getUseDocumentFrequency() ? "doc_freq" : "term_freq"; // Save the totals // Deducer.execute(saveName + " <- d(term=names(" + tempTotals + "), " + totalType + "=" + // tempTotals +")"); cmd += saveName + " <- d(term=names(" + tempTotals + "), " + totalType + "=" + tempTotals + ")\n"; // delete the temporary variable // Deducer.execute("rm(" + tempTotals + ")"); cmd += "rm(" + tempTotals + ")"; Deducer.execute(cmd); }
public void executeView() { Deducer.execute("print(" + tfDialog.getTermFreqCall(this.getExtraTermFreqArgs()) + ");"); }