我尝试使用 knitR 直接在 Overleaf 文档中编写 R 代码。但是,当我运行以下代码时会弹出此消息:
<>=
# Install relevant packages
install.packages('wooldridge')
# Load the hprice dataset from the Wooldridge package
data(hprice1, package = 'wooldridge')
#Attach the dataset
attach(hprice1)
#Estimate a linear model
estmodel <- lm(price~assess+sqrft+lotsize+bdrms)
#Summarize the regression results
summary(estmodel)