On Fri, 2005-08-26 at 18:15 +1000, Stephen Choularton wrote:
> Hi
>  
>  I am trying to do this:

I get no syntax error on R 2.1.1-patched. I do get an error though:

Error in chisq.test(c(11, 13, 12, 18, 21, 43, 15, 12, 9, 10, 5, 28,
22,  :
        probabilities must sum to 1.

Which leads us to question the values you provided as argument p (which
I assigned to a vector P first)

sum(P)
[1] 0.999783

So you need to make sure your probabilities add sum to one.

HTH

Ps. It would have been helpful if you'd posted the syntax error you
received and your version of R - type version at the R prompt.

Gav

<snip> 
> but I keep on getting syntax error.  Is this to long, or somehow badly
> formed?
> 
> ______________________________________________
> 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
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
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

Reply via email to