Skip to content

why is it numeric(0)?

1 message · Thomas Lumley

#
On Wed, 1 Jun 2005, luan_sheng wrote:

            
numeric(0) is a zero-length vector of floating point numbers, so your 
first example takes no floating point numbers and adds 5 to each one. The 
result is still no floating point numbers.

numeric(1) is a vector containing a single 0, so the second example takes 
0 and adds 5, to give a vector containing a single 5.


 	-thomas