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

Can't complete Cron Job when python code is embed (through reticulate) inside the R script

I've created an R script that first launches a python script through the py_run_file() function and then executes some R code. I need to schedule the launch of such script at a certain hour of the day, and hence I used the package cronR.…
nd091680
  • 585
  • 4
  • 15
1
vote
3 answers

How do I create a new column by matching a variable with another variable and have it repeat until the first variable changes in R?

receptor year month day hour hour.inc lat lon height pressure date 1 2018 1 3 19 0 31.768 -106.501 500.0 835.6 2018-01-03 19:00:00 1 2018 1 3 18 -1 31.628 -106.350 508.8 840.5 2018-01-03…
bob0901
  • 65
  • 5
1
vote
0 answers

How to export sf object to GDB using RPyGeo in R (Windows)?

I have a bunch of sf objects I'd like to export to GDB from R. I'm running R 4.0.2 on Windows 10. In this case the sf objects are all vector point data. The main reasons to export to GDB are to keep longer field names (the shapefile truncation is…
D Williams
  • 11
  • 2
1
vote
1 answer

Code not indenting properly. Is there a solution?

It seems that the python code in R reticulate is not indenting automatically. E.g. when I write if x < 0: print("negative") else: print("positive") the third line should move automatically at the same level of if but, it actually does not…
passcot
  • 179
  • 5
1
vote
0 answers

Can't run Pandas in R via reticulate: lxml not found

I'm trying to scrape a wiki table in Python from within RStudio (in Rmarkdown) via reticulate. I can't manage to do it with R (tried rvest but the columns end up being misaligned and I can't figure out exactly why) which is why I'm using Python: I…
MonkeyBack
  • 61
  • 6
1
vote
0 answers

Convert Python Object from Interactive Brokers to an R Data Frame

I'm using a combination of Python and R to do stock market analysis, using Interactive Brokers for data retrieval. Interactive Brokers supports a Python API, but not an R API, so I'm using Python calls to interact with Interactive Brokers and then…
S Novogoratz
  • 388
  • 2
  • 14
1
vote
0 answers

Using custom made python package in R reticulate

I've been looking around for an answer on this for a while but I haven't found any answers. I'm more familiar with R than with python, and I would prefer to use the python package of my company in RStudio rather than Jupyter Notebook. That's why I…
PhilBo
  • 35
  • 5
1
vote
0 answers

No module named 'rpytools' when using reticulate via source

I have an R script that calls a Python script through the reticulate package. When I run this manually from R Studio, the script works perfectly. However, when I schedule through ScheduleR to run automatically at set times, I receive an error…
DrSchuess
  • 11
  • 2
1
vote
1 answer

R Shiny reticulate package and Python

I am studying R Shiny package called Reticulate. I was following a Youtube, but I got an error. R Shiny Codes library(shiny) library(reticulate) source_python("practice2_simulator.py") ui <- fluidPage( titlePanel("Using SHiny with Python"), …
1
vote
2 answers

Reticulate python not recognizing local python : Error: Python shared library not found, Python bindings not loaded

I have downloaded the python tar and extracted locally in linux ubuntu /app folder, When I configure this python using the R reticulate I get the error message " Error: Python shared library not found, Python bindings not loaded. Use…
Pawan Rama Mali
  • 526
  • 2
  • 9
1
vote
0 answers

How to run a python script as a future/promise (reticulate) in r shiny?

When I call a python script from a "future" I receive the following error: Listening on http://127.0.0.1:5147 Unhandled promise error: Failed to retrieve the value of MultisessionFuture () from cluster RichSOCKnode #1 (PID 23834 on localhost…
1
vote
2 answers

Reticulate can't access R variables in Python when knitting unless running in RStudio

I have an RMarkdown document with the following content: ```{r setup, include=FALSE} library(reticulate) ``` ```{r} #These lines don't seem to make a difference, but I have seen them suggested…
Jordan Bentley
  • 1,309
  • 1
  • 8
  • 28
1
vote
1 answer

Interactively running Python script in R Studio - how to install a package?

I installed reticulate package. I created Python script in R-Studio import os import pandas as pd Running first line bring Python console >>> and runs fine. The second line generates ModuleNotFoundError: No module named 'pandas'.So I am guessing I…
user1700890
  • 7,144
  • 18
  • 87
  • 183
1
vote
1 answer

Problems with reticulate in R studio and importing python modules

I'm trying to run reticulate and import python modules within r studio (specifically R-markdown). The R code chunk seems to do what is expected (i.e. install the python modules) and not seem to produce any errors, but the python code chunk does not…
thehand0
  • 1,123
  • 4
  • 14
1
vote
0 answers

Installing and Using Python Packages using Reticulate

First I install miniconda... reticulate::install_miniconda() Then Check to see if Pandas and bcpandas are installed... > py_module_available("pandas") [1] FALSE > py_module_available("bcpandas") [1] FALSE ok so next step is to install…