Description Usage Arguments Details Value
View source: R/sharedSupport.r
foo<-subset(df, select='uid') foo$mode <- NA for(i in 1:nrow(df)) foo$mode[i] <- modalClass(df[i] , c('count1','count2','count3'...) , c('ones','twos','threes',...) )
1 | modalClass(x, values, classes)
|
x |
named values of interest, e.g. a single row of a dataframe |
values |
list of column names in x containing cover or other values on which the modal class will be based. |
classes |
list of class names associated with the columns, given in the order that the values are listed. |
ASSUMPTIONS Column names listed by values arg occur in x. The list of class names is in the same order as the list of The number of elements in values is the number of elements in classes.
a character vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.