[R] strange thing with sd

Rau, Roland Rau at demogr.mpg.de
Mon Mar 29 16:06:02 CEST 2004


Hello,

> -----Original Message-----
> From:	Andreas Pauling [SMTP:pauling at giub.unibe.ch]
> Sent:	Monday, March 29, 2004 4:02 PM
> To:	r-help at stat.math.ethz.ch
> Subject:	[R] strange thing with sd
> 
> 
> Shouldn't it give always zero?
> 
	I was running your example code, and I always had the result zero
(see below).

	Best,
	Roland 

	> sd(rep(0.01,      15))  #0
	[1] 0
	> sd(rep(0.001,     15))  #4.489023e-19
	[1] 0
	> sd(rep(0.00001,   15))  #0
	[1] 0
	> sd(rep(0.00000001,15))  #1.712427e-24
	[1] 0
	> 
	> sd(rep(0.01,      13))  #1.805557e-18
	[1] 0
	> sd(rep(0.001,     13))  #4.513894e-19
	[1] 0
	> sd(rep(0.00001,   13))  #0
	[1] 0
	> sd(rep(0.00000001,13))  #0
	[1] 0
	> 
	> sd(rep(5.01,  15))  #0
	[1] 0
	> sd(rep(5.001,  15))  #4.489023e-19
	[1] 0
	> sd(rep(5.00001,   15))  #1.838704e-15
	[1] 0
	> sd(rep(5.00000001,15))  #9.19352e-16
	[1] 0
	> 
	> sd(rep(5.01,  13))  #9.244454e-16
	[1] 0
	> sd(rep(5.001,  13))  #9.244454e-16
	[1] 0
	> sd(rep(5.00001,   13))  #1.848891e-15
	[1] 0
	> sd(rep(5.00000001,13))  #0
	[1] 0
	> version
	         _              
	platform i386-pc-mingw32
	arch     i386           
	os       mingw32        
	system   i386, mingw32  
	status                  
	major    1              
	minor    8.1            
	year     2003           
	month    11             
	day      21             
	language R              
	> 


+++++
This mail has been sent through the MPI for Demographic Rese...{{dropped}}




More information about the R-help mailing list