# left_join.: Join two data.tables together In tidytable: Tidy Interface to 'data.table'

 left_join. R Documentation

## Join two data.tables together

### Description

Join two data.tables together

### Usage

``````left_join.(x, y, by = NULL, suffix = c(".x", ".y"), ..., keep = FALSE)
``````

### Arguments

 `x` A data.frame or data.table `y` A data.frame or data.table `by` A character vector of variables to join by. If NULL, the default, the join will do a natural join, using all variables with common names across the two tables. `suffix` Append created for duplicated column names when using `full_join()` `...` Other parameters passed on to methods `keep` Should the join keys from both `x` and `y` be preserved in the output?

### Examples

``````df1 <- data.table(x = c("a", "a", "b", "c"), y = 1:4)
df2 <- data.table(x = c("a", "b"), z = 5:6)

df1 %>% left_join(df2)
df1 %>% inner_join(df2)
df1 %>% right_join(df2)
df1 %>% full_join(df2)
df1 %>% anti_join(df2)
``````

tidytable documentation built on Oct. 5, 2023, 5:07 p.m.
{"ft_lang_label":"__label__en","ft_lang_prob":0.65665543,"math_prob":0.9373255,"size":845,"snap":"2023-40-2023-50","text_gpt3_token_len":249,"char_repetition_ratio":0.15457788,"word_repetition_ratio":0.027777778,"special_character_ratio":0.33964497,"punctuation_ratio":0.21787709,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9956285,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-11-30T08:30:32Z\",\"WARC-Record-ID\":\"<urn:uuid:74a4bd19-a100-444c-8538-ce4d6fb8bb3c>\",\"Content-Length\":\"31005\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:764f0386-ff6a-4854-8426-1b7385e7a010>\",\"WARC-Concurrent-To\":\"<urn:uuid:41a3d554-348c-4047-9b96-d94a4d72e96b>\",\"WARC-IP-Address\":\"51.81.83.12\",\"WARC-Target-URI\":\"https://rdrr.io/cran/tidytable/man/left_join..html\",\"WARC-Payload-Digest\":\"sha1:SEZFP6DWFT7ZUVS3NS33KEC6RNY7CRXK\",\"WARC-Block-Digest\":\"sha1:4GQQNH736EYRU4JH7XDWNNJL44C5J6RM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100172.28_warc_CC-MAIN-20231130062948-20231130092948-00423.warc.gz\"}"}