[R] Keeping scientific format on assignment

From: Joe Byers <joe-byers_at_utulsa.edu>
Date: Thu 11 May 2006 - 07:40:14 EST


I am new to R and can't seem to find and answer for this after search CRAN.

I am calculating Box-Ljung stats over the lags 1-25 to build a table from the acf and pacf statistics. I want to retrieve the p-value from the box.test data frame and assign it in a vector. The problem is with the assignment that truncates the p-value to 0. For example, the box.test object has a p-value of 2e-14 when I do a<-box.test.object$p-value;
a;

the value of a is 0 not 2e-14.

How do I keep the precision and format of the p-value. I have tried as.numeric(...), changing options (digits and sciprec), and can't seem to figure it out.

Thank you
Joe



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 Received on Thu May 11 08:13:17 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 11 May 2006 - 18:10:03 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.