课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

今天就开通帐号,24,100 门业界名师课程任您挑!

Python with RStudio

Python with RStudio

- [Instructor] RStudio provides a convenient way to use Python with R. This can be somewhat confusing, so let's step through how to use reticulate and RStudio, R and Python. Now, one of the things you'll first notice is that in the example files for this session, I've provided two separate examples. One of them is an R file, it ends in .R and one of them is a Python file, which ends in .py. You're looking at the R example file. Let's take a look at the Python example file. And I'll be switching back and forth between these two to illustrate some of the concepts. When I go to the R file, RStudio understands that I'm supposed to be conversing in the R language. Now when I install reticulate as I've done in line four and five, I connect RStudio to Python and I can now run Python scripts. If I open up my Python code, select a line, and hit Run, you'll notice that the console calls up reticulate::repl_python, and I have >>>…

内容