Questions tagged [reticulate]

Usage questions regarding reticulate R package which provides a comprehensive set of tools for interoperability between Python and R.

Questions on the reticulate R package which provides a comprehensive set of tools for interopability between Python and R. More information on tutorials and API reference can be found on reticulate's website.

486 questions
0
votes
0 answers

reticulate conda_install fails to install package from PyPI

I'm trying to install the pretermgrowth python package from PyPI with reticulate::conda_install() (running on Windows 10) and I'm getting the following error message: library(reticulate) conda_create("project-env") conda_install("project-env",…
Paul Wildenhain
  • 1,321
  • 10
  • 12
0
votes
2 answers

Problem using knitter with reticulate package in rstudio with matplotlib

To elaborate on the title, I am using rstudio making an rmarkdown file that contains both r and python code. My configuration is below: Running under: Windows 10 x64 (build 18363) Matrix products: default locale: [1] LC_COLLATE=English_United…
0
votes
1 answer

How can this reticulate/scipy problem be fixed?

I created a Python program called test_optimize.py with just this line: from scipy import optimize I tried to run it with reticulate and got the error described below. What should I do to fix…
VKV
  • 135
  • 5
0
votes
0 answers

deploy shinyapps on shinyapps.io with reticulate and python

I'm trying to deploy a shiny app which has a python backend on https://www.shinyapps.io. I'm using reticulate package to let r communicate with python. Locally everything is fine. To deploy I'm following this:…
Marco Fumagalli
  • 2,307
  • 3
  • 23
  • 41
0
votes
1 answer

Unable to Knit To PDF the R-notebook containing Python code

I am KNIT TO PDF this R-notebook containing the following Python code: import matplotlib import numpy as np import matplotlib.pyplot as plt t = np.arange(0.0, 2.0, 0.01) s = 1 + np.sin(2*np.pi*t) plt.plot(t, s) plt.xlabel('time…
Akira
  • 2,594
  • 3
  • 20
  • 45
0
votes
1 answer

Why running Python code in Rstudio gives redundant text?

I am running the following python code in R-notebook: ```{r} library(reticulate) ``` ```{python} import matplotlib import numpy as np import matplotlib.pyplot as plt import matplotlib.pyplot as plt import numpy as np t = np.arange(0.0, 2.0,…
Akira
  • 2,594
  • 3
  • 20
  • 45
0
votes
2 answers

Calling Python from R with reticulate package

I want to execute a Python script in R. I've installed reticulate and tested that a Python version has correctly initialized in my R session. py_config() returns the following python: …
nba2020
  • 618
  • 1
  • 8
  • 22
0
votes
1 answer

Problem with spacy: error: bad escape \p at position 257

I'm getting the error `Error in py_call_impl(callable, dots$args, dots$keywords) : error: bad escape \p at position 257 ` running a python code with R through the use of "reticulate" package. The issue comes up while executing the…
utilizzatore
  • 33
  • 1
  • 3
0
votes
1 answer

Trouble loading Python in RStudio with reticulate

I am trying to run a R Markdown document which uses both R and Python code chunks. I am on macOS Catalina version 10.15.2, R version is 3.6.2 and RStudio version is 1.2.5033. I am using the reticulate package version 1.14. which python on the…
Dhiraj
  • 1,650
  • 1
  • 18
  • 44
0
votes
0 answers

Python conflicts in RStuido

I am working on a markdown and wrote an R chunks in which I import reticulate and try to execute the listdir function but I have nothing but a mapply error. After this I decided to execute the code line by line in the Rstudio console and they throw…
Lordald
  • 13
  • 1
0
votes
1 answer

“Error in sys$stdout$flush() : attempt to apply non-function”

I am trying to use the "reticulate" package in R to run python code in my R script. I have tried to run very simple commands just to see if it is working, and I get the following error every time. “Error in sys$stdout$flush() : attempt to apply…
BonnieB
  • 1
  • 1
0
votes
0 answers

R markdown use different color schemes to differentiate r and python code chunks

I am using the reticulate package to include R and Python code in an R Markdown file. The context is: I am using lavaan for structural equation modeling in R and sympy in Python. I don't know of a good SEM module for Python (semopy seems…
hendogg87
  • 145
  • 1
  • 5
0
votes
0 answers

python in Rstudio markdown

I would like to run python in Rstudio markdown interactively. I use reticulate and could run python in the console but not from the markdown for some reason. It seems like once reticulate::repl_python() is run from the markdown, the chunk is shown…
0
votes
1 answer

How to use R's Reticulate package alongside Python's OpenPyxl to hide rows in excel

I'm trying to create an excel file with hidden/folded rows like on the openpyxl webpage but via the reticulate package in R. Currently, I'm able to do everything in the process, from generating dummy data to saving the file, save for manipulating…
0
votes
1 answer

From python to HTTR

I have the following parameters that can authenticate me on the api via python library(reticulate) import requests url = 'https://api.checkbox.com/v1/my_account/oauth2/token' payload =…
Shery
  • 1,808
  • 5
  • 27
  • 51