From timothy.c.bates at gmail.com  Mon Aug 15 19:08:02 2011
From: timothy.c.bates at gmail.com (Timothy Bates)
Date: Mon, 15 Aug 2011 18:08:02 +0100
Subject: [Rd] "\examples" section for "base/man/replace.Rd"
Message-ID: <CC3B0B07-CE35-431D-8C9E-364D793155B9@gmail.com>

There is no usage example for replace(). Here is a patch to replace.Rd that offers one.


# Clean up a vector of text answers
foo <- c("Yes?, "n?, "no answer")
foo <- replace(foo, list=c(2, 3), values=c("No?, NA))
foo 
# "Yes" "No?  NA


diff attached
best wishes,
tim




[Rd] "\examples" section for "base/man/replace.Rd"
Timothy Bates