Live data from Hacker News

Data Analysis and Visualization Using R (2014)

varianceexplained.org

1–10 of 26 posts

Re: Data Analysis and Visualization Using R (2014)

#2
These tutorials are from 2014. While they provide a good overview of R syntax, a lot has been added to the R-verse such as dplyr, which the author primarily used for his Trump Tweets blog post yesterday.

If you are interested in learning R, you may want to read the R for Data Science book (http://r4ds.had.co.nz/) book by dplyr (and ggplot2) author Hadley Wickham.

Relatedly, I have my own (slightly more complicated) notebooks using R/dplyr/ggplot2, open-sourced on GitHub, if you want further examples of real-world analysis with publically-available data along the lines of the Trump Tweet analysis:

Processing Stack Overflow Developer data: https://github.com/minimaxir/stack-overflow-survey/blob/mast...

Identifying related Reddit Subreddits: https://github.com/minimaxir/subreddit-related/blob/master/f...

Determining correlation between genders of lead actors of movies on box office revenue: https://github.com/minimaxir/movie-gender/blob/master/movie_...

Re: Data Analysis and Visualization Using R (2014)

#3

These tutorials are from 2014. While they provide a good overview of R syntax, a lot has been added to the R-verse such as dplyr, which the author primarily used for his Trump Tweets blog post yesterday. If you are interested in learning R, you may want to read the R for Data Science book ( http://r4ds.had.co.nz/ ) book by dplyr (and ggplot2) author Hadley Wickham. Relatedly, I have my own (slightly more complicated)…

Took me a while to find the Trump Tweets blog you referred to. It is here for anyone trying to find it:

http://varianceexplained.org/r/trump-tweets

By the author of the tutorial, not the poster of the link.

Re: Data Analysis and Visualization Using R (2014)

#6

These tutorials are from 2014. While they provide a good overview of R syntax, a lot has been added to the R-verse such as dplyr, which the author primarily used for his Trump Tweets blog post yesterday. If you are interested in learning R, you may want to read the R for Data Science book ( http://r4ds.had.co.nz/ ) book by dplyr (and ggplot2) author Hadley Wickham. Relatedly, I have my own (slightly more complicated)…

While the tidy-verse and data.table are definitely game changers for R, it's still worth learning the basics. Often the packages make irritating tasks easy, though they rarely touch the tasks that are easy in base R. I've seen some pretty convoluted dplyr from newcomers that could have been achieved in a single line without loading any packages.

Re: Data Analysis and Visualization Using R (2014)

#8
Considering how R has exploded in recent years, I'm sure a more recent article could have been found. That being said, R is amazing, easily the best language/software for any sort of data analysis. And bonus points for easy Fortran/C++ interop, as well as easy multicore/cluster computing. Oh, and a shout out to RStudio, which is also amazing.

Re: Data Analysis and Visualization Using R (2014)

#9
I love R, but I have two problems with it that I would like suggestions to deal with.

1. Debugging seems way more primitive than in other languages; I get cryptic messages and really struggle to pinpoint what is happening. Debugging in (free) shiny is even harder, the page says connection closed and I have to guess what has happened.

2) Code structure. R is simply fantastic in REPL and/or RStudio mode for digging around in data, but longer programs remind me of COBOL (yes, I have programmed in COBOL) longer programs written by other people remind me of the need to drink alcohol. Creating good code with R is vastly harder than Julia, in Julia the challenge is not to create working clean code - that's natural, the challenge is to create the best code that it's ever possible to have. In R the challenge (for me) is to make it work and not make a plate of spaghetti.

Re: Data Analysis and Visualization Using R (2014)

#10
post #9

I love R, but I have two problems with it that I would like suggestions to deal with. 1. Debugging seems way more primitive than in other languages; I get cryptic messages and really struggle to pinpoint what is happening. Debugging in (free) shiny is even harder, the page says connection closed and I have to guess what has happened. 2) Code structure. R is simply fantastic in REPL and/or RStudio mode for digging aro…

Sounds like you need some Visual Studio in your life.

And you probably need to be more assertive.

https://cran.r-project.org/web/packages/assertive/index.html

https://www.youtube.com/watch?v=JWjiMvlfCwk

(and you do use testhat for unit testing, right?)

Additionally you want to write more modular code. There is lots of infrastructure around that in R, but people just don't use it often enough because a lot of them aren't programmers.

mlr provides very convenient infrastructure for building data mining pipelines where you can fuse steps with each other.

http://mlr-org.github.io/mlr-tutorial/release/html/

For non-model building activities, i.e. inference or exploratory analysis, mason is a great way to do it.

https://cran.r-project.org/web/packages/mason/vignettes/spec...

Post reply on HN