rpy2 - 'R' object has no attribute 'nls'
问题 I am using rpy2 to do some non-linear regression in r from python. import rpy2.robjects as robjects from rpy2.robjects import DataFrame, Formula from rpy2.robjects import r import rpy2.robjects.numpy2ri as npr import numpy as np from rpy2.robjects.packages import importr r.nls(rates * 1-(1/(10^(a * count ^ (b-1)))), weights=count, start=list(a=a, b=b)) I have the following errors: LookupError: 'nls' not found AttributeError: 'R' object has no attribute 'nls' It is also calling '~' as invalid