trim in package gdata will trim spaces off the beginning and end.
On 7/8/05, Ling Jin <[EMAIL PROTECTED]> 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