Re: [R] merge

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sat 09 Jul 2005 - 10:10:33 EST

trim in package gdata will trim spaces off the beginning and end.

On 7/8/05, Ling Jin <ljin@lbl.gov> wrote:
> Hi all,
>
> I have two data frames to merge by a column containing the site names
> (as characters). However, somehow, one of the site names of one data
> frame have fixed length, say 8, so the names sometimes have spaces at
> the end. For example, the site name is "ST", but in one data frame, it
> is "ST ". Therefore, the merge function won't recognize that "ST"
> and "ST " are the same, so won't merge accordingly.
>
> Is there a easy way to deal with it? Or I should do something during
> data import? (BTW, I imported the data using read.csv)
>
>
> Thanks!
>
> Ling
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 09 10:15:14 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:26 EST