Message-ID: <Pine.SOC.4.64.1301081622570.16357@solcom.hrz.uni-giessen.de>
Date: 2013-01-08T15:24:13Z
From: Gerrit Eichner
Subject: Logical operator and lists
In-Reply-To: <CALvVS-HFLtqpFKmTtGYTuNOf-C_SB9RoN1BHBeB+Ti+S6k2Y1A@mail.gmail.com>
Hello, Dominic,
untested:
data <- lapply( data, function( x) x[ x == ""] <- NA
Hth -- Gerrit
On Tue, 8 Jan 2013, Dominic Roye wrote:
> Hello R-Helpers,
>
> I have a slight problem with the expresion data[data==""] <- NA which works
> well for a data.frame. But now i must use the same for a list of
> data.frames.
>
> My idea is data[[]][data==""] but it don?t work.
>
> Thanks!!
>
> Dominic