2014-09-20 37 views
16

Çizgim, e-notasyonu biçiminde y ekseninde değerler gösteriyor. Sayısal formdaki değerleri almak için hangi komutu kullanmalıyım? Kullanılan dosyadaki değerler sayısal formda mı? TeşekkürR'de bilimsel gösterim nasıl önlenir?

+4

"e notasyonu" nedir? Bilimsel gösterim? 'Options (scipen = 999) 'ile tekrar açabilir ve' '' (scipen = 0) ' –

+0

ile tekrar tekrar açabilirsiniz. –

cevap

25

tüm Ar oturumda bilimsel gösterimle kullanımını ayarlamak için, scipen seçeneğini kullanabilirsiniz. dokümantasyon (?options) Gönderen:

‘scipen’: integer. A penalty to be applied when deciding to print 
      numeric values in fixed or exponential notation. Positive 
      values bias towards fixed and negative towards scientific 
      notation: fixed notation will be preferred unless it is more 
      than ‘scipen’ digits wider. 

Yani özünde bu değer o bilimsel gösterim tetikleneceği olma olasılığını belirler. Bu nedenle, bilimsel gösterimi engellemek için, 999:

options(scipen=999) 
+0

cevabını kullandığınız için teşekkür ederiz, ancak bu liste, liste dışı gibi bir şey yaparken birçok traling sıfırı ekler. – brucezepplin

22

deneyin 'Biçim' fonksiyonu:

> xx = 100000000000 
> xx 
[1] 1e+11 
> format(xx, scientific=F) 
[1] "100000000000" 
İlgili konular