Skip to content

Latest commit

 

History

History
93 lines (59 loc) · 1.38 KB

08-mostused.md

File metadata and controls

93 lines (59 loc) · 1.38 KB

08-mostused

  • This function provides a matrix of reference observations that are used most often as sources of imputation and acolumn of the counts.
  • The observations are listed in sorted order, most often used first.
install.packages("yaImpute")
library(yaImpute)

suppressWarnings(library(dplyr))
suppressWarnings(library(magrittr))
Installing package into '/home/nbcommon/R'
(as 'lib' is unspecified)

Attaching package: 'dplyr'

The following object is masked from 'package:yaImpute':

    vars

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
data(iris)
# form some test data
refs=sample(rownames(iris),50)
x <- iris[,1:3] # Sepal.Length Sepal.Width Petal.Length

y <- iris[refs,4:5] # Petal.Width Species
# build a yai object using mahalanobis
mal <- yai(x=x,y=y,method="mahalanobis")
mostused(mal,kth=1) %>% head(10)
142
11
130
8
121
6
122
6
141
6
40
6
11
5
112
5
138
5
38
5