Hi R users,
I was trying to plot with  a fixed y with many independet variables. I tried this loop but it did not work. any suggestions? I wanted to make 9 plots. This is a just an example data. 

dat1<- as.data.frame(matrix(sample(1:20,100,replace=TRUE),ncol=10))
lapply(seq_len(ncol(dat1)),function(i) 
{
par(mfrow=c(3,3)),
plot(dat1[,1],dat1[,i+1],
z[,i]<-lm(dat1[,1]~dat1[,i+1]),
abline(z),
summary(z[,i])
}
 here first column is dependent variable and other V2 to V10s are independent variables. Also wanted look the summary (linear model) with each variable.
Thanks for your suggestions
KG
===
 
 		 	   		  
	[[alternative HTML version deleted]]


