Live data from Hacker News

Learn R Through Examples (2020)

gexijin.github.io

31–40 of 68 posts

Re: Learn R Through Examples (2020)

#31

R plus the tidyverse is what makes it a great language. Some tidyverse concepts are being baked into base R, like the pipe, but base R by itself feels hollow. R’s future is inseparable from the tidyverse. We need to just lump them together in any serious discussion of R. I teach a graduate level R course mainly for economics and statistics majors. (My educational background and career are computer science and technic…

  I spend the first three weeks on base R, to convey language-essential concepts ...
Awesome. When I was at Berkeley, Linear Systems had Matlab assignments. The real engineers (ME, CE, NE, ...) had taken a Matlab class and knew the language. We computer scientists hadn't and suffered horribly as a consequence. Your three weeks of learning base R instead of sink or swim will pay dividends.

Re: Learn R Through Examples (2020)

#32
post #28

I currently do lots of data analysis in excel and know basic Python. I would be interested to get opinions on if R is better suited to data analysis than python if that’s all I was doing.

Python is certainly more popular and for job prospects I always tell that to newer data folks. That being said if you want to load in some data do some SQL like manipulation, run some stats and make a graph or output a report I would argue R is way better experience than Python but that’s much more about the package ecosystem and less a comment on the language. Dplyr is just more friendly to use than pandas (often 3-5 ways to do something and as a beginner this can be disorienting) and ggplot2 vs matlibplot. For interactive graphs you are probably going to use plotless anyway from both languages.

One other thing I would mention is knowing SQL well is the most translatable skill. A lot of dplyr and pandas are doing SQL like operations (in fact dbplyr will generate SQL equivalent commands for your dplyr code for various backends).

In summary know how to manipulate data in SQL then pick a language (because you will need to do some IO/reporting stuff outside just data work) where the ecosystem of packages feels user friendly to you and your work flow and roll with that.

Re: Learn R Through Examples (2020)

#33

R plus the tidyverse is what makes it a great language. Some tidyverse concepts are being baked into base R, like the pipe, but base R by itself feels hollow. R’s future is inseparable from the tidyverse. We need to just lump them together in any serious discussion of R. I teach a graduate level R course mainly for economics and statistics majors. (My educational background and career are computer science and technic…

Personally I much prefer data.table. The syntax is a bit harder to get a handle on, but you can do just about anything with it, and it's much faster at runtime than tidyverse.

Re: Learn R Through Examples (2020)

#34

R plus the tidyverse is what makes it a great language. Some tidyverse concepts are being baked into base R, like the pipe, but base R by itself feels hollow. R’s future is inseparable from the tidyverse. We need to just lump them together in any serious discussion of R. I teach a graduate level R course mainly for economics and statistics majors. (My educational background and career are computer science and technic…

I spend the first three weeks on base R, to convey language-essential concepts ... Awesome. When I was at Berkeley, Linear Systems had Matlab assignments. The real engineers (ME, CE, NE, ...) had taken a Matlab class and knew the language. We computer scientists hadn't and suffered horribly as a consequence. Your three weeks of learning base R instead of sink or swim will pay dividends.

Got the reverse experience. Trained in Matlab, R and Python, we had to follow a database/application class with computer scientist and software engineers where the big project was to make a basic Android application with sqlite database. That was painfully to be dropped in Android Studio without any Java knowledge. And because the class was focused on database, we had no Java introduction or whatever. We were able to team up with students from the other cursus that already had multiple Java projects and classes under their belt but the pill was bitter swallow.

Re: Learn R Through Examples (2020)

#35
post #4

I consider myself a pretty experienced developer/software engineer/whatever. Decade into my career, started in iOS in Obj-C, learned Swift along the way, eventually migrated to the backend with Java/SQL, and finally found myself where I really wanted to be, embedded doing C/C++ work for a household name. That said, about halfway through my master's about two years ago, I found myself in an intro to data mining course…

Dataframes...python has R to thank...too bad they suck compared to R.

Re: Learn R Through Examples (2020)

#36
post #8
post #4

I consider myself a pretty experienced developer/software engineer/whatever. Decade into my career, started in iOS in Obj-C, learned Swift along the way, eventually migrated to the backend with Java/SQL, and finally found myself where I really wanted to be, embedded doing C/C++ work for a household name. That said, about halfway through my master's about two years ago, I found myself in an intro to data mining course…

I pretty much had the same experience with R. I've never been able to get really productive with it as a software developer. I feel like I know too much and can't break from old habbits. It's very academic which I feel really holds it back from software devs and also captures non developers in it's web. Whilst it's certainly got some runs on the board. I think having data science folk work in more standard languages…

Funny, I'll never say that R itself is very academic. The environment maybe, the users sure but the language is very much an mutated Lisp with vectorized operation. Same for the python stuff, I never hit that problem working a lot with it but most of the time when I wanted to check a lib, I landed in C++ aka I am not sure to understand how to read the code.

What in R made it feel academic for you?

Re: Learn R Through Examples (2020)

#37

Lot's of negative comments in here about learning R from experienced programmers. I've found this is largely because experienced programmers have this unjustified bias that R is some toy language that should be easy to learn and has nothing to teach them. If you approached a language like Rust in the same way you would likely be just as frustrated with it. Certainly R has its quirks, but most of this comes from being…

I have used R a few times now, and I definitely agree with the statement that thinking in vectors is central to writing good R scripts. However, as a computer engineer and performance junkie, its unfortunate that it doesn't get as much attention as other "STEM DSLs" (Julia, MATLAB) when it comes to performance.

The same could technically be argued for Python; The current approaches to dealing with high-performance compute workloads either rely on JITing (e.g. Numba, Tensorflow/JAX's XLA) or bridging over to giant binary blobs through the CPython's well-supported C interop.

Re: Learn R Through Examples (2020)

#38
post #28

I currently do lots of data analysis in excel and know basic Python. I would be interested to get opinions on if R is better suited to data analysis than python if that’s all I was doing.

I'm strong in R, Python and Excel. I'd say anyone transitioning from Excel would be better off using R first. Because the R Integrated Development Environment (IDE) RStudio is fantastic compared to any Python IDEs that you can actually figure out how to install. The IDE makes it easy to visualise what you're actually doing to your dataframes by using multiple table tabs.

Re: Learn R Through Examples (2020)

#39

I recently tried to migrate my R code to Julia. Even though I already knew R data.table is faster than DataFrames.jl, I was totally blown away by how slow Julia is. So I quickly gave up. I think I will have to write unavoidable hard loop in cpp, which I really don't want to do...

My experience as well.

In order to get those so much vaunted C-like speeds the Julia fanboys claim, you need lots of contortions and hacks. Off the bat, Julia speeds are mediocre.

Re: Learn R Through Examples (2020)

#40
I am currently a data scientist. Educational background in cs, few hobby web projects and currently updating my skills in java/ kotlin with the idea to go in mobile dev.

I use only Python in my work. I learnt R and honestly, it's the same thing as using Python scientific packages. It's mostly vectorized operations, spaghetti functional, if people know how to write functions, code just to get it done. To make graphs, web dashboard(no, we are not doing web dev, it's dark magic frameworks), build machine learning and eventually some reports. Stuff like that.

I do some software engineering but that s optional and I do it because I can. Most data scientists/ ml engineers can't. So you guys are not fair. R and Python in these environments are not even being used for building stuff. This language is not build for that. Hence it's not good from the perspective you look at it from(software engineers).

Unlike Python , R is solely for statistics, data science and probably some basic ml( I haven't tried tho). Also Shiny for building web dashboards. But don't look at the code for dashboards, it's bad, with 'get it done and forget' approach.

That being said. Good luck scrapping, mining, cleaning data with something not called R/Python. Good luck with data engineering. Exploring and visualizing trends. Creating dashboards even. Machine learning. Monitoring and reporting in scientific manner.

Try This type of work with your favorite languages. Then see how quickly and easily it's done with R/Python . Come back and say it's bad language.

It's the same thing as embedded dev complaining about how bad js is for his job. You just totally ignore the context.

Post reply on HN