Message-ID: <da79af330803111158j2e047c06l6cd57f48667cd224@mail.gmail.com>
Date: 2008-03-11T18:58:05Z
From: Henrique Dallazuanna
Subject: Replacing text
In-Reply-To: <09EBE0E1A7DEA24CAD5EA6827A7EB16D0C66DCA1@usidcxmb02.us.cbre.net>
If the column is factor:
levels(DATA$x)[levels(DATA$x) == "Toyota2"] <- "Scion"
or character:
DATA$x[DATA$x == "Toyota2"] <- "Scion"
On 11/03/2008, Suran, Luciana @ Torto Wheaton Research
<Luciana.Suran at tortowheatonresearch.com> wrote:
> Sorry, another newbie question :-(
>
>
>
>
>
> I loaded a data set with 10 rows and 30 columns. The first column is
> characters for names of car manufacturers:
>
>
>
> Jeep
>
> Nissan
>
> Toyota1
>
> Toyota2
>
> Etc.
>
>
>
> How can I replace "Toyota2" with "Scion"?
>
>
>
> Thanks again
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Henrique Dallazuanna
Curitiba-Paran?-Brasil
25? 25' 40" S 49? 16' 22" O