Я не думаю, что это будет возможно, для общего отображения во всем R. ?options
говорит о цифрах следующее:
‘digits’: controls the number of digits to print when printing
numeric values. It is a suggestion only. Valid values are
1...22 with default 7. See the note in ‘print.default’ about
values greater than 15.
Ключевая фраза "Это только предложение".
Далее обратите внимание, что то, что печатается, сначала управляется примененным методом print()
(это скрыто во время интерактивного использования, потому что R auto-print()
s). Подробнее об основных методах см. ?print
и ?print.default
. От ?print.default
отмечаем
digits: a non-null value for ‘digits’ specifies the minimum number of
significant digits to be printed in values. The default,
‘NULL’, uses ‘getOption(digits)’. (For the interpretation
for complex numbers see ‘signif’.) Non-integer values will
be rounded down, and only values greater than or equal to 1
and no greater than 22 are accepted.
а в разделе Подробности у нас есть:
The same number of decimal places is used throughout a vector.
This means that ‘digits’ specifies the minimum number of
significant digits to be used, and that at least one entry will be
encoded with that minimum number. However, if all the encoded
elements then have trailing zeroes, the number of decimal places
is reduced until at least one element has a non-zero final digit.
Decimal points are only included if at least one decimal place is
selected.
По умолчанию для digits
используется NULL
, что указывает на то, что используется getOption("digits")
, но, как мы уже отмечали, это только руководство.
Кажется, нет способа настроить R так, чтобы он делал то, что вы хотите, и делать это глобально. Вам нужно будет переписать print.default()
или все print()
методы, которые вам нужно было использовать, и сделать так, чтобы эти версии использовались вместо стандартных версий --- сейчас это непросто с ПРОСТРАНСТВАМИ ИМЕН.
person
Gavin Simpson
schedule
10.06.2012
lun
как0.000000
? - person Gavin Simpson   schedule 10.06.2012