R code for Network Association Analysis (NAA)