-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Good afternoon! I have been trying to use your script in order to calculate DNAm age in adolescents, and am receiving errors for the last two lines of the script:
datMethClock= data.frame(datMethClock0[as.character(datClock[,1][-1])])
ERROR: undefined columns selected
I try to adjust for this by including a comma before the last square bracket, but it comes back with an NA dataframe which is unusable later on. Would you be able to let me know what sort of object should be output from this line?
Additionally, when trying to calculate the age;
PedBE_age=as.numeric(anti.trafo(datClock[1,2]+as.numeric(as.matrix(datMethClock) %*%
as.numeric(datClock[,2][-1]))))
ERROR: requires numeric/complex matrix/vector arguments
I tried this with a number of combinations of the dataframe above, and am afraid I am not sure what sort of input is needed here (clearly datMethClock should be input in the equation).
Thanks very much!