Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

R coding , packages ?

Hi

I would like to start in R language. is there way to access the function x = rbinom (1000,1, .5) or dbinom(46:54, 100, 0.5) I suppose I must include a package ?

"%r"
a = r([10.4,5.6,3.1,6.4,21.7]); a
sum(a)
x = rbinom(1000,1,.5)
total = sum(x)

NameError Traceback (most recent call last) <ipython-input-7-529997c59866> in <module>() 2 a = r([RealNumber('10.4'),RealNumber('5.6'),RealNumber('3.1'),RealNumber('6.4'),RealNumber('21.7')]); a 3 sum(a) ----> 4 x = rbinom(Integer(1000),Integer(1),RealNumber('.5')) 5 total = sum(x) NameError: name 'rbinom' is not defined**