View source: R/dbgroups_AVES.R
symerge | R Documentation |
Synonyms merge
symerge(ttax, tdata, sy, clean = TRUE)
ttax |
table containing the taxonomy we wish to keep. |
tdata |
table containing the data to add to ttax. |
sy |
the synonyms table. A table with two columns (scinam, syid), see examples. |
clean |
default to TRUE; remove scinam_tdata, .pk and renames scinam_ttax to scinam |
ttax = data.table(scinam = c('a', 'b', 'c', 'd', 'm', 'n'), V1 = rnorm(6)) tdata = data.table(scinam = c('a', 'b', 'j', 'k', 'n', 'm'), V2 = rnorm(6)) sy = data.table(scinam = c('a', 'b', 'c', 'j', 'd', 'k', 'm', 'n'), syid = c(1,2,3,3,4,4,5,5)) symerge(ttax, tdata, sy) ############ require(sdb) tdata = dbq(user ='mihai', q = 'select * from AVES_lifeHistory.sociality') ttax = dbq(user ='mihai', q = 'select scinam, prop_epp_young from AVES_lifeHistory.promiscuity_v2') sy = dbq(user = 'mihai', q= 'select scinam, syid from AVES_taxonomy.synonyms_v2') x = symerge(ttax, tdata, sy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.