【发布时间】:2014-12-28 23:20:52
【问题描述】:
我正在做一个关于风力涡轮机的项目,我在该项目中测试是否可以仅使用风力涡轮机的能量来为房屋供暖。所以我做了这个R代码。该代码可以预测内部温度。我在 Excel 中有数据集,其中包含 2009 年 1 月每小时的室外温度和风速。
R <- 5 This is the isolation of the wall
C <- 4 This is heat capacity of the wall
Ta <- rep(3,24) constant outside temperature in 24 hour
Ph <- rep(2,24) constant effect of the wind turbine in kW in 24 hour
Ti0 <- 20 This is the beginning temperature in the house
a <- -1/(R*C)
for(k in 2:24) {
Ti[k] <- Ta[k] + exp(a) * (Ti[k-1] - Ta[k]) + R * (1-exp(a)) * Ph[k]
}
我的问题是。如何将我的 Excel 数据集加载到 R 中,以便 R 可以预测 24 小时内温度变化和 24 小时内变化效果的内部温度,而不是保持这些恒定
【问题讨论】:
-
您是否在 google 或 SO 上搜索过如何将 excel 电子表格加载到 R 中?
-
转到stackoverflow.com/tags/r/info,找到
R Data Import/Export链接
标签: r