Forum Discussion
R error - "We cannot convert the input due to duplicate column names:"
I am trying to imput several data.tables through R but I keep running into this error.
I have no idea what is causing it, since none of my data imported into the R script has a "Total" column, nor do any of the outputs. I removed them all, but the issue still persists.
Anyone have a solution?
5 Replies
- BeardyGeorge
Advocate I
Could you attach a screenshot? It might provide a little more context as to what's causing the problem.
Cheers,
George.
- quantfinRguyFrequent Visitor
The Error message
Output
There are 4 output tables. I could easily combine them with a 5th column with an identifier value. The error occurs before the script executes.
90% of the input data are used in other scripts that import on other scripts without error, so I know it isn't those.
The only other table does not have a "Total" column.
The script executes perfectly fine when sourced in in RStudio.
- v-sihou-msft
Microsoft Employee
As you said, you imported "several" data.tables, it's only supported to get one dataset each time from any query or script when retrieving data. So make sure your R script return only one result set.
Regards,
- quantfinRguyFrequent Visitor
I was able to import all 4 data tables in one data pull.
The script worked fine when copy and pasted into the pop-up window rather than running "source(...)"
This seems to be a bug.
- hectoragreRegular Visitor
Hi quantfinRguy
I am in the same situation ... Could you tell me what do you reffer with " worked fine into the pop-up window rather than running "source(...)""?
Normally to load data I used Get data > Other > R script
Thanks in advance!