r/askdatascience • u/hallsinmypocket • 2d ago
want to learn R, but should i start with python first?
hi everyone!! i am a junior in undergrad but i'm interested in pursuing a clinical psych phd after. i'm interning at a hospital lab this upcoming january, and i want to get a head start on learning some programming. my advisors told me they won't be able to teach me a lot but if i'd like to get involved on a poster, i should learn some R beforehand.
i want to start learning R but i don't really know where to start. i skimmed this https://exploringr.princeton.edu/self-learning-resources-for-r/ and i really like it. i have a teeny bit of experience with coding (tried python a few years ago and it was interesting but couldn't fully grasp it.. but i was in high school and struggling a lot mentally so that class was the last of my priorities. maybe i could enjoy it now). would it be beneficial to get familiar with python so i can have a better chance at understanding R? or should i start with R despite the steep learning curve?
i am also interested in an udemy course, bc i think an actual teacher would be pretty helpful. i will try youtube vids, textbooks w/ lots of visual aides, and forums before i pay for one though. any advice would be appreciated!
1
u/Impressive_Jacket464 2d ago
Find an interesting dataset on kaggle and learn both. Start by doing basic EDA and then hypothesis testing.
1
u/big_data_mike 2d ago
You could go with R or python since you are going to get a PhD. R is more common in academia and research. Python is more common in commercial applications.
Figure out what you want to do with your coding skills then take a Udemy course or whatever geared towards that area. When I was an undergrad I took intro to computer programming which was taught in matlab but the concepts transferred over to R. Now i exclusively use python.
1
u/SprinklesFresh5693 2d ago
I would say learn one and stick with it for some years, and then learn the other one if you want.
R is not special, python can do the same. If you think python will help you more , pick that one, otherwise, pick R.
While R is great, qhat many companies ask for is python though, unless youre in health or pharma industry in the clinical department, there they usually use R more
1
u/shockjaw 1d ago
Both communities have their strengths and weaknesses. Positron is a handy tool that will navigate both. Either way, try to make sure your code is reusable and you have steps to replicate your research. Python’s package ecosystems comes in two flavors: conda-forge or PyPI. R’s are conda-forge or CRAN.
conda-forge for Python comes in the form of the tools pixi or conda. I’d recommend pixi. uv is what I’d recommend if your project is Python only. R’s tools come in the form of renv, rig, and others.
R’s excellent for statistics and visualizations. Python is excellent for general data workloads. It really doesn’t matter which one you pick.
0
u/tintires 2d ago
Any AI can teach you if you give it a good prompt.
-1
u/Familiar9709 1d ago
I think R is obsolete by now