[R Course] How to: Code in Python on Nüance-R

R Courses

Nüance-R allows you to work either in R or Python.

Thierry Warin https://warin.ca/aboutme.html (HEC Montréal and CIRANO (Canada))https://www.hec.ca/en/profs/thierry.warin.html
02-07-2020


Nüance-R provides this course to teach you how to run Python-based code. Take a look at this course!

Although we develop more tools in R than in Python, we are equally promoting R and Python since essentially what we want to promote is functional languages.

To use Python on Nüance-R, you have two options:

Option 1

After entering your log in and password, just create an R Markdown document.

Then insert a code chunk, but this time select Python, not R.

You will see a code chunk with a chunk name “python”, ready to run ;-).

Now, since our servers are (almost) always up-to-date ;-), change this “python” for “python3.8.” When you run the code, it calls the “python3.8” server installation.

If you want an earlier version, then leave “python” in the code chunk. If this is the first time you do this process, you will be asked to install on your session “miniconda.” Please answer yes, and it will install python 3.6.

With either way, you realize that you have the equivalent of Jupyter Notebook or else. You realize the versatility of this way of working. You can work using Markdown, R, Python, html, Latex, etc. all in the same document. Different people or different teams can share the same content and collaborate in the most agile way.

Option 2

For developpers who do not want any Markdown code amidst their coding session, for instance software engineers who just want Python, then you can create a new Python script from the file menu. You can type your Python code as in any other editor (Visual Studio, Jupyter, Spyder, etc.). When you run it for the first time, it will ask you to install “mincondo” with Python 3.6, please say yes.


You are all set!

Citation

For attribution, please cite this work as

Warin (2020, Feb. 7). Thierry Warin, PhD: [R Course] How to: Code in Python on Nüance-R. Retrieved from https://warin.ca/posts/rcourse-howto-codeinpython/

BibTeX citation

@misc{warin2020[r,
  author = {Warin, Thierry},
  title = {Thierry Warin, PhD: [R Course] How to: Code in Python on Nüance-R},
  url = {https://warin.ca/posts/rcourse-howto-codeinpython/},
  year = {2020}
}