set.seed(10)
data=rnorm(12)
f1=rep(c(1,2),6)
f2=c(rep(1,6),rep(2,6))
summary(aov(data~f1*f2))
Df Sum Sq Mean Sq F value Pr(>F)
f1 1 0.535 0.5347 0.597 0.462
f2 1 0.002 0.0018 0.002 0.966
f1:f2 1 0.121 0.1208 0.135 0.723
Residuals 8 7.169 0.8962
summary(lm(data~f1*f2))$coeff
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.05222024 2.732756 0.0191090 0.9852221
f1 -0.17992329 1.728346 -0.1041014 0.9196514
f2 -0.62637109 1.728346 -0.3624106 0.7264325
f1:f2 0.40139439 1.093102 0.3672066 0.7229887
These are two different codes. from the Lm model you need the coefficients. while from the aov model you are just tabulating the sources of variation. Try the code
anova(lm(data~f1*f2))
Analysis of Variance Table
Response: data
Df Sum Sq Mean Sq F value Pr(>F)
f1 1 0.5347 0.53468 0.5966 0.4621
f2 1 0.0018 0.00177 0.0020 0.9657
f1:f2 1 0.1208 0.12084 0.1348 0.7230
Residuals 8 7.1692 0.89615
This gives the tabulation of the sources of variation leading to the same results.