From hadley at rice.edu  Wed May  5 17:57:03 2010
From: hadley at rice.edu (Hadley Wickham)
Date: Wed, 5 May 2010 10:57:03 -0500
Subject: [Rd] Generate NA of specified type
Message-ID: <h2gf8e6ff051005050857tfe7d7566m797b3abbad5f429c@mail.gmail.com>

Hi all,

Is there an existing function that provides the correct type of
missing value for a given vector? e.g.

NAof(1:3) # NA_integer_
NAof(pi) # NA_real_
NAof("a") # NA_character_
NAof(T) # NA

?

Thanks,

Hadley

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] Generate NA of specified type
Hadley Wickham