Question: why r is used in python?
Answer: R is mainly used for statistical analysis while Python provides a more general approach to data science. R and Python are state of the art in terms of programming language oriented towards data science.