R/cos_sim_calc_boot.R

Defines functions cos_sim_calc_boot

Documented in cos_sim_calc_boot

cos_sim_calc_boot = function(data,indices){d = t(data[indices,]);cossimdata = NULL; for (i in 1:(nrow(d) - 1)) 
       {for (j in (i+1):nrow(d)) 
                     { tempa = sum(d[i,]*d[j,]) /(sqrt(sum(d[i,]^2))* sqrt(sum(d[j,]^2))) ;  cossimdata = c(cossimdata,tempa)}
       } 
 return(cossimdata)}

Try the pubmed.mineR package in your browser

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

pubmed.mineR documentation built on June 22, 2024, 6:50 p.m.