[R] Problem with rbinom

From: Alexander Geisler <alexande_at_sbox.tugraz.at>
Date: Mon 02 Oct 2006 - 22:01:27 GMT


Hello!

I have the following problem: I calculate a variable called pd in Excel, save it as pd.txt, so that it looks like the following:

pd

0.070568471
0.011275136
0.006892258
0.028592432
0.028489582
0.01881913
0.035426606
0.011517305

There were 4857 cases in pd.txt.

After that I start R and load the data through the following command: daten <- read.table("pd.txt", header=T)

Then I want to execute the function rbinom:

rbinom(4857,1,daten)

I get the following error message:
Fehler in rbinom(n, size, prob) : ungültige Argumente (error in rbinom(n, size, prob) : bad arguments

The problem is daten, because if I excecute rbinom(4857,1,0.5), then it works.

So, I have no idea, what the problem could be.

Alex

-- 
Alexander Geisler * Moserhofgasse 36/1 * A-8010 Graz
StV Technische Mathematik | FakV TMTP
email: alexande@sbox.tugraz.at | ageisler@htu.tugraz.at
phone: +43 650 / 811 61 90

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue Oct 03 08:06:24 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 02 Oct 2006 - 22:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.