No need for the question I have solved it by myself.
There was no answer thank you
Could you please post few lines from your input data?
Deleted for no answer :)
You could have posted your own answer, it might have helped someone in the future.
This should give the output you are looking for:
Had to create some random data.frames, and assume some definitions of pca, otherwise lm was giving NAs.
Original problem: https://github.com/alphaCTzo7G/biostars/blob/master/biostars_backup.r
Potential solution: https://github.com/alphaCTzo7G/biostars/blob/master/biostars_clean.r
This is my question but I have deleted it how come you know the question?
Login before adding your answer.
Use of this site constitutes acceptance of our User Agreement and Privacy