# Load the hoshino R package import hoshino_R as hr # Retrieve a variable named "my_data" from R and assign it to a Python variable my_python_var = hr.get("my_data") # Describe the structure and summary statistics of a variable named "my_data" in R hr.describe("my_data")
import rpy2.robjects.packages as rpackages from rpy2.robjects.vectors import StrVector # Define the package names packnames = ['hoshino_R'] # Import R's utility function for installing packages utils = rpackages.importr('utils') # Select a mirror to install the package from utils.chooseCRANmirror(ind=1) # Install hoshino R package utils.install_packages(StrVector(packnames))