[R] Document Paths in R.app
Hello, I've been writing a package that allows a script to know its path, and I've been struggling to get it working for 'R.app' on macOS. For 'Rgui' on Windows, I used 'utils::getWindowsHandles' to get the script's path [image: image.png] but it's only on Windows, and even if it wasn't, it seems like 'R.app' only stores the basename in the window handle, so this won't work. For 'RStudio', they provide a function from the environment 'tools:rstudio' that retrieves the script's path, and it seems like there's an equivalent environment 'tools:RGUI' (you can find the source code at this URL: https://github.com/R-macos/Mac-GUI/blob/5f6557eb9e921319586ac974db22cc1f74ba76ff/GUI-tools.R) for 'R.app', but it claims to be for internal use only, and doesn't seem to have a function for retrieving a document's path. So my question, does anyone know of a way to retrieve the path of the currently open document in 'R.app'? Thank you! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Finding the package providing funtion "%du%"
> On 30 Jun 2021, at 13:59, Eric Berger wrote: > > > ??'%du%' > > shows it is in the igraph package (disjoint union) damn, you are correct, I failed to load igraph itself before running the demo, hence why the demo did not find the function… At least I can feel stupid in public on the r-help list! F > > > > On Wed, Jun 30, 2021 at 1:03 PM Federico Calboli > wrote: > Hello All, > > I am playing with igraph (which seems to work for what I have used it). > Nevetheless: > > demo('community', package="igraph") > > > > demo(community) > ~ > > Type to start : > > > pause <- function() {} > > > ### A modular graph has dense subgraphs > > mod <- make_full_graph(10) %du% make_full_graph(10) %du% make_full_graph(10) > Error in make_full_graph(10) %du% make_full_graph(10) %du% > make_full_graph(10) : > could not find function "%du%” > > > For the life of mine I cannot find where %du5 is meant to come from. Any > clues? also, any suggestion 9other than Google) to *efficiently* find > whatever dependencies I might be missing? I did install igraph with > dependencies = T… but one never knows. > > My: > > sessionInfo() > R version 4.1.0 (2021-05-18) > Platform: x86_64-apple-darwin17.0 (64-bit) > Running under: macOS Mojave 10.14.6 > > Matrix products: default > BLAS: > /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib > LAPACK: > /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib > > locale: > [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] dplyr_1.0.7magrittr_2.0.1 > > loaded via a namespace (and not attached): > [1] fansi_0.5.0 utf8_1.2.1 crayon_1.4.1 R6_2.5.0 > lifecycle_1.0.0 pillar_1.6.1 rlang_0.4.11 vctrs_0.3.8 > generics_0.1.0 > [10] ellipsis_0.3.2 tools_4.1.0 glue_1.4.2 purrr_0.3.4 > compiler_4.1.0 pkgconfig_2.0.3 tidyselect_1.1.1 tibble_3.1.2 > > > > > > > > -- > Federico Calboli > LBEG - Laboratory of Biodiversity and Evolutionary Genomics > Charles Deberiotstraat 32 box 2439 > 3000 Leuven > +32 16 32 87 67 > > > > > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Federico Calboli LBEG - Laboratory of Biodiversity and Evolutionary Genomics Charles Deberiotstraat 32 box 2439 3000 Leuven +32 16 32 87 67 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Finding the package providing funtion "%du%"
On Wed, 30 Jun 2021, Federico Calboli writes: > Hello All, > > I am playing with igraph (which seems to work for what I have used it). > Nevetheless: > > demo('community', package="igraph") > > > > demo(community) > ~ > > Type to start : > >> pause <- function() {} > >> ### A modular graph has dense subgraphs >> mod <- make_full_graph(10) %du% make_full_graph(10) %du% make_full_graph(10) > Error in make_full_graph(10) %du% make_full_graph(10) %du% > make_full_graph(10) : > could not find function "%du%” > > > For the life of mine I cannot find where %du5 is meant > to come from. Any clues? also, any suggestion 9other > than Google) to *efficiently* find whatever > dependencies I might be missing? I did install igraph > with dependencies = T… but one never knows. > > My: >> sessionInfo() > R version 4.1.0 (2021-05-18) > Platform: x86_64-apple-darwin17.0 (64-bit) > Running under: macOS Mojave 10.14.6 > > Matrix products: default > BLAS: > /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib > LAPACK: > /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib > > locale: > [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] dplyr_1.0.7magrittr_2.0.1 > > loaded via a namespace (and not attached): > [1] fansi_0.5.0 utf8_1.2.1 crayon_1.4.1 R6_2.5.0 > lifecycle_1.0.0 pillar_1.6.1 rlang_0.4.11 vctrs_0.3.8 > generics_0.1.0 > [10] ellipsis_0.3.2 tools_4.1.0 glue_1.4.2 purrr_0.3.4 > compiler_4.1.0 pkgconfig_2.0.3 tidyselect_1.1.1 tibble_3.1.2 > > > > > > > > -- > Federico Calboli > LBEG - Laboratory of Biodiversity and Evolutionary Genomics > Charles Deberiotstraat 32 box 2439 > 3000 Leuven > +32 16 32 87 67 > You need to quote the name: ?`%du%` igraph::`%du%` You may need to say library("igraph") before you run the demo. -- Enrico Schumann Lucerne, Switzerland http://enricoschumann.net __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Finding the package providing funtion "%du%"
> ??'%du%' shows it is in the igraph package (disjoint union) On Wed, Jun 30, 2021 at 1:03 PM Federico Calboli < federico.calb...@kuleuven.be> wrote: > Hello All, > > I am playing with igraph (which seems to work for what I have used it). > Nevetheless: > > demo('community', package="igraph") > > > > demo(community) > ~ > > Type to start : > > > pause <- function() {} > > > ### A modular graph has dense subgraphs > > mod <- make_full_graph(10) %du% make_full_graph(10) %du% > make_full_graph(10) > Error in make_full_graph(10) %du% make_full_graph(10) %du% > make_full_graph(10) : > could not find function "%du%” > > > For the life of mine I cannot find where %du5 is meant to come from. Any > clues? also, any suggestion 9other than Google) to *efficiently* find > whatever dependencies I might be missing? I did install igraph with > dependencies = T… but one never knows. > > My: > > sessionInfo() > R version 4.1.0 (2021-05-18) > Platform: x86_64-apple-darwin17.0 (64-bit) > Running under: macOS Mojave 10.14.6 > > Matrix products: default > BLAS: > /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib > LAPACK: > /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib > > locale: > [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] dplyr_1.0.7magrittr_2.0.1 > > loaded via a namespace (and not attached): > [1] fansi_0.5.0 utf8_1.2.1 crayon_1.4.1 R6_2.5.0 > lifecycle_1.0.0 pillar_1.6.1 rlang_0.4.11 vctrs_0.3.8 > generics_0.1.0 > [10] ellipsis_0.3.2 tools_4.1.0 glue_1.4.2 purrr_0.3.4 > compiler_4.1.0 pkgconfig_2.0.3 tidyselect_1.1.1 tibble_3.1.2 > > > > > > > > -- > Federico Calboli > LBEG - Laboratory of Biodiversity and Evolutionary Genomics > Charles Deberiotstraat 32 box 2439 > 3000 Leuven > +32 16 32 87 67 > > > > > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Finding the package providing funtion "%du%"
Hello All, I am playing with igraph (which seems to work for what I have used it). Nevetheless: demo('community', package="igraph") demo(community) ~ Type to start : > pause <- function() {} > ### A modular graph has dense subgraphs > mod <- make_full_graph(10) %du% make_full_graph(10) %du% make_full_graph(10) Error in make_full_graph(10) %du% make_full_graph(10) %du% make_full_graph(10) : could not find function "%du%” For the life of mine I cannot find where %du5 is meant to come from. Any clues? also, any suggestion 9other than Google) to *efficiently* find whatever dependencies I might be missing? I did install igraph with dependencies = T… but one never knows. My: > sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.6 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] dplyr_1.0.7magrittr_2.0.1 loaded via a namespace (and not attached): [1] fansi_0.5.0 utf8_1.2.1 crayon_1.4.1 R6_2.5.0 lifecycle_1.0.0 pillar_1.6.1 rlang_0.4.11 vctrs_0.3.8 generics_0.1.0 [10] ellipsis_0.3.2 tools_4.1.0 glue_1.4.2 purrr_0.3.4 compiler_4.1.0 pkgconfig_2.0.3 tidyselect_1.1.1 tibble_3.1.2 -- Federico Calboli LBEG - Laboratory of Biodiversity and Evolutionary Genomics Charles Deberiotstraat 32 box 2439 3000 Leuven +32 16 32 87 67 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.