On 11/10/05 6:33 AM, "Luis Ridao Cruz" <[EMAIL PROTECTED]> wrote:

> R-help,
> 
> I have two data frames with a commom column (but with different size)
> What I want is to get a column (say df1$mycolumn ) according to the
> matches of common columns in both data frames.
> 
> I have tried this but it is not working:
> 
> transform(fb, breidd = ifelse (match (as.character(df1$puntar),
> as.character(df2$puntar) )
> , df2$breidd, "no" ) ) )
> 
> transform(fb, breidd = ifelse(as.character(df1$puntar) %in%
> as.character(df2$puntar)
> , df2$breidd, "no" ) ) )


Try looking at ?merge or ?union to see if either will do what you like.

Sean

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to