[R-SIG-Mac] Error message reading files in R Commander

Fox, John j|ox @end|ng |rom mcm@@ter@c@
Mon Nov 25 16:42:25 CET 2019


Dear José,

> On Nov 25, 2019, at 10:17 AM, Jose G Conde Santiago <jose.conde1 using upr.edu> wrote:
> 
> 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.

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?

> 
> 2. Read the data set using R Commander’s “Data set” button. 

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.

> 
> 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 .
> 
>> Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
>>  [tcl] bad window path name ".3".
> 
> 
> 
> 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.
> 
>> Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
>>  [tcl] bad window path name ".6".
> 
> 
> 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.

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

> 
>> Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
>>  [tcl] bad window path name ".6".
> 
> 
> 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 using upr.edu
> 
>> On Nov 23, 2019, at 2:44 PM, Fox, John <jfox using mcmaster.ca> wrote:
>> 
>> 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.
>> 
>>> On Nov 22, 2019, at 9:43 PM, Jose G Conde Santiago <jose.conde1 using upr.edu> wrote:
>>> 
>>> Thanks for your prompt reply, John.
>>> 
>>> I clicked on the "Data set" button to read an R dataset. Then I clicked on the "View data set" button to view it, and closed the view window. I tried to read the same file again, and that is where I get the error message.
>> 
>> 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.
>> 
>>> I had the same issue when I tested with R Commander and R, without RStudio.
>> 
>> Yes, I saw that and I can't duplicate the problem in either context.
>> 
>> Best,
>> John
>> 
>>> 
>>> I will check again on Monday with the file you used.
>>> 
>>> Best,
>>> 
>>> José
>>> 
>>> On Fri, Nov 22, 2019, 6:04 PM Fox, John <jfox using mcmaster.ca> wrote:
>>> Dear Jose,
>>> 
>>> I'm afraid that I can't duplicate this problem. I tried with the current CRAN version of the Rcmdr under RStudio, reading a text file repeatedly into the same data set. My session info is 
>>> 
>>> --------- snip ---------
>>> 
>>>> sessionInfo()
>>> R version 3.6.1 (2019-07-05)
>>> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>>> Running under: macOS Catalina 10.15.1
>>> 
>>> Matrix products: default
>>> BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>>> LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
>>> 
>>> locale:
>>> [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>>> 
>>> attached base packages:
>>> [1] splines   stats     graphics  grDevices utils     datasets  methods  
>>> [8] base     
>>> 
>>> other attached packages:
>>> [1] Rcmdr_2.6-1     effects_4.1-4   RcmdrMisc_2.5-1 sandwich_2.5-1 
>>> [5] car_3.0-5       carData_3.0-3  
>>> 
>>> loaded via a namespace (and not attached):
>>> [1] Formula_1.2-3       assertthat_0.2.1    latticeExtra_0.6-28
>>> [4] cellranger_1.1.0    pillar_1.4.2        backports_1.1.5    
>>> [7] lattice_0.20-38     glue_1.3.1          digest_0.6.22      
>>> [10] RColorBrewer_1.1-2  checkmate_1.9.4     minqa_1.2.4        
>>> [13] colorspace_1.4-1    htmltools_0.4.0     Matrix_1.2-17      
>>> [16] survey_3.36         pkgconfig_2.0.3     haven_2.2.0        
>>> [19] purrr_0.3.3         scales_1.0.0        openxlsx_4.1.3     
>>> [22] rio_0.5.16          lme4_1.1-21         htmlTable_1.13.2   
>>> [25] tibble_2.1.3        relimp_1.0-5        ggplot2_3.2.1      
>>> [28] nnet_7.3-12         lazyeval_0.2.2      survival_3.1-7    
>>> [31] magrittr_1.5        crayon_1.3.4        readxl_1.3.1       
>>> [34] nlme_3.1-142        MASS_7.3-51.4       forcats_0.4.0      
>>> [37] foreign_0.8-72      class_7.3-15        tools_3.6.1        
>>> [40] data.table_1.12.6   hms_0.5.2           mitools_2.4        
>>> [43] tcltk2_1.2-11       stringr_1.4.0       munsell_0.5.0      
>>> [46] cluster_2.1.0       zip_2.0.4           compiler_3.6.1     
>>> [49] e1071_1.7-2         rlang_0.4.1         grid_3.6.1         
>>> [52] nloptr_1.2.1        rstudioapi_0.10     htmlwidgets_1.5.1  
>>> [55] tcltk_3.6.1         base64enc_0.1-3     boot_1.3-23        
>>> [58] gtable_0.3.0        abind_1.4-5         DBI_1.0.0          
>>> [61] curl_4.2            R6_2.4.0            gridExtra_2.3      
>>> [64] zoo_1.8-6           knitr_1.25          dplyr_0.8.3        
>>> [67] zeallot_0.1.0       nortest_1.0-4       Hmisc_4.3-0        
>>> [70] stringi_1.4.3       Rcpp_1.0.3          vctrs_0.2.0        
>>> [73] rpart_4.1-15        acepack_1.4.1       tidyselect_0.2.5  
>>> [76] xfun_0.10 
>>> 
>>> --------- snip ---------
>>> 
>>> The output that the Rcmdr generates each time in the RStudio console is
>>> 
>>> Rcmdr>  Duncan <- 
>>> Rcmdr+    read.table("/Users/johnfox/Documents/Courses/2017-2018/ICPSR/Lectures/Duncan.txt",
>>> Rcmdr+     header=TRUE, sep="", na.strings="NA", dec=".", strip.white=TRUE)
>>> RcmdrMsg: [3] NOTE: The dataset Duncan has 45 rows and 4 columns.
>>> 
>>> Of course, there's a warning each time that Duncan will be overwritten, and the dataset in the viewer is automatically refreshed. That is, AFAICS everything works as it should.
>>> 
>>> You can find the data file I used at <https://socialsciences.mcmaster.ca/jfox/Books/RCommander/Duncan.txt>.
>>> 
>>> Can you elaborate what you did and ideally create a reproducible example of the problem?
>>> 
>>> Best,
>>> John
>>> 
>>> -----------------------------
>>> John Fox, Professor Emeritus
>>> McMaster University
>>> Hamilton, Ontario, Canada
>>> Web: http::/socserv.mcmaster.ca/jfox
>>> 
>>>> On Nov 22, 2019, at 2:23 PM, Jose G Conde Santiago via R-SIG-Mac <r-sig-mac using r-project.org> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I am using R Commander in combination with RStudio. I configured RStudio to display the output on the RStudio console.
>>>> 
>>>> If I open a file in R Commander, then view the data file in R Commander and then try to read the same file again using R Commander, the following error message is displayed in the console and I cannot read the file with R Commander:
>>>> 
>>>>> Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
>>>>> [tcl] bad window path name “.29”.
>>>> 
>>>> The message is always the same, except that the number at the end changes. Here are a few more examples:
>>>> 
>>>>> Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
>>>>> [tcl] bad window path name ".35".
>>>> 
>>>>> Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
>>>>> [tcl] bad window path name ".51".
>>>> 
>>>>> Error in structure(.External(.C_dotTcl, ...), class = "tclObj") : 
>>>>> [tcl] bad window path name ".56".
>>>> 
>>>> 
>>>> Initially, I thought there could be a problem between R Commander and RStudio, but I got the same error message under the same conditions when I tested using R Commander with R alone (without RStudio).
>>>> 
>>>> The files seem to be fine, since I can access them directly with R or with RStudio.
>>>> 
>>>> My computer is  an iMac (27-inch, late 2012)
>>>> MacOS High Sierra version 10.13.6.  
>>>> R version 3.6.1
>>>> RStudio version 1.2.5001
>>>> R Commander version 2.6-0
>>>> XQuartz 2.7.11
>>>> 
>>>> Thanks.
>>>> 
>>>> José
>>>> 
>>>> José G. Conde, MD, MPH
>>>> Professor, School of Medicine
>>>> Medical Sciences Campus
>>>> University of Puerto Rico 
>>>> 
>>>> Tel  (787) 763-9401 Fax (787) 758-5206
>>>> 
>>>> Email: jose.conde1 using upr.edu
>>>> 
>>>> _______________________________________________
>>>> R-SIG-Mac mailing list
>>>> R-SIG-Mac using r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
>> 
> 



More information about the R-SIG-Mac mailing list