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

Problems running reticulate under Anaconda Windows install

I'm having trouble doing even the most basic things with the reticulate library in R Studio. My code looks as follows: library(reticulate) use_python("C:\\Users\\User2017\\AppData\\Local\\Programs\\Python\\Python36\\python.exe") req <-…
West
  • 2,350
  • 5
  • 31
  • 67
0
votes
1 answer

Using python modules in R reticulate with hyphens?

I'm trying to import a module using the reticulate library in R, however the library fails to import because it has a hyphen in it. In specific, it is the bitmex-ws module. py_install("bitmex-ws") works no problem, but the error is when trying to…
Anthony
  • 31
  • 1
  • 1
  • 8
0
votes
0 answers

Reshaping image in R

I'm doing image recognition with Keras in R. I'm trying to convert my images to single dimensional matrices. Here is my code : pics <- c("p1.jpg", "p2.jpg", "p3.jpg", "p4.jpg", "p5.jpg", "p6.jpg", "c1.jpg", "c2.jpg", "c3.jpg", "c4.jpg",…
Akshit Bhalla
  • 11
  • 1
  • 8
0
votes
0 answers

How to handle large Pandas dataframe to visualize data in R using `ggplot`?

I have a workflow where I use python for signal processing and R for analyses and plotting. From the python part, I get a large data frame (100 observations of 11165 variables) that I save and import it in R using feather. However, working with such…
AJMA
  • 1,134
  • 2
  • 13
  • 28
0
votes
1 answer

Error when trying to build a neural network

When I try to fit the training sets on the model, I get the following error: Error in py_call_impl(callable, dots$args, dots$keywords) : Evaluation error: Required version of NumPy not available: installation of Numpy >= 1.6 not found. I tried to…
Mara
  • 17
  • 4
0
votes
0 answers

Is there any way I can pass a python variable to R code?

I have a string variable in my python code: apple = jo34 and would like to call an R function to perform the next step. However, my variable from python needs to be called. How can I do that? There have been similar questions asked in the past but…
hsayya
  • 131
  • 1
  • 10
0
votes
1 answer

Change package global variable

Is it possible to change a global variable which is visible only within a package?: library(reticulate) # access the variable - works reticulate:::.globals$use_python_versions # change the variable - doesn't…
user680111
  • 971
  • 1
  • 9
  • 17
0
votes
1 answer

use_config() is not changing my python configuration in R reticulate

I'm new to the reticulate package in R and i'm having an issue. I'm specifying the python version I want to use (anaconda3 - python3.7) using use_python but it's not working. This is my code: library(reticulate) sys <- import("sys") …
0
votes
0 answers

issues after uninstalling reticulate: loadNamespace(name)

I uninstalled reticulate due to some error I was getting with Altair but now everytime I start R I get this error: Error in loadNamespace(name) : there is no package called ‘reticulate’ I already tried to reinstall reticulate but I get a: Error in…
Guillermo.D
  • 399
  • 2
  • 14
0
votes
1 answer

R-Python Reticulate : TypeError: 'size' must be an integer

New to Reticulate, I'm trying to run this sample code with no luck :( library(reticulate) use_virtualenv("~/virtualenv", required = TRUE) np <- import("numpy", convert = FALSE) plt <- import("matplotlib.pyplot") img <- import("pyts") # R…
jeanjerome
  • 98
  • 8
0
votes
0 answers

Error in py_run_file_impl: System Exit: No such file or directory

I'm trying to run Task1.py via Shiny framework of R in Task1.r. Python code is successfully running. But it is giving me error in some line. Task1.py: ... ... params.override(...) //This line is running fine and giving desired output …
Knowledge Seeker
  • 526
  • 7
  • 25
0
votes
1 answer

R - Using patsy.dmatrices() with reticulate

I have a problem of namespace when trying to use function patsy.dmatrices() with the reticulate R package. Here is a simple reproducible example: patsy <- import("patsy") # Data dataset <- data.frame(Y=rnorm(1000,2.5,1)) # Null model formula_null <-…
0
votes
0 answers

Accessing python libraries and functions using reticulate package in R

I am working on python libraries and their functions in R environment using reticulate package. I am accessing these libraries using the following criteria library('reticulate') pvlib <- import('pvlib') models say from pvlib library can be…
Jaws
  • 65
  • 2
  • 8
0
votes
0 answers

Error when implementing a custom layer in keras for R

I am trying to implement a custom layer for the package keras in R (github). The layer I am implementing is based on this AttentionWithContext layer available here: gist Here is my code: AttentionWithContext <- R6::R6Class("AttentionWithContext", …
Antoine N.
  • 151
  • 8
0
votes
1 answer

Arcpy map algebra from reticulate

I'm trying to use arcpy from R via reticulate. For the most part, it works really well. However, I'm running into some issues when trying to do raster algebra. Consider the following…
mikeck
  • 3,534
  • 1
  • 26
  • 39
1 2 3
32
33