Hey guys,

I've been trying for a while to regress between the first observation and the rest of the 199 observations

I used the lappy function and the regression result is stored as a list in the environment.

Here is the code I am using right now.

myre1 <- apply(2:ncol(muscle), function(x) lm(muscle[,1] ~ muscle[,x], data = muscle))

myre2 <- lapply(muscle[,-1], function(x) lm(muscle$GIR ~ x))

# to extract the coefficient

myre3 <- lapply(2:ncol(muscle), function(x) coefficients(lm(muscle[,1] ~ muscle[,x], data = muscle)))

myre4 <- lapply(muscle[,-1], function(x) coefficients(lm(muscle$GIR ~ x)))

However, none of them would answer my question. My aim is to get only the list of p_values as a data frame and determine how many observations are less than 0.05.

any help would be highly appreciated!

Best,

Amare