[R] Mapping file-Legend- from 2 Files/Tables

Edwin Sendjaja edwin7 at gmx.net
Sat Apr 12 20:40:03 CEST 2008


Does anyone know how to solve this. I am so desperate. 

I'd be terribly grateful for any help.


Am Samstag, 12. April 2008 05:19:16 schrieb Edwin Sendjaja:
> Hello,
>
> I have got 2  Tables from different files:
>
> Table 1 (lets say file: Salesman.data)
> ------------
>
>       | ID  | User_ID
>
> ---------------------------
> 1    | 1   |   4
> 2    | 2   |   6
> 3    | 3   |   7
> 4    | 4   |   2
> 5    | 5   |   3
>
>
> ############################
> Table2 (file: Employee.data)
> ----------
>
>       | User_ID  | Name
>
> ----------------------------------
> 1    |       1      |   Donna
> 2    |       2      |   John
> 3    |       3      |   Michael
> 4    |       4      |   Wolf
> 5    |       5      |   Tim
> 6    |       6      |   Edward
> 7    |       7      |   Shaun
>
>
>
> What i want do is:
>
>
> I want to map the table 2 into table 1.
> instead of User_ID I want to use the name of the person which is related to
> the User_ID.
>
>
>
> The legend should look like this
>
>  _________________
>
>  |        LEGEND       |
>  |-----------------------------|
>  |   -2-         John       |
>  |   -3-         Michael  |
>  |   -4-         Wolf       |
>  |   -6-        Edward    |
>  |   -7-       Shaun      |
>
>   ------------------------------
>
>
> Does anyone know how I can create such a mapping legend?
> Is there any good command to do this?
>
> I've tried using "replace" but this is not a good solution. because it
> replaces only 1 values.
>
>
> Kind Regards,
>
> Edwin Sendjaja
>
> ______________________________________________
> 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.



More information about the R-help mailing list