View source: R/NNCTFunctions.R
pairwise.lab | R Documentation |
Keeps only the specified labels i
and j
and returns the data from classes with these labels and also
the corresponding label vector having
class labels i
and j
only.
See also (\insertCiteceyhan:jkss-posthoc-2017;textualnnspat).
pairwise.lab(dat, lab, i, j)
dat |
The data set in one or higher dimensions, each row corresponds to a data point. |
lab |
The |
i , j |
Label of the classes that are to be retained in the post-hoc comparison. |
A list
with two elements
data.pair |
The type of the pattern from which points are to be generated |
lab.pair |
The |
Elvan Ceyhan
lab.onevsrest
and classirest
n<-20 #or try sample(1:20,1)
Y<-matrix(runif(3*n),ncol=3)
cls<-sample(1:2,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10))
pairwise.lab(Y,cls,1,2)
#############
n<-40
Y<-matrix(runif(3*n),ncol=3)
cls<-sample(1:4,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10))
pairwise.lab(Y,cls,2,3)
#cls as a factor
fcls<-rep(letters[1:4],rep(10,4))
pairwise.lab(Y,fcls,"b","c")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.