Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.LNX.2.00.1208081947120.28482@salmo.appl-ecosys.com>
Date: 2012-08-09T02:48:11Z
From: Rich Shepard
Subject: reshape2's dcast() Adds NAs to Data Frame
In-Reply-To: <666256d2-c586-49d1-b98d-277bf152bd55@email.android.com>

On Wed, 8 Aug 2012, Jeff Newmiller wrote:

> The explanation is that this is normal and consistent with behavior of
> factors in general. If you don't want that, it is common to work with
> character data instead of factors, only converting to factor when needed.
> In most cases I invoke read.table with the as.is=TRUE argument and delay
> converting to factors until I need them. Other people convert from factor
> to character and back to factor to get rid of unwanted factor levels on an
> as-needed basis.

Jeff,

   First thing tomorrow I will research the difference between characters and
data; I assumed they were the same.

Thanks,

Rich