r - Run multiple inputs into a function -


i want run coxph function inputs in myinput? there way using for-loop in r?

myinput

[1] "hsa_let_7a_5p"     "hsa_let_7b_3p"     "hsa_let_7b_5p"     "hsa_let_7c_5p"     "hsa_let_7d_3p"           [6] "hsa_let_7d_5p"     "hsa_let_7e_5p"     "hsa_let_7f_5p"     "hsa_let_7g_5p"     "hsa_let_7i_5p"          [11] "hsa_mir_100_5p"  

formula

coxph(surv(time, status)~ myinput,  data=as.data.frame(test)) 


Comments