查看: 2246| 回复: 6
跳转到指定楼层
上一主题 下一主题
收起左侧

Computing For Data Analysis [Week 3]

 关闭
全局:

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
Week 3We have now entered the third week of Computing for Data Analysis which also marks the halfway point. The lectures cover plotting in R as well as various simulation and random number generation functions. I also discuss the concept of reproducible research and literate statistical programming.

This week there is a new Programming Assignment and a new Quiz. The Programming Assignment is challenging and so I encourage you to start early if you have the chance. It builds on the concepts and ideas covered in Week 2 and uses data on hospital mortality rates in the United States. The Programming Assignment this week uses a submit script that you have to download from the Coursera web site. The submit script should submit your solutions for you so you don't have to upload text files like you did for the second assignment.

Finally, the YouTube playlist for this week's lectures is at http://goo.gl/OkDQO. I hope you all have a great week!

Roger Peng



现在有一个问题纠结了很久,我用read.csv("filename")产生的data.frame中每一个元素都是factor,从factor中怎么取数据呢?
直接用as.numeric或者as.double产生的数很不准(比如说原来是14.3的用as.numeric就变成36了),不知道为什么?
然后程序就卡在这一步了,到处找了好久都没办法

评分

参与人数 1大米 +3 收起 理由
Shuang7 + 3

查看全部评分


上一篇:Revolution Analytics 的免费课程 time series forcast (R)
下一篇:[Coursera]Computing for Data Analysis [Week4][完结]
🔗
wyfisgood 2013-10-18 11:42:16 | 只看该作者
全局:
怎么不去课程讨论区里问。。。
我是这么读数据的:
sourcedata <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
然后就可以直接用了,如:
totalstate <- sourcedata$State

评分

参与人数 1大米 +5 收起 理由
EroicaCMCS + 5 很有用的信息!

查看全部评分

回复

使用道具 举报

🔗
 楼主| EroicaCMCS 2013-10-18 21:13:17 | 只看该作者
全局:
wyfisgood 发表于 2013-10-18 11:42
怎么不去课程讨论区里问。。。
我是这么读数据的:
sourcedata

现在知道为什么了:
mydata <- read.csv("outcome-of-care-measures.csv",stringsAsFactors=FALSE)
read.csv()中stringsAsFactors这个参数要设置成FALSE
但是as.numeric(some_factor)为什么出错还是未知。。

我在stack overflow上找到的,下次绝对不在中文社区搜了,血的教训啊
回复

使用道具 举报

🔗
wyfisgood 2013-10-18 21:17:10 | 只看该作者
全局:
中文R的资料还是相对少,week3作业比较蛋疼,坚持过去,week4基本可以碾压了

评分

参与人数 1大米 +1 收起 理由
EroicaCMCS + 1 多谢鼓励,总算写完了

查看全部评分

回复

使用道具 举报

🔗
lthroy 2013-10-19 07:24:20 | 只看该作者
全局:
本周考试 Programming的第三次apply late days终于做完 quiz没得apply late days,反正全对也0分就不贴了

评分

参与人数 1学分 +1 收起 理由
Shuang7 + 1

查看全部评分

回复

使用道具 举报

🔗
iouiwc 2013-10-19 17:18:06 | 只看该作者
全局:


原来还能求学分啊

评分

参与人数 1学分 +1 收起 理由
Shuang7 + 1

查看全部评分

回复

使用道具 举报

🔗
yajiren1 2013-10-23 10:01:44 | 只看该作者
全局:
- -原来这么多在上这课的。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表