Unique values for ff and ffdf objects
Unique values for ff and ffdf objects
## S3 method for class 'ff' unique(x, incomparables = FALSE, fromLast = FALSE, trace = FALSE, ...) ## S3 method for class 'ffdf' unique(x, incomparables = FALSE, fromLast = FALSE, trace = FALSE, ...)
x |
|
incomparables |
a vector of values that cannot be compared. FALSE is a special value, meaning that all values can be compared, and may be the only value accepted for methods other than the default. It will be coerced internally to the same type as x. |
fromLast |
logical indicating if duplication should be considered from the last, i.e., the last (or rightmost) of identical elements will be kept |
trace |
logical indicating to show on which chunk the function is computing |
... |
other parameters passed on to chunk |
An ffdf with unique values in x
or an ff vector with unique values in x
if x is a ff vector.
data(iris) irisdouble <- rbind(iris, iris) ffiris <- as.ffdf(irisdouble) ## unique.ff unique(ffiris$Sepal.Length) unique(ffiris$Petal.Length) ffiris$Species[1] <- NA unique(ffiris$Species) levels(unique(ffiris$Species)) ## unique.ffdf uiris <- unique(ffiris, trace=TRUE, by=10)[,] test <- unique(irisdouble) dim(iris) dim(irisdouble) dim(uiris) dim(test) !apply(uiris, MARGIN=1, FUN=function(x) paste(x, collapse=",")) %in% apply(test, MARGIN=1, FUN=function(x) paste(x, collapse=",")) !apply(test, MARGIN=1, FUN=function(x) paste(x, collapse=",")) %in% apply(uiris, MARGIN=1, FUN=function(x) paste(x, collapse=","))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.