I\'m using R for a pharmacodynamic analysis and I\'m fairly new to programming.
The thing is, I\'m carrying out linear regression analysis and in the future I will
The suggestion above work great. Depending what you need you can use the tidy() function for the coefficients and glance() for the table.
library( broom ) a <- lm(cars$speed ~ cars$dist) write.csv( tidy( a ) , "coefs.csv" ) write.csv( glance( a ) , "an.csv" )