[R] Problem with rbinom
Alexander Geisler
alexande at sbox.tugraz.at
Tue Oct 3 00:01:27 CEST 2006
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 at sbox.tugraz.at | ageisler at htu.tugraz.at
phone: +43 650 / 811 61 90
More information about the R-help
mailing list