Joining Character to Numeric columns

Hi, can you provide a reproducible example please ?
see About REPRoducible EXample (reprex)
A reprex makes it much easier for others to understand your issue and figure out how to help.

I don't get the same as you if I try to recreate: a is character and b is numeric

Table1 <- data.frame(
  a = c("1A" ,"1B","01" ,"02", "05" ,"10" ,"03"),
  stringsAsFactors = FALSE
)
Table2 <- data.frame(
  b = c(1, 6, 10, 11, 2, 50, 51, NA),
  stringsAsFactors = FALSE
)

unique(Table1$a)
#> [1] "1A" "1B" "01" "02" "05" "10" "03"
class(Table1$a)
#> [1] "character"
unique(Table2$b)
#> [1]  1  6 10 11  2 50 51 NA
class(Table2$b)
#> [1] "numeric"

Created on 2020-03-24 by the reprex package (v0.3.0.9001)

For joining, you'll need to do some transformation to get the same key (character maybe your common class here)

1 Like