Best newbie language - Python or R

I highly recommend Pythonista on iPad!!! It hides a lot of the complexity of setting up your computer properly for Python. This means she can just focus on learning to program. By the time she outgrows Pythonista, she’ll be ready for dealing with all the environment stuff.

(Oops, missed the part about her being on Windows but here’s her excuse to buy an iPad :smirk:)

1 Like

She has an iPad, but she’s Windows-based otherwise. :slight_smile:

That’s really good info. I know programming can be scary to start, so something that’s a little more readable is probably a good place to start - as long as it’s not completely useless for the purpose she’s trying to accomplish. :slight_smile: Thanks!

2 Likes

What about minitab?

This program at Emerson University suggests that python or R could be useful.

Avoid an IDE. Use JupyterLabs.

My 2c otherwise …

  • If the end goal is solely to do (robust) data analytics, you will miss nothing by learning only R at the expense of learning python.

  • If the end goal includes wanting to program code to do some other non-data analytic things too, such as creating an interactive graph to plot your daily steps versus the daily temperature fit to a second order polynomial, you will be far better to start with python.

Finally, this note …

… suggests that you, as the experienced programmer, may want to develop a “stay half a step ahead of you” approach, taking the time up front to teach programming concepts first. A follow up question might be to ask for a recommendation for a good book on “programming concepts for those who have never programmed”. You will do well to have a book and develop a roadmap based on it to keep you both from getting lost or overly frustrated with each other.


JJW

1 Like

RStudio is better than any Python application I’ve used, but I think Python is a great first language to learn as it’s more readable than R.

Ultimately it comes down to the best tool for the problem being solved for. Few analysts will only know and use one language.

90% of what you can do in R you can do in Python for analytics (which is my specialty), and Python is more general so you can build software and applications in it (I have no knowledge in this area).

Vote[n] for datacamp! Great first step and there are free courses to get you started.

What is most used at her place of employment?

She’s building a skill in hopes of getting a job, so unfortunately that’s data we don’t have right now.

@webwalrus could certainly be an exception, but in my experience programmers are not good teachers.

2 Likes

My advice in that case is for her to work out whether programming or R programming is the better skill to have.

For learning to program my suggestion would be python over R simply because the community is much larger and there are far more resources. Python is a language that lends itself well to many domains and programming concepts for imperative languagues carry over from one to another fairly well.

However, if she conducts a survey of job postings in her field and R programming is frequently cited as a requirement (or a desired skill) then that’s probably the better path for her.

Disclosure: I’ve done a fair bit of work in python (network management and orchestration software) and none in R. I chose python because it’s well suited for that problem domain and wanted to learn it.

1 Like

The recommendation was against Datacamp due to harassment issues at the executive level.

2 Likes

I use R for data analysis and Python for everything else.

My university leans towards R in grad workshops but does have offerings in Python: Programs | Graduate Quantitative Methods Center

I’d say if you learn Python be sure to start with Python 3. I have a ton of 2.7 code in Alfred workflows & the like and will need to spend a while getting it all converted now that 2.7 is on the way out on the Mac.

2 Likes

If she expects at some point to be collaborating directly with data scientists or data analysts in a private-sector setting, then Python is probably the best answer, especially for industries that don’t rely on a doctoral-level talent pipeline from an academic discipline. So, in finance: Python. In healthcare (my sector): Python. In biomedical/bioscience/bioinformatics: probably R and Python.

For both, the current standard data science/data analysis toolsets are add-ons, not the base language. For R, it’s the Tidyverse (way cleaner than base R). For Python, it’s packages like pandas, scikit-learn, and matplotlib. Both languages are open source, which has contributed to their widening adoption over time (sorry, MATLAB; sorry, Stata).

I started using R in 2013. Python was still a year or two away from becoming dominant for data work, and as an ex-academic I looked in academia for data analysis tools. R was easy to stumble across. I’m a product manager, not an engineer or data scientist, so once I learned enough to do exploratory data analysis, data wrangling, and data visualization, I was set. As time went on, I was increasingly aware that Python was taking over that space, but I had what I needed.

I’ve continued to use R because A) switching costs are real, especially since it’s a support tool rather than a thing I spend all day in, and B) the RStudio IDE is soooo great. Along the way, I started reaching for Python when I had clear one-off tasks that were easy to script (like converting the format of video files). I explored Django (a Python web framework) to learn about web applications and be a better partner to my engineering colleagues.

These days, if I had a few weeks of “sabbatical” time, I’d think seriously using the time to reconstitute my R repertoire in Python. That’s because, as others have pointed out, Python itself is a great utility language, although outside of data science it doesn’t have the same mindshare dominance. The R community has developed a lot of “parity” tools that make the ecosystem increasingly more generalist. You can do web scraping in R, you can build websites with R. You can take the scraped data, run a statistical analysis on it, then publish the findings on the website. But there’s a lot to be said for focus when it comes to your tools.

1 Like

I took some time late last year and converted my project. 2to3 did a good job of most of it and I had to make only minor changes. I think it helped that my coding style was such that most of my code was 3 compatible already.

I’m a decent teacher when the person learning isn’t somebody super close to me. There’s a reason I’m looking into other learning options for my girlfriend - although I have this sinking feeling that by the time this is all over I’ll be conversant in whatever language she winds up learning. :smiley:

This is a really, really good point. There’s no point in learning an old syntax, even if the interpreters for it are still available. :slight_smile:

If you’re a programmer, you already know how to swear :stuck_out_tongue:

3 Likes

Personally, I come from science and so most of my friends are science, but I don’t work in that field anymore.

R is used both in academia and the private sector. I even have friends who own a data analysis and training company which solely relies on R - and they’re doing extremely well for themselves. All in our fairly wide circle, I don’t know anybody who uses anything else. (I was actually the outlier as I hated R and avoid using it as much as I could, relying on Statistica instead. My own work in the field was quite a few years ago, in that precise case)

Adding to @mirrorstage ‘s answer, we are all from the wider biology field (halieutics, agronomics, genetics, animal behavior, environmental science).

1 Like

How about “learn both”? Also javascript.

2 Likes

Over the years I have extensively used (and feel I have only started learning) both R and Python and haven’t looked back. Sometimes even on the same project…

1 Like