Advanced R 4 Data Programming and the Cloud by Matt Wiley & Joshua F. Wiley

Advanced R 4 Data Programming and the Cloud by Matt Wiley & Joshua F. Wiley

Author:Matt Wiley & Joshua F. Wiley
Language: eng
Format: epub
ISBN: 9781484259733
Publisher: Apress


For all of these, the key is Species, and that is only one column. Furthermore, it is nonunique. It is also possible to have keys based on multiple columns. Recognize that key choice may make all the difference between a one-to-one and a many-to-many merge. Consider the following instructive example, in which only a single column is used as the key and the data is merged:d2key1 <- data.table(

ID1 = c(1, 1, 2, 2),

ID2 = c(1, 2, 1, 2),

X = letters[1:4])

d2key2 <- data.table(

ID1 = c(1, 1, 2, 2),

ID2 = c(1, 2, 1, 2),

Y = LETTERS[1:4])



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.