0

I've just swapped out read.csv for vroom and since then my full_join is not working. It throws following error

Error in [.data.table(y, x, nomatch = if (all.x) NA else NULL, on = by, : logical error. i is not a data.table, but 'on' argument is provided.

I've seen some other answers relating to this but can't see how it applies to my code..

DataA <- vroom("data/DataA.csv")
DataB <- vroom("data/DataB.csv")
AllData <- full_join(DataA, DataB, by = 'ID')

I've tried removing the join 'by' but makes no difference. What has changed between the way vroom takes in the data and the way readr does? Data is all dataframes. Should this be changed to work with vroom?

Data: DataA: chr(24), dbl(5) lgl(6) DataB: chr(6), dbl(5) ID is character on intake, but converted to numeric before join They are not datatables, but dataframes.

Any guidance appreciated

Magnetar
  • 85
  • 8
  • You maximise your chance of getting a useful answer if you provide a minimal reproducible example. [This post](https://stackoverflow.com/help/minimal-reproducible-example) may help. What are the classes of `DataA` and `DataB`? What do they contain? If they are both `data.tables`s, is the type of `ID` the same in both? – Limey Sep 29 '22 at 10:22

1 Answers1

0

data needs to be converted to data.table from Vroom pkg using setDT before full_join will work.

Magnetar
  • 85
  • 8