I am using a function called icc9, to calculate intraclass correlation coefficients for features over 3 time points. I would like to run the function icc9(y=response,subject="subjid",dat=qc)
on thousands of responses, but I do not know how to specify the arguments for the loop function. I have an example with 3 responses, but still I would have to write out the name of each response. Would be great if this could be made automatically. I am new in R, so a bit hard to figure out the different loop functions.
lapply(c("Name","Name","Name"), function(response) { icc9(y=response,subject="subjid",dat=qc) }) %>% do.call("rbind",.)
Thank you.
question from:
https://stackoverflow.com/questions/65915714/loop-function-lapply-for-culculating-thousands-of-correlation-coefficients 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…