[R] Do not want to print when using prop.test
Peter Dalgaard
P.Dalgaard at biostat.ku.dk
Tue Jan 20 14:24:25 CET 2009
Jose Iparraguirre D'Elia wrote:
> I am using the function prop.test (base package), which returns a
> list with class "htest". All I want to do is to assign one of its
> values to a variable, but I do not want R to print the results and added warning
message whenever I invoke the function.
> How can I prevent R from printing on using prop.test?
> Regards,
> José Luis
By assigning one of its values...
> pval <- prop.test(heads, 100)$p.value
> pval
[1] 0.4839273
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list