[R] Keeping scientific format on assignment

Joe Byers joe-byers at utulsa.edu
Wed May 10 23:40:14 CEST 2006

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
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

More information about the R-help mailing list