0

I am trying to achieve these 4 lines of R-code in Python:

library(imager)
file <- system.file('extdata/parrots.png',package='imager')
im <- load.image(file)
plot(im)

Essentially, I want to be able to run all of these R-functions in Python: https://dahtah.github.io/imager/imager.html (the above code is the first example)

Thanks!

Kim O
  • 551
  • 1
  • 8
  • 19
  • 1
    Is it your expectation to run this as R code, or do you just want calls to the R engine from Python? – IRTFM May 13 '18 at 19:40
  • Is there a reason why you prefer using the R code above and not the python matplotlib library? The same results can be achieved with a similar amount of python code. See https://stackoverflow.com/questions/35286540/display-an-image-with-python/35286615 – Graeme May 13 '18 at 20:35
  • My professor really prefers R.. that is really the main reason. Can matplotlib do anything that R can for visualizations? But for a compromise, I want to ensure her that if needed I can use R within Python. – Kim O May 14 '18 at 19:58

0 Answers0