R/dfs2.R

Defines functions dfs2

Documented in dfs2

dfs2 <-
function(x, onetwo){  # x is a matrix of intensities
                              # onetwo is a character vector 
                              # of same order and length 
                              # indicating assay I or II 
   one <- density(x[onetwo=='I'], na.rm=T, n = 2^15, from = 0, to = 5000)
   two <- density(x[onetwo=='II'],na.rm=T, n = 2^15, from = 0, to = 5000)
   one$x[which.max(one$y)] - two$x[which.max(two$y)]
}

Try the wateRmelon package in your browser

Any scripts or data that you put into this service are public.

wateRmelon documentation built on Nov. 8, 2020, 7:47 p.m.