Live data from Hacker News

R for Data Science

r4ds.had.co.nz

41–50 of 76 posts

Re: R for Data Science

#41
post #20

Earlier quoted context omitted.

The advantage of Jupyter notebooks over RStudio is having text and code in the same place. Personally, I find that being able to run+modify the code in a textbook is much more informative than simply reading the syntax (for example - https://github.com/CamDavidsonPilon/Probabilistic-Programmin... ). Sure, I could just copy and paste from the website into an IDE, but notebooks are a more natural way of communicating c…

In R we also have notebooks that does this just it is slightly different. RMarkdown is how we do this same thing. At first I missed the different code and text blocks but it is just easier to work with when it is all a text file. You can make the RMarkdown for reports and then just run them from the command line and never have to open RStudio or R. Saves me a ton of time. You use back ticks to make your code chunks.…

I agree, though I don't know if I'm just missing something when working in Jupyter, or if Python has an equivalent of RMarkdown?

Jupyter has some conveniences, but the tradeoffs aren't worth it for me. Working in a web browser has much less power, when it comes to keyboarding, than Atom/Sublime. And I generally don't need to interact with my data; I know what I'm outputting, I just want to show the results to readers alongside my code. I don't use RStudio but RMarkdown is easy to run from the command line.

By contrast, Jupyter requires (AFAIK) working within the browser and, when you save the file, you get a huge jumble of JSON, which is how the notebook is serialized. I tend to write a lot of vignettes/explorations and the need to full-text grep them is important to me and is not feasible when the text content is saved as JSON.

Re: R for Data Science

#42
post #3
post #2

I'm the author, and I'm happy to answer any questions. The book should be in print by (hopefully) the end of this year, or definitely by Jan 2017. The content will not change significantly, but there is will be minor fixes and a lot of proof reading.

Trivial, self-serving question: is there a library for generating the diagram of table relationships here (13.2 nycflights13) http://r4ds.had.co.nz/relational-data.html And of course, thanks for another great book, it's helpful for learning R but I'm always enlightened by how thoroughly you explain the general concepts (e.g. Relational data and joins). Have heard a few people on faculty speak enthusiastically about t…

Lucidchart has the ability to generate SQL for you to run and it'll generate a schema for you. I used it to figure out the schema for a particularly poorly designed DB I had to get data out of.

Re: R for Data Science

#43
post #30
post #2

I'm the author, and I'm happy to answer any questions. The book should be in print by (hopefully) the end of this year, or definitely by Jan 2017. The content will not change significantly, but there is will be minor fixes and a lot of proof reading.

Great book, I'm getting a lot out of the site and I'm looking forward to the release. Thanks! I understand there is always one more library or topic that could be included... .. but with that acknowledged, what do you think of sqldf as an alternative to dplyr? You mention that dplyr is a bit easier (within the context of being specialized for data analysis). I'd have trouble weighting in because I don't use R all tha…

I wondered something similar about sqldf, because at one point my brain just seemed to work better "in" SQL.

The biggest issue I found was that sqldf was significantly slower than dplyr and other alternatives.

I started trying to mess about with something I was calling sqldf2. Didn't get very far, but there is some perhaps somewhat useful benchmarking in the R script here:

https://github.com/phillc73/sqldf2/blob/master/R/sqldf2.R

Re: R for Data Science

#44
post #10
post #3

Earlier quoted context omitted.

Trivial, self-serving question: is there a library for generating the diagram of table relationships here (13.2 nycflights13) http://r4ds.had.co.nz/relational-data.html And of course, thanks for another great book, it's helpful for learning R but I'm always enlightened by how thoroughly you explain the general concepts (e.g. Relational data and joins). Have heard a few people on faculty speak enthusiastically about t…

No, I wish there was. Those were painstakingly drawn by hand.

Possibly DiagrammeR?

https://github.com/rich-iannone/DiagrammeR

Re: R for Data Science

#45
post #2

I'm the author, and I'm happy to answer any questions. The book should be in print by (hopefully) the end of this year, or definitely by Jan 2017. The content will not change significantly, but there is will be minor fixes and a lot of proof reading.

I'm a software engineer who is already quite comfortable with Python and has more of an interest in machine learning than data science (as I understand it), is there any reason for me to learn R?

Re: R for Data Science

#46
post #2

I'm the author, and I'm happy to answer any questions. The book should be in print by (hopefully) the end of this year, or definitely by Jan 2017. The content will not change significantly, but there is will be minor fixes and a lot of proof reading.

I'm a software engineer who is already quite comfortable with Python and has more of an interest in machine learning than data science (as I understand it), is there any reason for me to learn R?

Re: R for Data Science

#47
post #45
post #2

I'm the author, and I'm happy to answer any questions. The book should be in print by (hopefully) the end of this year, or definitely by Jan 2017. The content will not change significantly, but there is will be minor fixes and a lot of proof reading.

I'm a software engineer who is already quite comfortable with Python and has more of an interest in machine learning than data science (as I understand it), is there any reason for me to learn R?

If you use M$ products you will find that SQL Server 2016 has R baked in.

https://www.r-bloggers.com/demo-r-in-sql-server-2016/

Re: R for Data Science

#48
post #23
post #19

Earlier quoted context omitted.

Are there solutions for the exercises? Lot of the exercises, especially in the exploratory data analysis part are "why is blah?" or "is there a relationship in blah?" I think I know the answers, but it would be nice to be able to check if I see what I'm supposed to se in the data.

No, but I'll probably crowd source when the book is final.

Just curious, but why crowd source? You're the author, I assume you wrote the questions, didn't you solve them when you wrote them?

Re: R for Data Science

#49
post #45
post #2

I'm the author, and I'm happy to answer any questions. The book should be in print by (hopefully) the end of this year, or definitely by Jan 2017. The content will not change significantly, but there is will be minor fixes and a lot of proof reading.

I'm a software engineer who is already quite comfortable with Python and has more of an interest in machine learning than data science (as I understand it), is there any reason for me to learn R?

Probably not any strong reasons. That said, if you're a software engineer, you shouldn't find it too hard to pick up enough R to be useful. You might enjoy " rel="nofollow">http://adv-r.had.co.nz> which describes R from more of a programming language perspective.

Re: R for Data Science

#50
post #39
post #37

Earlier quoted context omitted.

Because it's designed to support typically relational db workloads (i.e. Lots of changes) not data analysis workloads. Dataframes in R, pandas etc, are column oriented, which leads to better trade offs for analysis. Also SQL is a substantially inferior API for data analysis. (Not because it's a bad language, but again because that's not what it's designed for)

I agree completely that SQL is not the language for the kind of data analysis you're discussing in this book - to me, the question is whether it's useful to do querying and filtering through SQL and data analysis through python and R on the resulting datasets. I think pretty much everything you've written here would be continue useful if you used sqldf to generate data frames in R, but I don't know R well enough to b…

I think teaching multiple languages would make life much harder for new learners.

Also window functions are really useful for data analysis, and they are much easier to express in dplyr than they are in SQL (at the cost of being slightly less general).

Post reply on HN