Skip to content

Commit

Permalink
you can now pass the text directly to NFD
Browse files Browse the repository at this point in the history
  • Loading branch information
dimalik committed Sep 19, 2015
1 parent b16050c commit 9b6b13e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions R/nfdS4.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,8 @@ setMethod("summary", signature="nfd", function(object, ...) {
})

NFD <- function(freqDistA, freqDistB) {
## freqDist(A|B) can be either a frequency distribution vector
## or a text or a vector of chars.
## if (length(freqDistA) == 1)
## if (is.numeric(freqDistA))
## stop("You need to supply a multi-element vector")
## else if (is.character(freqDistA))
## freqDistA <- freq.dist(freqDistA)

## if (length(freqDistA) == 1 || length(freqDistB) == 1 )
## stop("You need multi")
if (is.character(freqDistA)) freqDistA <- freq.dist(freqDistA)
if (is.character(freqDistB)) freqDistB <- freq.dist(freqDistB)
new("nfd", freqDistA=freqDistA, freqDistB=freqDistB)
}

Expand Down

0 comments on commit 9b6b13e

Please sign in to comment.