用R探索数据 [英] Exploring Data With R
问题描述
大家好
我正在Microsoft/edx上数据科学课程,但我无法继续进行实验室练习.在指令中,它说我正在使用R时,在最后一个单元格中添加以下代码:
I at the middle of taking Data Science course at Microsoft/edx but I couldn't be able to continue with my lab exercise. At the instruction, it says add the following code in the last cell, while i was using R:
#打印温度和销售量统计信息
summary(dat [c('Temperature','Sales')])
print('标准偏差:')
apply(dat [c('Temperature','Sales')],2,sd)
#打印温度与销售量的相关性
print('Correlation:')
cor(dat [c('Temperature','Sales')]))
#地块温度与销售额的关系
plot(dat $ Temperature,dat $ Sales,xlab ="Temperature",ylab ="Sales")
# Print statistics for Temperature and Sales
summary(dat[c('Temperature', 'Sales')])
print('Standard Deviations:')
apply(dat[c('Temperature', 'Sales')],2,sd)
# Print correlation for temperature vs Sales
print('Correlation:')
cor(dat[c('Temperature', 'Sales')])
# Plot Temperature vs Sales
plot(dat$Temperature, dat$Sales, xlab="Temperature", ylab="Sales")
但是我最终得到了表明此内容的错误代码,
But I ended up getting error code that says this,
Error in summary(dat[c("Temperature", "Sales")]): object 'dat' not found
Traceback:
1. summary(dat[c("Temperature", "Sales")])
请帮助我继续我的课程.
Please help me to proceed with my course.
谢谢.
推荐答案
您可以检查输入数据集的名称吗?
Could you check the name of the input dataset?
此问题似乎与此线程非常相似:https://social.msdn.microsoft.com/Forums/azure/en-US/952f5400-a6ef-4fd2-8d18-a5001a7f22a5/exploring-data- with-r?forum = MachineLearning
This issue seems to be very similar to this thread: https://social.msdn.microsoft.com/Forums/azure/en-US/952f5400-a6ef-4fd2-8d18-a5001a7f22a5/exploring-data-with-r?forum=MachineLearning
此致,
Jaya
Regards,
Jaya
这篇关于用R探索数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!