Skip to content

Error message reading files in R Commander

7 messages · John Fox, Jose G Conde Santiago

#
Dear Jos?,

Please keep the discussion on the r-sig-mac list rather than replying only to me, so that other potentially interested individuals can follow it. I'm therefore cc'ing this response to the list.
That's different from what I understood. When you use the "Data set" button in the Rcmdr toolbar you can choose among data sets that have *already* been read into the workspace, assuming that there are more than one.

I still can't duplicate the problem that you report. I can repeatedly select a data set using the button, and each time it becomes the active data set and the data viewer window is refreshed.
Yes, I saw that and I can't duplicate the problem in either context.

Best,
 John
1 day later
#
Dear John,

To keep the session as simple as possible, this time I did not configure R Commander to send the output to the R console.

This is what I did.

1.  Load the file/workspace using R Commander.

2. Read the data set using R Commander?s ?Data set? button.

3. View the data set using R Commander?s ?View data set button?.

4. Close the ?View data set? window. 

5. Try to read the same data set using R Commander?s ?Data set? button.

This is the error message I got today. It was displayed in the R Console, not in the R Commander output window .
Additional information:

I tried to ?Refresh the active data set? from the ?Data?  ->  ?Active Data set? menu, and got the same error message, but with a different number at the end.
I saved the file with a different name, but when I tried to read the file with the new name I got a similar error message.
Thanks for your time.

Jos?


Jos? G. Conde, MD, MPH
Catedr?tico
Escuela de Medicina
Recinto de Ciencias M?dicas
Universidad de Puerto Rico

Tel  (787) 763-9401  Fax (787) 758-5206

Correo electr?nico: jose.conde1 at upr.edu
#
Dear Jos?,
What does this mean? What is a "file/workspace"? How did you "load" it with the R Commander? Can you share the "file/workspace" so that I can replicate what you did?
As I said in my earlier response, the R Commander's "Data set" button doesn't "read" a data set -- it chooses from among data frames currently in the user's R workspace.
Do you really mean a *file* -- that is stored on your computer's file system -- or a data frame in the R workspace? 

In either case, if you can share the file or data frame, creating a reproducible example, I'd be much more likely to be able to figure out what's happening.

Best,
 John
#
Dear John.

My apologies, and thanks for your patience. This is what I did today:

1. I read the data set using the R Commander menu ?Data?  -> ?Load dataset?.  When I am working with an R workspace, I load the workspace with the ?Data?  ->  ?Load dataset? menu, and then read the specific data set in the work space with the ?Data set? button.

2. Viewed the data set using R Commander?s ?View data set button?.

3. Closed the ?View data set? window. 

4. Try to read the same data set using R Commander?s ?Data set? button.

Then I get the error message.

After I found the problem with my files, I tested with a few data sets from the packages in R available thorough the ?Data?  ->  ?Data in packages? menu and had the same results. The files are: CO2, airquality  and ChickWeight included in the ?datasets? package, and ethanol from the ?lattice? package.

Jos?

Jos? G. Conde, MD, MPH
Catedr?tico
Escuela de Medicina
Recinto de Ciencias M?dicas
Universidad de Puerto Rico

Tel  (787) 763-9401  Fax (787) 758-5206

Correo electr?nico: jose.conde1 at upr.edu
#
Dear Jos?,

As a general matter and an ideal, users should *never* see errors in the Rcmdr code -- the Rcmdr should ideally intercept all errors.

I'm now able to reproduce the error you reported. I believe that I've fixed it in the development version 2.7-0 of the Rcmdr package on R-Forge. I should test the fix some more, but if it holds up, I'll also apply it to Rcmdr 2.6-2 when and if that's submitted to CRAN.

If you want to try Rcmdr 2.7-0, you can download the source tree for the package from R-Forge via svn and build and install it yourself.

Also see some comments below:
Once again, the "Data set" button doesn't read a data set, it just makes a data frame in your R workspace the active data set in the Rcmdr. It also closes and reopens the data set viewer for the data set if such a window is open. The source of the error was that the Rcmdr didn't detect that you had closed the viewer window for the data set.
Please see my preceding remark.
These aren't files but data frames residing in memory. 

I apologize if these distinctions seem pedantic, but the failure to make them made it hard for me to understand your original report of the problem.

Thank you for the bug report.

John
#
Dear Jos?,

As a general matter and an ideal, users should *never* see errors in the Rcmdr code -- the Rcmdr should ideally intercept all errors.

I'm now able to reproduce the error you reported. I believe that I've fixed it in the development version 2.7-0 of the Rcmdr package on R-Forge. I should test the fix some more, but if it holds up, I'll also apply it to Rcmdr 2.6-2 when and if that's submitted to CRAN.

If you want to try Rcmdr 2.7-0, you can download the source tree for the package from R-Forge via svn and build and install it yourself.

Also see some comments below:
Once again, the "Data set" button doesn't read a data set, it just makes a data frame in your R workspace the active data set in the Rcmdr. It also closes and reopens the data set viewer for the data set if such a window is open. The source of the error was that the Rcmdr didn't detect that you had closed the viewer window for the data set.
Please see my preceding remark.
These aren't files but data frames residing in memory. 

I apologize if these distinctions seem pedantic, but the failure to make them made it hard for me to understand your original report of the problem.

Thank you for the bug report.

John
#
Thanks a lot, John.

Jos?
On Mon, Nov 25, 2019, 9:21 PM Fox, John <jfox at mcmaster.ca> wrote: