Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in downloading summarytools package #67

Open
rrodirodi opened this issue Apr 12, 2019 · 22 comments
Open

error in downloading summarytools package #67

rrodirodi opened this issue Apr 12, 2019 · 22 comments

Comments

@rrodirodi
Copy link

Hi, I am trying to download the summarytools package in R using the install.packages command, and I get the output below. I would appreciate your help in getting this package installed.

There is a binary version available but the source version is later:
binary source needs_compilation
summarytools 0.9.2 0.9.3 FALSE

installing the source package ‘summarytools’

trying URL 'https://cran.rstudio.com/src/contrib/summarytools_0.9.3.tar.gz'
Content type 'application/x-gzip' length 566250 bytes (552 KB)

downloaded 552 KB

  • installing source package ‘summarytools’ ...
    ** package ‘summarytools’ successfully unpacked and MD5 sums checked
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** byte-compile and prepare package for lazy loading
    Error : .onLoad failed in loadNamespace() for 'tcltk', details:
    call: fun(libname, pkgname)
    error: X11 library is missing: install XQuartz from xquartz.macosforge.org
    ERROR: lazy loading failed for package ‘summarytools’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/summarytools’

The downloaded source packages are in
‘/private/var/folders/v5/f1sp8lnd7_d3hvtl6f222hcw0000gn/T/RtmpVUyALx/downloaded_packages’

@dcomtois
Copy link
Owner

dcomtois commented Apr 13, 2019

Hi,

Have you tried installing XQuartz? Also, could you paste the results from capabilities() pls? Hopefully we quickly find what's going on, since you're not the only one reporting the issue with the latest release.

Thanks

@scisus
Copy link

scisus commented Apr 16, 2019

Perhaps related - I successfully installed summarytools (from github). But when I try to load it, it warns me that

library(summarytools)
system has no X11 capabilities, therefore only ascii graphs will be produced by dfSummary()

And so I don't get any little graphs, just percentages when using view(dfSummary(foo))

Results from capabilities() are

> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua    http/ftp 
       TRUE        TRUE        TRUE        TRUE        TRUE       FALSE        TRUE 
    sockets      libxml        fifo      cledit       iconv         NLS     profmem 
       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE        TRUE 
      cairo         ICU long.double     libcurl 
       TRUE       FALSE        TRUE        TRUE 

@dcomtois
Copy link
Owner

@scisus This is a separate issue. The issue raised by @rrodirodi was resolved after the installation of XQuartz.

Not sure what is happening in your case. The condition for displaying that startup message is as follows:

if (Sys.info()[["sysname"]] != "Windows" && !isTRUE(capabilities("X11"))) {
    packageStartupMessage("system has no X11 capabilities, therefore only ",
                          "ascii graphs will be produced by dfSummary()")
  }

Clearly X11 is not the issue... So what does Sys.info()[["sysname"]] show in your case?

Thanks

@dcomtois
Copy link
Owner

@scisus If you can find a few moments, I'd like to go to the bottom of this... I'm thinking of making some changes for next CRAN release, but I'm lacking information at this point. Thx :)

@scisus
Copy link

scisus commented Apr 20, 2019

Here you go -

> Sys.info()[["sysname"]]
[1] "Linux"

Let me know if there's anything else you'd like me to try!

@dcomtois
Copy link
Owner

dcomtois commented Apr 21, 2019

Thanks for the info. I'm working on something which should get rid of the problem. Meanwhile, you can use this patched version which skips the problematic check:

devtools::intall_github("dcomtois/summarytools", ref = "no-x11-check")

EDIT

Rather than ref = "no-x11-check", using ref = "dev-current" is now recommended; it should take care of this issue. See the NEWS file for more details.

Thx

@benjaminwnelson
Copy link

I'm also having issues with the download. When I try to load the package I get this error

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Warning message:
In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1

@dcomtois
Copy link
Owner

@benjaminwnelson Could you give a try to the solution posted here regarding this issue? Thx.

@benjaminwnelson
Copy link

benjaminwnelson commented Apr 26, 2019

@dcomtois, thanks for the reply. I tried the solution that you posted before my first message, but the issue wasn't fixed. It looks like if I load the package, rather than using summaryTools:: it works just fine.

@dcomtois
Copy link
Owner

dcomtois commented Sep 7, 2019

@scisus Is this still an issue or were you able to install the package successfully?

@elizabeth-upton
Copy link

elizabeth-upton commented Sep 11, 2019

I am also having issues downloading this package. I tried:
library(summarytools) and receive the message:

Error: package or namespace load failed for ‘summarytools’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: X11 library is missing: install XQuartz from xquartz.macosforge.org

I tried downloading XQuartz but it is not available for my version of R (3.6.1: Action of the Toes)

On an older version of R I was able to use summarytools without a problem. Suggestions?

Also, I tried
devtools::install_github("dcomtois/summarytools", ref = "no-x11-check")
with no luck

@dcomtois
Copy link
Owner

@elizabeth-upton Hi, I'm not sure I'm following re: XQuartz not available for your version of R... Were you able to install "https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg"?

A (temporary, hopefully) solution would be to install an older version of summarytools, like so:

devtools::install_github('dcomtois/summarytools', ref='0-8-9')

@caislin
Copy link

caislin commented Nov 9, 2019

Hi I am having a similiar issue with installing summary tools. I initially installed summary tools and received the error message "X11 library is missing: install XQuartz from xquartz.macosforge.org"

After installing XQuartz-2.7.11 I installed summarytools and received the error: "system has no X11 capabilities, therefore only ascii graphs will be produced by dfSummary()
Warning message:
In fun(libname, pkgname) : couldn't connect to display ":0""

When I ran the suggestion above: devtools::install_github("dcomtois/summarytools", ref = "no-x11-check") if received this error: Downloading GitHub repo dcomtois/summarytools@no-x11-check
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/dcomtois/summarytools/tarball/no-x11-check'

When I installed an older version of summarytools from devtools::install_github('dcomtois/summarytools', ref='0-8-9')
The output is unformatted

Any suggestions? Thank you!

@dcomtois
Copy link
Owner

dcomtois commented Nov 9, 2019 via email

@unomics20
Copy link

unomics20 commented Jan 26, 2020

Hi I use MacOS Mojave. I am trying to use the summary tools package.

install.packages("summarytools")`
Installing package into/Users/I REMOVED MY PERSONAL INFO HRE/library’
(aslibis unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/summarytools_0.9.4.tgz'
Content type 'application/x-gzip' length 874679 bytes (854 KB)
==================================================
downloaded 854 KB

When I call the library it runs for hours without stopping unless forced to stop.

I have downloaded XQuartz -2.7.1 (though when I click on the app it doesn't open or fo anything.

@dcomtois
Copy link
Owner

dcomtois commented Jan 27, 2020

@unomics20
The XQuartz installation might be the cause for this, so I would try reinstalling it after a system reboot. If it still fails, I'd try to get help by posting the issue on a forum, maybe StackOverflow or SuperUser.

After that is settled, I recommend doing the following:

install.packages("remotes")
remotes::install_github("dcomtois/summarytools")

Hope this helps!

@unomics20
Copy link

HI @dcomtois,

Thank you so much for your help. The issue was that I was using an older version of Rstudio. I uninstalled and reinstalled a newer verison and the code works fine.

Although, it initially worked with what you listed above it stopped working randomly.

Quick question though, regarding the dfsummary

print(dfSummary(data ,graph.magnif = .75), method = 'render')

The resulting summary stat does not include graphs, do you know why this maybe?
Is there a work around?
Is there a data sz limit to the graphs being included in the summary table.

Thanks so much for writing this package! It is the most comprehensive for mixed data types (quantitative and qualitative data)

@dcomtois
Copy link
Owner

@unomics20 Is this happening with the GitHub version? There is an issue with the 0.9.4 version (the one that is still on CRAN and gets installed with install.packages()), having to do with data frames called "data". Then simply renaming your data frame should do the trick.

If however you installed st using remotes' or devtools' install_github(), could you post a reproducible example (including a sample of your data frame)? Maybe something specific to your data is happening here...

Thx

@chrispenshumba
Copy link

ERROR (probably on Mac),

error: X11 library is missing: install XQuartz from xquartz.macosforge.org

SOLUTION:

  • Navigate to xquartz.macosforge.org
  • Download the XQuartz-2.7.11.dmg
  • Install it
  • Log out and log back in
  • library(summarytools) should now work.

Hope it helps all the best.

@venturinbru
Copy link

Hello,

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
system might not have X11 capabilities; in case of errors when using dfSummary(), set st_options(use.x11 = FALSE)

Results from capabilities() are
X11 FALSE

My system Mac OS Catalina 10.15.6

how to solve this?

@dcomtois
Copy link
Owner

dcomtois commented Sep 15, 2020 via email

@rockycore
Copy link

System: macOS Catalina 10.15.7, RStudio 1.3.1093, XQuartz 2.7.11
My steps to get it work:
(1) Install XQuartz
(2) re-install summarytools: install.packages("summarytools")
(3) re-import library(summarytools)

Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants