Error in Compiling a Report

Hi there. I'm absolutely new to using RStudio.

Whenever I'm trying to compile a report from an RScript, I'm getting this error message:

Quitting from lines 3-25 (Ch6ZScoresFile.spin.Rmd) Error in read.table(file = file, header = header, sep = sep, quote = quote, :
duplicate 'row.names' are not allowed
Calls: ... eval_with_user_handlers -> eval -> eval -> read.csv -> read.table
Execution halted

Not sure what the issue is. I'd appreciate any help.

Dear mkthompson

would you please share your data .. or please look at the row names in the data which you have ..
the row names should be unique , you should not have a duplicate row name .

duplicate 'row.names' are not allowed

Kind Regards

Hi there,

I can’t share the data bc of copyright issues (it’s a data set from a statistics lab course).

I’ve looked at all of my data, and as far as I can see, I don’t have any duplicate row names in either the RScript or imported dataset. I’m assuming it’s mistaking some part for row names.

I’ve tried using the row.names = NULL command but that didn’t do anything.

My professor and I have both tried many fixes and I still can’t get the RScript to compile.

Can you at least show the code that is producing that error message? or even better, put together a proper REPRoducible EXample (reprex) illustrating your issue? it is not necessary to use your actual data, you can provide some made-up analogous that reproduces the problem.

Also, just to clarify terminology, R is an interpreted programming language, so, there is no compiling of R code, maybe you mean you are "sourcing" an R script or "knitting" an .Rmd document?

I will try to create a reprex. Sorry, like I said, I’m brand new to R (and coding in general).

Also, my issue is not when I’m running a code. I’m literally clicking the File>Compile Report button.

I see. That sounds weird to me but it is the equivalent of "knitting" an .R script. The important thing is that now we clearly understand what you are doing
.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.