[Rd] rpois gives a large number repeatedly (PR#439)

Kjetil Kjernsmo kjetil.kjernsmo@astro.uio.no
Tue, 15 Feb 2000 13:01:26 +0100 (MET)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-759262972-950616086=:2636
Content-Type: TEXT/PLAIN; charset=US-ASCII

On 15 Feb 2000, Peter Dalgaard BSA wrote:

>kjetikj@astro.uio.no writes:
>
>> Full_Name: Kjetil Kjernsmo
>> Version: 0.65.1
>           !!!!!!

Yep, it's old.... When v1.0.0 comes, I guess I'll get the UNIX people to
install it.

>I can't seem to generate anything unusual with the latest R snapshot.

It is really strange, this. I can do 
> max(rpois(20000000,3))
[1] 16

>Perhaps it would help if you told us what parameters to call
>photonsincidenttodetectorbin with?

Whoops, sorry, I use 
x <- cbind(-50:50)
apply(x, 1, photonsincidenttodetectorbin, 100000, 3)

Anyway, coming back from lunch, I was unable to reproduce it with this
call, after trying about 50 times... This call made the problem show up
almost every time half an hour ago. I bet there is someone sitting inside
the computer having a good time right now... :-) However, I was able to
reproduce it once in about 10 trails by calling 
plot(lensedprofile(100000,3,1), type='l')
which is a function defined by the rest of my code, that I have attached. 

Best,

Kjetil
-- 
Kjetil Kjernsmo
Graduate astronomy-student                    Problems worthy of attack
University of Oslo, Norway            Prove their worth by hitting back
E-mail: kjetikj@astro.uio.no                                - Piet Hein
Homepage <URL:http://www.astro.uio.no/~kjetikj/>
Webmaster@skepsis.no 

--0-759262972-950616086=:2636
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="first.R"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.OSF.4.05.10002151301260.2636@rukbat.uio.no>
Content-Description: Full code
Content-Disposition: attachment; filename="first.R"

bmNsb3Vkc2JpbiA8LSBmdW5jdGlvbihiaW5ubywgbnRvdGFsY2xvdWRzLCBu
dW1iZXJvZmJpbnMgPSAxMDAsIGxpbmV3aWR0aCA9IG51bWJlcm9mY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aXRpdml0eSAqIHBob3RvbnNpbmNpZGVudHRvZGV0
ZWN0b3JiaW4oYmlubm8sIG50b3RhbGNsb3VkcywgYXZncGhvdG9uZnJvbWNs
b3VkLCBhbXBtb2RlLCBhbXBtZWFuLCBudW1iZXJvZmJpbnMsIGxpbmV3aWR0
aCkNCiAgIHByaW50KHBkYikNCiAgICAjIFBhdGNoZXMgYnVnIGluIFIgdmVy
c2lvbiA8IDEuMC4wDQogICAgcmV0dXJuKGlmZWxzZShwZGIgPD0gMCwgMCwg
cnBvaXMoMSwgcGRiKSkpDQoNCiAgfQ0KbGVuc2VkcHJvZmlsZSA8LSBmdW5j
dGlvbihudG90YWxjbG91ZHMsIGF2Z3Bob3RvbmZyb21jbG91ZCwgc2Vuc2l0
aXZpdHksIGFtcG1vZGUgPSAxLCBhbXBtZWFuID0gMiwgbnVtYmVyb2ZiaW5z
ID0gMTAwLCBsaW5ld2lkdGggPSBudW1iZXJvZmJpbnMgLyA2KQ0KICByZXR1
cm4oYXBwbHkoY2JpbmQoLWFzLmludGVnZXIobnVtYmVyb2ZiaW5zLzIpOmFz
LmludGVnZXIobnVtYmVyb2ZiaW5zLzIpKSwgMSwgcGhvdG9uc2RldGVjdGVk
YmluLCBudG90YWxjbG91ZHMsIGF2Z3Bob3RvbmZyb21jbG91ZCwgc2Vuc2l0
aXZpdHksIGFtcG1vZGUsIGFtcG1lYW4sIG51bWJlcm9mYmlucywgbGluZXdp
ZHRoKSkNCg==
--0-759262972-950616086=:2636--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._