Category : rpy2

In a jupyter notebook %load_ext rpy2.ipython causes the kernel to crash. "The kernel appears to have died. It will restart automatically." with the following console message Error in `::`(base, quote) : could not find function "::" Error in `::`(base, quote) : could not find function "::" Error in `:::`(compiler, checkCompilerOptions) : could not find function ..

Read more

everyone. I tried to install rpy2 in Centos6.10, with Python 3.6.4 and R version 3.5.2. I used the comand ‘pip3 install rpy2’. I got the following errors: cwd: /tmp/pip-install-7bxzxlni/rpy2_0e939a480cc0488d918a202af1b64127/ Complete output (153 lines): [‘cffi>=1.10.0’, ‘jinja2’, ‘pytz’, ‘tzlocal’] running install running build cffi mode: CFFI_MODE.ANY running build_py file _rinterface_cffi_abi.py (for module _rinterface_cffi_abi) not found creating build ..

Read more

I am trying to access R from python using rpy2, both of them present on the same environment in conda. When I try to print something from R using rpy2, it gives a strange error. This is a MWE. import os os.environ[‘R_HOME’] = ‘/home/userxxx/anaconda3/envs/env_name/lib/R/’ import rpy2 import rpy2.robjects as robjects from rpy2.robjects.packages import importr import ..

Read more

I have tried searching for a library that gives me the significance letters or groups but was not able to find any in python, but in R’s agricolae library the code HSD.test() gives me the output I want. So, I was wondering if that code could be used in python using the rpy2 package. Rcode: ..

Read more

I am trying to run below code where I want to read csv file and then write "sas7bdat". I have tried below code. we already have prerequisite library installed on the system for R. from rpy2 import robjects robjects.r(”’ library(haven) data <- read_csv("filename.csv") write_sas(data, "filename.sas7bdat") ”’) After running above code, there are no output get ..

Read more

I want to run a simple t-test in Python with rpy2: _arg1= [4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14,4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69,4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14,4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69] _arg3=[‘y’,’y’,’y’,’y’,’y’,’y’,’y’,’y’,’y’,’y’,’n’,’n’,’n’,’n’,’n’,’n’,’n’,’n’,’n’,’n’,’y’,’y’,’y’,’y’,’y’,’y’,’y’,’y’,’y’,’y’,’n’,’n’,’n’,’n’,’n’,’n’,’n’,’n’,’n’,’n’] target = base.as_numeric(_arg1) group = base.as_character(_arg3) df = base.data_frame(target = target, group=group) stats.t_test(‘target~group’, data = df) I am getting the following error: RRuntimeError: Error in t.test.default("target~group", data = list(target = c(4.17, 5.58, : not enough ‘x’ observations If I change the ..

Read more

This is partially related to an already closed question about keras package and R in google colab. But I have some specific doubts in such a workflow… 1 .It is known we have how to use R in google colab. And the use of the google colab’s GPU and TPU are indeed interesting. And although ..

Read more