2

I'm trying to use rbern function in R, but it says the following message

rbern (10, 0.1)
Error: Could not find the "rbern"

I even tried to load the library (Rlab) and will not let me, I'm doing wrong?. I remember a few days use the same function smoothly. Please I need help with this.

library(Rlab)
Error en library(Rlab) : there is no package called ‘Rlab’
fran.sand66
  • 10,084
  • 19
  • 55
  • 100

2 Answers2

6

install.packages('Rlab') will help

aatrujillob
  • 4,630
  • 3
  • 17
  • 32
  • 2
    And it appears that `rbern` is just calling the base function `rbinom` anyway, so....yeah. – joran Jan 26 '12 at 05:03
  • You're right, I finally found it more convenient to use rbin with size 1, which is a Bernoulli-type experiment – fran.sand66 Jan 28 '12 at 16:12
0

An rbern is also available in the extraDistr package.