I want to manipulate lists as described below:
Imagine these two lists:
> list1
$WR7
[1] 1 2 3 4
$YH5YH6
[1] 3 4 5 6 7
$YH4
[1] 4 5
$UC4UC8
[1] 4 5 6 7 8 9
> list2
V1 V2
1 WR7 Averrhoa
2 ? Sarcotheca
3 YH5YH6 caesia
4 YH4 arbuscula
5 UC4UC8 rosea
6 ? acetosella
How can I exchange the names(list1) by the entries in the second
column of list2,
if (a) length(list1) ≠ length(list2) and (b) the elements of both
lists are not in the same order? Is there a easy way to do this?
Thank you!
________________________________________________________
Christoph Heibl
PhD student
'Phylogenetics and phylogeography of endemic Atacama Desert flora'
Systematic Botany
Ludwig-Maximilians-Universität München
Menzinger Str. 67
D-80638 München
GERMANY
phone: +49-(0)89-17861-251
e-mail: [EMAIL PROTECTED]
______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.