Re: [R] Test for Random Points on a Sphere

2012-10-07 Thread
Hi Lorenzo, Just a quick thought, the uniform probability density on a unit sphere is 1 / (4pi), what about binning those random points according to their directions and do a chi-square test? Regards, Guo On Sun, Oct 7, 2012 at 2:16 AM, wrote: > "Lorenzo Isella" writes: > > > Dear All, > > I

Re: [R] vector is not assigned correctly in for loop

2012-10-07 Thread
Thank you all for helping me out. As Michael points out, I abused the rounding and formatting of print() while debugging. The default number of digits to print is 7 according to ?print.default, which makes floating point numbers to be somewhat plausible for index vector subsetting at first glance:

[R] vector is not assigned correctly in for loop

2012-10-06 Thread
Hi there, Here is a minimum working example: lower = 0 upper = 1 n_bins = 50 interval = (upper - lower) / n_bins bins = vector(mode="numeric", length=n_bins) breaks = seq(from=lower + interval, to=upper, by=interval) for(idx in brea