AndriSignorell / DescTools

Tools for Descriptive Statistics and Exploratory Data Analysis
http://andrisignorell.github.io/DescTools/
86 stars 18 forks source link

Problem with XLView() #137

Closed armelbrizuela closed 7 months ago

armelbrizuela commented 7 months ago

When I run XLView(iris), I get the following error:

Loading required namespace: RDCOMClient Failed with error: ‘there is no package called ‘RDCOMClient’’ Error in owb$Open(fn) : attempt to apply non-function In addition: Warning message: In GetCOMAppHandle("Excel.Application", option = "lastXL", existing = FALSE, : RDCOMClient is not available. To install it use: install.packages('RDCOMClient', repos = 'http://www.stats.ox.ac.uk/pub/RWin/')

I tried to install RDCOMClient with install.packages('RDCOMClient', repos = 'http://www.stats.ox.ac.uk/pub/RWin/') , but the following error poped up:

Installing package into ‘C:/Users/armel/AppData/Local/R/win-library/4.3’ (as ‘lib’ is unspecified) Warning in install.packages : unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/4.3: cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/4.3/PACKAGES' Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘RDCOMClient’

I found another repository (https://github.com/omegahat/RDCOMClient). Here the maintainer says that in order to install RDCOMClient it is necessary to run devtools::install_github("omegahat/RDCOMClient"). So, before running that it is necessary to install RTools to compile RDCOMClient. Finally, I run XLView(iris) and another error says that could not find createCOMReference(). The next step was to run require(RDCOMClient) and again XLView(iris).

At the end I could open iris in Excel, but I think it would be nice if it were easier to install RDCOMClient.

GegznaV commented 7 months ago

I see here 2 different issues:

1) ✔️ Installation issue. The instructions are given in these 2 places:

2) ❗ Issue to use the function. Here it is quite strange, as it does not work out of the box and without @armelbrizuela's instructions I would not know how to make things work: image

@AndriSignorell, maybe syntax `package::function()` in an appropriate place would solve the issue?

3) ❗ Issue in how the data are shown in Excel. Not reported by @armelbrizuela, as, most probably, he uses different language settings. I see data like this (as if a text file is saved with parameters sep = ";", dec = "."):

![image](https://github.com/AndriSignorell/DescTools/assets/12725868/879857fe-afee-46ef-926c-822a7587f6c6)
armelbrizuela commented 7 months ago
  1. Yes, in my case installing RTools fixed the installation issue.
  2. I solved the issue about createCOMReference() if I run library(RDCOMClient) before calling XLView().
  3. The issue in how the data are shown in Excel can be fixed inside Excel. Go to Data - Text to columns - Delimited. The menu allows you to test different separators to parse the column appropriately.