Jose Iparraguirre D'Elia
2009-Jan-20 10:52 UTC
[R] Do not want to print when using prop.test
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 Mr Jos? Luis Iparraguirre Senior Research Economist Economic Research Institute of Northern Ireland 2 -14 East Bridge Street Belfast BT1 3NQ Northern Ireland United Kingdom Tel: +44 (0)28 9072 7365
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 warningmessage whenever I invoke the function.> How can I prevent R from printing on using prop.test? > Regards, > Jos? LuisBy 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