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
1
vote
1 answer

Error when installing python package in R using reticulate

I am trying to access S&P Capital IQ's Python API to pull data for a report. However, I'm completely unfamiliar with how Python works (only used R before), so I'm hoping to get some help on how I can install the capiq_excel package in R using…
Tanga94
  • 695
  • 6
  • 27
1
vote
0 answers

R: Unable to use package reticulate with SYSTEM account under Windows

I am trying to call a Python script without using R Markdown in Reticulate in a R script. I have a requirement to call the R script by a third-party application (using SYSTEM account) which will then call the Python script. Basically I want to use R…
1
vote
2 answers

Python from RMarkdown - Matplotlib problems

I'm trying to use reticulate to run some simple Python code in an RMarkdown document. I've found that if Matplotlib is in the conda environment, I get errors when trying to run a python code chunk, but I can run Python from R directly. Here's a…
KirkD-CO
  • 1,603
  • 1
  • 22
  • 35
1
vote
0 answers

Trouble using python with Reticulate in R

I have been trying to debug this for about 8 hours now and I am getting really frustrated. I can't get reticulate to work and I have followed probably 15 tutorials step by step. I am able to import numpy and matplotlib just fine, but other packages…
bismo
  • 1,257
  • 1
  • 16
  • 36
1
vote
0 answers

array_reshape() with strange behaviour

for reshaping an array I use array_reshape() from reticulate package. For some purposes, I need a pre-allocated array consisting only of NA. Now let's see what array_reshape() does. data <- c(NA, NA, NA) a <- as.array(data) a <-…
stschn
  • 121
  • 7
1
vote
1 answer

How to transform MultiLineString produced in python to R object?

I'm integrating a python function in R code using the reticulate package, the original output in python is MultiLineString. Class of output in Rstudio is : > class(result) [1] "centerline.geometry.Centerline" …
ahmathelte
  • 559
  • 3
  • 15
1
vote
0 answers

matplotlib plots download from R shiny

I have code in python which is creating plot using matplotlib. I am saving these files in directory named www and using those plots to render in R shiny app. But now I want to insert downloader button in shiny app for downloading these plots. But I…
1
vote
1 answer

Reticulate error: AttributeError: 'list' object has no attribute 'shape'

I am trying to run a Python function fitKCA within the R environment through the package reticulate. The function is sourced correctly and all I do is to call the function: fitKCA(z = bh$V1, q = 0.1) and pass the two arguments: bh$V1, a column (of…
Vitomir
  • 295
  • 2
  • 14
1
vote
0 answers

Error in initialize_python(required_module, use_environment) : Installation of Python not found, Python bindings not loaded. R Visualization Power BI

I am trying to make interactive visualizations in Power BI. Since Power BI only supports these for R code, I am currently doing my data processing in python using reticulate before making my visualizations in R. The visualizations in Power BI work…
pwilliams
  • 11
  • 1
1
vote
0 answers

R Reticulate change conda path

I have two Anaconda packages installed, one with Python 2 and one with Python 3. When I installed Reticulate in R and tried to call reticulate::source_python, it gives an error Error: Specified conda binary…
jf328
  • 6,841
  • 10
  • 58
  • 82
1
vote
0 answers

Silencing or Suppressing text in console when sourcing a function in R

I am using reticulate to source a function from a python file using reticulate::source_python(). However, this prints texts (warnings) in red in the RStudio console the first time I source it in a session; and I would like to silence or suppress it.…
Oscar Kjell
  • 1,599
  • 10
  • 32
1
vote
0 answers

Reticulate Knitting Error Using Seaborn (SVGLite not supported?)

I'm trying to knit an RMarkdown file but getting an error in a block where I am using seaborn. ax = sns.countplot(x = 'target', data = df, palette = 'hls') ax.set_title("Distribution of Positive Samples") for p, label in zip(ax.patches,…
Eisen
  • 1,697
  • 9
  • 27
1
vote
1 answer

Problem running successive Python scripts using 'Reticulate' function in R

I'm having a problem running two successive python scripts in a single R script that calls the reticulate function. When I run them separately, it works perfectly. Am I missing something? Do I need some sort of function that closes the previous…
1
vote
1 answer

How to save a logit model in R and import it in Python?

I need to train a glm model in R 3.6 and import it in Python 3.7 to make predictions. As a proof of concept I borrowed this code from…
Javide
  • 2,477
  • 5
  • 45
  • 61
1
vote
1 answer

How can I use the TaggedDocument function (Gensim \ Doc2Vec) via Reticulate in R?

I am trying to run Python's gensim package in R environment via reticulate. More specifically, I am trying to build a doc2vec model, for which a corpus of tokens and tags needs to be prepared. The TaggedDocument function is where I am having…
giova_p
  • 11
  • 2