tag:blogger.com,1999:blog-5964816804623588850.comments2024-03-15T00:31:24.817-07:00Digithead's Lab NotebookChristopher Barehttp://www.blogger.com/profile/01570188379488941406noreply@blogger.comBlogger229125tag:blogger.com,1999:blog-5964816804623588850.post-73574065079995787242013-04-15T21:57:50.924-07:002013-04-15T21:57:50.924-07:00Howdy, this should work as you describe:
dat$new1...Howdy, this should work as you describe:<br /><br />dat$new1 <- ifelse(dat$Q1==3, 1, 0)<br /><br />Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-48790074966165355942013-04-15T18:35:45.938-07:002013-04-15T18:35:45.938-07:00Hi guys,I am new to R bloggers.Could someone help ...Hi guys,I am new to R bloggers.Could someone help me regarding the use of "if else".<br /><br />I have a data frame (dat) with a categorical variable Q1 (dat$Q1). dat$Q1 was coded as 1,2,3 or 4. I need to create a new column data$new1 based on the following rule: if dat$Q1==3 then dat$new1 should be given a new code 1. otherwise, dat$new1 will be given a code 0.<br /><br />What is the most efficient way of doing this please? thanks Anonymoushttps://www.blogger.com/profile/07017052342974931519noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-76240755405957948022013-03-30T13:26:55.623-07:002013-03-30T13:26:55.623-07:00Plot magnitude my geography. Almost all the quakes...Plot magnitude my geography. Almost all the quakes under 4.0 are in the US. It looks like there are differing cutoffs used by area. For the rest of the world quakes under 4.0 just are not in the file.Larry Chttps://www.blogger.com/profile/10397282360651019338noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-91612419611529898922013-03-29T19:21:15.476-07:002013-03-29T19:21:15.476-07:00Nice, thanks for the links.Nice, thanks for the links.Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-91125493997947912972013-03-29T17:19:52.857-07:002013-03-29T17:19:52.857-07:00-- That assumption was undone by an "out of s...-- That assumption was undone by an "out of sample" event, the correlated decline in the national housing market that precipitated the crisis.<br /><br />Widely believed, but wrong. The data to predict the crash was in plain sight, but not of interest to the players. O'Neil is closer than Silver. That data is simply the ratio of house price to median income. My take is here: http://drcoddwasright.blogspot.com/2011/08/viagra-at-home.html<br />Robert Younghttps://www.blogger.com/profile/09056808374481236610noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-38734420594641860502013-03-29T15:33:55.810-07:002013-03-29T15:33:55.810-07:00Very nice analytics. A couple of other resources f...Very nice analytics. A couple of other resources for earthquake data in R is on posted from a while back as well as a shiny app based on the original statistical-research.com post:<br /><br />http://statistical-research.com/earthquakes-over-the-past-7-days/<br /><br />http://www.premiersoccerstats.com/wordpress/?p=1283<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-24642820064644100692013-03-20T11:28:09.371-07:002013-03-20T11:28:09.371-07:00Nice job, this finally made my understood . thank ...Nice job, this finally made my understood . thank youAnonymoushttps://www.blogger.com/profile/09720554924609455635noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-85200264689158210342013-03-12T16:27:35.593-07:002013-03-12T16:27:35.593-07:00In the Atlantic, Rebecca Rosen writes, "Armed...In the Atlantic, Rebecca Rosen writes, "<a href="http://www.theatlantic.com/technology/archive/2013/03/armed-with-facebook-likes-alone-researchers-can-tell-your-race-gender-and-sexual-orientation/273963/" rel="nofollow">Armed With Facebook 'Likes' Alone, Researchers Can Tell Your Race, Gender, and Sexual Orientation</a>", but the deeper aspects of your personality remain hard to detect.<br /><br />The article is based on the PNAS paper: <a href="http://www.pnas.org/content/early/2013/03/06/1218772110.full.pdf+html" rel="nofollow">Private traits and attributes are predictable from digital records of human behavior</a>.<br /><br />Ha!<br /><br />Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-14940906960149605752013-02-12T22:07:26.829-08:002013-02-12T22:07:26.829-08:00See on Stack Overflow: Convert Python dict to obje...See on Stack Overflow: <a href="http://stackoverflow.com/questions/1305532/convert-python-dict-to-object" rel="nofollow">Convert Python dict to object</a> and <a href="http://stackoverflow.com/questions/14847294/scala-inspired-classes-in-python" rel="nofollow">Scala inspired classes in Python</a>Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-6207788851267728802013-02-10T13:24:33.001-08:002013-02-10T13:24:33.001-08:00Hello, nice to see a fellow student :)Hello, nice to see a fellow student :)Georgii Kalnytskyihttps://www.blogger.com/profile/03707267937139726173noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-85015426708669806752013-02-10T09:01:38.747-08:002013-02-10T09:01:38.747-08:00This comment has been removed by a blog administrator.Anonymoushttps://www.blogger.com/profile/07312837145047749286noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-36835872052979544702013-02-07T18:53:02.342-08:002013-02-07T18:53:02.342-08:00This would definitely fall under fair use and is p...This would definitely fall under fair use and is properly attributed. Leek himself is a big blogger and open science advocate. Check out Simply Statistics.<br /><br />I really wanted to take this class, even if it is taught in R. I'm hoping he'll offer it again when I don't have any classes I am taking for credit.Anonymoushttps://www.blogger.com/profile/13545117360940881678noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-87353273534826125852013-02-07T16:59:59.748-08:002013-02-07T16:59:59.748-08:00I'm always amazed where my twitter feed lands ...I'm always amazed where my twitter feed lands me - in this case leading me to someone else taking the Data Analysis class, who happens to have an interesting blog with cool insights into various types of programming languages. I'll be checking out your other posts as I have time. Cheers, JoyceJoyce Falerhttps://www.blogger.com/profile/16659898187682204151noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-82781194354924836192013-02-07T12:23:45.994-08:002013-02-07T12:23:45.994-08:00Is publication of the class notes a copyright viol...Is publication of the class notes a copyright violation? I am not sure Coursera or Johns Hopkins would appreciate it without their permission.Anonymoushttps://www.blogger.com/profile/07459960525696568638noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-77970283199929097232013-01-13T03:24:29.194-08:002013-01-13T03:24:29.194-08:00Thanks for the very useful post! Love it totally!
...Thanks for the very useful post! Love it totally!<br /><br />I am very new to R, hence may I ask if there is away to insert a color key/legend into this heat map? I heard that only heatmap.2 can do it. May I know if this is true? I attempt to modify the code slightly and wonder if this is correct:<br /><br />mtscaled <- as.matrix(scale(mtcars))<br /><br />heatmap.2(mtscaled, scale='none', key=T, density.info="none", trace="none")<br /><br />(Strangely Colv=F was not allowed here).<br /><br />Could you advise if the above is correct? Thanks so much!<br /><br />Leiahttps://www.blogger.com/profile/11706066025688928065noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-51189414713937540912012-12-12T12:25:49.210-08:002012-12-12T12:25:49.210-08:00Have you checked the queuing system Amazon offers?...Have you checked the queuing system Amazon offers? Simple Workload Scheduler is the name, or something like that...Alan_Peeryhttps://www.blogger.com/profile/12333026273048056020noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-84832856588938797532012-12-11T03:38:40.827-08:002012-12-11T03:38:40.827-08:00Well written blogpost. Very informative!
Thanks f...Well written blogpost. Very informative! <br />Thanks for posting, Christopher.Graeme Walshhttps://www.blogger.com/profile/00560606945089457912noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-38451394391487926322012-12-09T10:43:38.293-08:002012-12-09T10:43:38.293-08:00I came across another bit of writing on the same t...I came across another bit of writing on the same topic from <a href="http://michaelochurch.wordpress.com/2012/12/07/moocs-disrupting-work/" rel="nofollow">Michael O. Church</a><br /><br />"Much has been said about the potential for MOOCs to disrupt education, although I think the threat is overstated. While the current extortion (a choke-hold on the middle-class job market) that justifies enormous college tuitions will go away, as it should, there’s still an immense social value to the college experience, much of which occurs outside of the classroom. That won’t change. So if “disruption” occurs, it will be in the direction of making “the Real World” more like college. It won’t kill off the university."Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-13522824874233492092012-12-08T00:08:36.247-08:002012-12-08T00:08:36.247-08:00Dear Mr. "Digithead",
Envy, lust, sloth...Dear Mr. "Digithead",<br /><br />Envy, lust, sloth? And maybe a little greed, wrath and pride? May we take this to be a feeble attempt at humor? Lest you think this was the least bit original:<br /><br />- <a href="http://techcrunch.com/2012/04/22/sins-of-the-cloud/" rel="nofollow">Sins Of The Cloud</a><br /><br />- <a href="https://www.usenix.org/conference/hotcloud12/seven-deadly-sins-cloud-computing-research" rel="nofollow">Seven deadly sins of cloud computing research</a><br /><br />- The Information Security Forum (ISF) has identified the <a href="http://www.computerworlduk.com/news/cloud-computing/3266134/isf-lists-seven-deadly-sins-of-cloud-computing/" rel="nofollow">seven deadly sins of cloud security</a><br /><br />By the way, you forgot gluttony, you bozo!<br />Donald W. Collinshttp://www.youtube.com/watch?v=oHg5SJYRHA0noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-10312666843177661192012-12-07T18:20:10.757-08:002012-12-07T18:20:10.757-08:00Another insightful talk, "Are we there yet?&q...Another insightful talk, "Are we there yet?" is blogged in <a href="http://www.flyingmachinestudios.com/programming/the-unofficial-guide-to-rich-hickeys-brain/" rel="nofollow">The Unofficial Guide to Rich Hickey's Brain</a> on Daniel Higginbotham's <a href="http://www.flyingmachinestudios.com/" rel="nofollow">Flying Machine Studios</a>.Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-58970418567092642752012-12-07T15:10:15.052-08:002012-12-07T15:10:15.052-08:00Fixed, thanks!Fixed, thanks!Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-57749526086931608362012-12-07T08:18:47.363-08:002012-12-07T08:18:47.363-08:00That Bioconductor AMI link should be:
http://bioco...That Bioconductor AMI link should be:<br />http://bioconductor.org/help/bioconductor-cloud-ami/#parallelJasonhttps://www.blogger.com/profile/09387651296821166671noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-15496232076685272392012-12-07T05:51:32.220-08:002012-12-07T05:51:32.220-08:00I have a little bit of geek envy right now -- nice...I have a little bit of geek envy right now -- nice summary!Anonymoushttps://www.blogger.com/profile/01499289475703735149noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-76042772885154675572012-12-06T22:05:43.182-08:002012-12-06T22:05:43.182-08:00Great post!Great post!Patrickhttps://www.blogger.com/profile/01601540798014060527noreply@blogger.comtag:blogger.com,1999:blog-5964816804623588850.post-3046174801167507672012-12-05T11:03:34.670-08:002012-12-05T11:03:34.670-08:00I put in exactly the right ratio of effort to slac...I put in exactly the right ratio of effort to slacking. I was over the "with distinction" boundary by .1%<br /><br />Christopher Barehttps://www.blogger.com/profile/01570188379488941406noreply@blogger.com