software-review icon indicating copy to clipboard operation
software-review copied to clipboard

dendroNetwork

Open RonaldVisser opened this issue 1 year ago • 13 comments

Submitting Author Name: Ronald M. Visser Submitting Author Github Handle: @RonaldVisser Repository: https://github.com/RonaldVisser/dendroNetwork Version submitted: 0.5.0 Submission type: Standard Editor: TBD Reviewers: TBD

Archive: TBD Version accepted: TBD Language: en


  • Paste the full DESCRIPTION file inside a code block below:
Package: dendroNetwork
Type: Package
Title: Create networks of dendrochronological series using pairwise similarity
Version: 0.5.0
Authors@R: 
    c(person(given ="Ronald", 
            family = "Visser", 
            email = "[email protected]", 
            role = c("aut", "cre"),
            comment = c(ORCID = "0000-0001-6966-1729")),
    person(given = "Angelino", 
            family ="Salentino",
            role = "ctb",
            comment = c(ORCID = "0000-0002-4763-3943")),
   person(given = "Andy", 
            family ="Bunn",
            role = "ctb",
            comment = c(ORCID = "0000-0001-9027-2162")))
Maintainer: Ronald Visser <[email protected]>
Depends: R (>= 3.5.0)
Imports: 
    dplR (>= 1.7.2),
    igraph,
    stringr,
    reshape2,
    RCy3,
    dplyr,
    RColorBrewer,
    tidyr,
    foreach,
    magrittr,
    doParallel,
    lifecycle, 
    stats,
    grDevices
Description: This package makes it easy to create dendrochronological networks based on the similarity between tree-ring series or chronologies. It includes various functions to compare tree-ring curves building upon dplR. The networks can be used to visualise and understand the relations between tree-ring curves. These networks are also very useful to estimate the provenance or wood-use within a structure/context/site.
License: GPL (>= 3)
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.1
Suggests: 
    testthat (>= 3.0.0)
Config/testthat/edition: 3
Roxygen: list(markdown = TRUE)

Scope

  • Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):

    • [ ] data retrieval
    • [ ] data extraction
    • [ ] data munging
    • [ ] data deposition
    • [ ] data validation and testing
    • [x] workflow automation
    • [ ] version control
    • [ ] citation management and bibliometrics
    • [x] scientific software wrappers
    • [x] field and lab reproducibility tools
    • [ ] database software bindings
    • [ ] geospatial data
    • [ ] text analysis
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences): The software deals with the analysis of dendrochronological data and aims the help to study, understand and visualize patterns in the data using network analyses. The software combines R with Cytoscape.

  • Who is the target audience and what are scientific applications of this package? Dendrochronologist. The scientific application lies in the analyses and visualization of large datasets using networks. The method has been applied before to determine the provenance of wood from archaeological contexts, but can also be used to determine other patterns based on the similarity between tree-ring series or even other time series.

  • Are there other R packages that accomplish the same thing? If so, how does yours differ or meet our criteria for best-in-category?

  • No, none as far as I know.

  • (If applicable) Does your package comply with our guidance around Ethics, Data Privacy and Human Subjects Research? NA

  • If you made a pre-submission inquiry, please paste the link to the corresponding issue, forum post, or other discussion, or @tag the editor you contacted.

  • Explain reasons for any pkgcheck items which your package is unable to pass.

I tried to run pkgcheck, but it failed with the following feedback:

Error in vapply(tag_data, function(i) i$keyword, character(1L)) : values must be length 1, but FUN(X[[12]]) result is length 2

I have absolutely no idea why....

The same error occurs locally and using github action.

Technical checks

Confirm each of the following by checking the box.

This package:

Publication options

  • [x] Do you intend for this package to go on CRAN?

  • [ ] Do you intend for this package to go on Bioconductor?

  • [ ] Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:

MEE Options
  • [ ] The package is novel and will be of interest to the broad readership of the journal.
  • [ ] The manuscript describing the package is no longer than 3000 words.
  • [ ] You intend to archive the code for the package in a long-term repository which meets the requirements of the journal (see MEE's Policy on Publishing Code)
  • (Scope: Do consider MEE's Aims and Scope for your manuscript. We make no guarantee that your manuscript will be within MEE scope.)
  • (Although not required, we strongly recommend having a full manuscript prepared when you submit here.)
  • (Please do not submit your package separately to Methods in Ecology and Evolution)

Code of conduct

  • [x] I agree to abide by rOpenSci's Code of Conduct during the review process and in maintaining my package should it be accepted.

RonaldVisser avatar Feb 08 '24 18:02 RonaldVisser

Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type @ropensci-review-bot help for help.

ropensci-review-bot avatar Feb 08 '24 18:02 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Feb 08 '24 18:02 ropensci-review-bot

Note: The following R packages were unable to be installed/upgraded on our system: [RCy3]; some checks may be unreliable.

ropensci-review-bot avatar Feb 08 '24 18:02 ropensci-review-bot

I'm guessing the issue is that RCy3 is only on Bioconductor. The mentions I found in the rOpenSci guide:

https://devguide.ropensci.org/building.html?q=Biocond#pkgdependencies

And: "If you develop a package depending on or intended for Bioconductor, you might find biocthis relevant."

I'll poke around more and see if I can find other recent submissions that used Bioconductor packages.

ldecicco-USGS avatar Feb 08 '24 23:02 ldecicco-USGS

Sorry @ldecicco-USGS and @RonaldVisser, that was a bug with Bioc installs on our side. Checks should appear in a moment.

mpadge avatar Feb 09 '24 10:02 mpadge

Checks for dendroNetwork (v0.5.0)

git hash: 02a3fe68

  • :heavy_check_mark: Package name is available
  • :heavy_multiplication_x: does not have a 'codemeta.json' file.
  • :heavy_multiplication_x: does not have a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_multiplication_x: 'DESCRIPTION' does not have a URL field.
  • :heavy_multiplication_x: 'DESCRIPTION' does not have a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_check_mark: All functions have examples.
  • :heavy_multiplication_x: Continuous integration checks unavailable (no URL in 'DESCRIPTION').
  • :heavy_multiplication_x: Package coverage failed
  • :heavy_multiplication_x: R CMD check process failed with message: 'Build process failed'.
  • :eyes: Function names are duplicated in other packages

Important: All failing checks above must be addressed prior to proceeding

(Checks marked with :eyes: may be optionally addressed.)

Package License: GPL (>= 3)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 164
internal dendroNetwork 20
imports igraph 25
imports magrittr 20
imports reshape2 10
imports RCy3 9
imports dplyr 7
imports stats 6
imports grDevices 4
imports RColorBrewer 3
imports dplR 2
imports foreach 2
imports doParallel 1
imports stringr NA
imports tidyr NA
imports lifecycle NA
suggests knitr NA
suggests rmarkdown NA
suggests testthat NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

length (20), lapply (10), subset (10), unlist (10), max (9), for (8), min (8), as.vector (6), c (6), matrix (5), ncol (5), apply (4), as.numeric (4), rownames (4), by (3), cbind (3), colSums (3), dim (3), formatC (3), merge (3), nchar (3), nrow (3), paste0 (3), sqrt (3), system.file (3), unique (3), diff (2), is.na (2), mean (2), rep (2), seq (2), seq_along (2), abs (1), all.vars (1), as.data.frame (1), list (1), log (1), match.call (1), sum (1)

igraph

cliques (6), add_edges (4), make_empty_graph (4), V (3), E (2), graph.data.frame (2), clique_num (1), cluster_edge_betweenness (1), decompose (1), decompose.graph (1)

dendroNetwork

cor_mat_overlap (3), t_value (3), wuchswerte (3), clique_community_names_par (2), sim_table (2), clique_community_names (1), cyto_clean_styles (1), cyto_create_cpm_style (1), cyto_create_gn_style (1), cyto_create_graph (1), dendro_network (1), find_all_cpm_com (1)

magrittr

%>% (20)

reshape2

melt (10)

RCy3

createNetworkFromIgraph (4), importVisualStyles (3), layoutNetwork (1), loadTableData (1)

dplyr

mutate (5), row_number (2)

stats

D (3), weights (2), pnorm (1)

grDevices

colorRampPalette (2), colors (2)

RColorBrewer

brewer.pal (3)

dplR

as.rwl (2)

foreach

foreach (2)

doParallel

registerDoParallel (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 16 files) and
  • 1 authors
  • 1 vignette
  • 2 internal data files
  • 14 imported packages
  • 13 exported functions (median 29 lines of code)
  • 13 non-exported functions in R (median 28 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 16 74.9
files_vignettes 3 92.4
files_tests 3 75.2
loc_R 434 43.1
loc_vignettes 161 41.5
loc_tests 12 9.0
num_vignettes 1 64.8
data_size_total 112963 84.1
data_size_median 56481 88.8
n_fns_r 26 35.7
n_fns_r_exported 13 53.9
n_fns_r_not_exported 13 28.8
n_fns_per_file_r 1 0.2 TRUE
num_params_per_fn 3 33.6
loc_per_fn_r 28 74.9
loc_per_fn_r_exp 29 61.6
loc_per_fn_r_not_exp 28 76.0
rel_whitespace_R 5 19.2
rel_whitespace_vignettes 21 25.8
rel_whitespace_tests 17 5.2
doclines_per_fn_exp 31 34.8
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 7 27.1

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)


3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following error:

  1. Error in proc$get_built_file() : Build process failed

R CMD check generated the following check_fails:

  1. description_url
  2. description_bugreports

Test coverage with covr

ERROR: Test Coverage Failed

Cyclocomplexity with cyclocomp

Error : Build failed, unknown error, standard output: [33m* checking for file ‘dendroNetwork/DESCRIPTION’ ... OK

  • preparing ‘dendroNetwork’:
  • checking DESCRIPTION meta-information ... OK
  • installing the package to build vignettes
  • creating vignettes ... ERROR --- re-building ‘dendroNetwork_use.Rmd’ using rmarkdown

Quitting from lines 21-44 [flowchart_workflow] (dendroNetwork_use.Rmd) Error: processing vignette 'dendroNetwork_use.Rmd' failed with diagnostics: there is no package called 'DiagrammeR' --- failed re-building ‘dendroNetwork_use.Rmd’

SUMMARY: processing the following file failed: ‘dendroNetwork_use.Rmd’

Error: Vignette re-building failed. Execution halted [39m

Static code analyses with lintr

lintr found the following 89 potential issues:

message number of times
Avoid 1:length(...) expressions, use seq_len. 2
Avoid library() and require() calls in packages 2
Lines should not be more than 80 characters. 85

4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following function name is duplicated in other packages:

    • sim_table from BCEA

Package Versions

package version
pkgstats 0.1.3.11
pkgcheck 0.1.2.15

Editor-in-Chief Instructions:

Processing may not proceed until the items marked with :heavy_multiplication_x: have been resolved.

ropensci-review-bot avatar Feb 09 '24 10:02 ropensci-review-bot

Thanks for the submission @RonaldVisser ! Looks like a neat package.

Before we can proceed you'll need to get continuous integration set up. I'd start by trying: https://usethis.r-lib.org/reference/github_actions.html#use-github-action-check-standard-

That might work - I haven't used Bioconductor packages in awhile, so I'm not 100% sure. If that doesn't work, then you could try: https://rdrr.io/bioc/biocthis/man/use_bioc_github_action.html

The other "X" items above should be pretty straightforward to address, but let me know if you have any questions.

The error on the build is:

Quitting from lines 21-44 [flowchart_workflow] (dendroNetwork_use.Rmd)
Error: processing vignette 'dendroNetwork_use.Rmd' failed with diagnostics:
there is no package called 'DiagrammeR'
--- failed re-building ‘dendroNetwork_use.Rmd’

If DiagrammeR isn't used in any of the package functions, you'll want to add it to "Suggests" for that vignette to be generated.

ldecicco-USGS avatar Feb 09 '24 14:02 ldecicco-USGS

Thanks for the compliment! Thank you for the comments and help!

I have done some updating of various functions, added some tests and the continuous integration (github actions R-CMD / pkgcheck) seems to be working fine. According to pkgcheck it now checks all the boxes :)

Due to the various edits, I released a new release (0.5.1), with changes described in the NEWS-file.

RonaldVisser avatar Feb 10 '24 16:02 RonaldVisser

@ropensci-review-bot check package

ldecicco-USGS avatar Feb 12 '24 20:02 ldecicco-USGS

Thanks, about to send the query.

ropensci-review-bot avatar Feb 12 '24 20:02 ropensci-review-bot

:rocket:

Editor check started

:wave:

ropensci-review-bot avatar Feb 12 '24 20:02 ropensci-review-bot

Apologies once again @ldecicco-USGS @RonaldVisser. Failed this time because the checks appear to have been called at exactly the time the system was scheduled for regular rebuild (first few hours of Tues, UTC). I've just submitted a PR to our DevGuide to clarify that. Checks will appear straight after this.

mpadge avatar Feb 14 '24 14:02 mpadge

Checks for dendroNetwork (v0.5.2)

git hash: e76e3dd1

  • :heavy_check_mark: Package name is available
  • :heavy_check_mark: has a 'codemeta.json' file.
  • :heavy_check_mark: has a 'contributing' file.
  • :heavy_check_mark: uses 'roxygen2'.
  • :heavy_check_mark: 'DESCRIPTION' has a URL field.
  • :heavy_check_mark: 'DESCRIPTION' has a BugReports field.
  • :heavy_check_mark: Package has at least one HTML vignette
  • :heavy_check_mark: All functions have examples.
  • :heavy_check_mark: Package has continuous integration checks.
  • :heavy_check_mark: Package coverage is 91.4%.
  • :heavy_check_mark: R CMD check found no errors.
  • :heavy_check_mark: R CMD check found no warnings.
  • :eyes: Function names are duplicated in other packages

(Checks marked with :eyes: may be optionally addressed.)

Package License: GPL (>= 3)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 164
internal dendroNetwork 20
imports igraph 25
imports magrittr 20
imports reshape2 10
imports RCy3 9
imports dplyr 7
imports stats 6
imports grDevices 4
imports RColorBrewer 3
imports dplR 2
imports foreach 2
imports doParallel 1
imports stringr NA
imports tidyr NA
imports lifecycle NA
suggests knitr NA
suggests rmarkdown NA
suggests testthat NA
suggests DiagrammeR NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

length (20), lapply (10), subset (10), unlist (10), max (9), for (8), min (8), as.vector (6), c (6), matrix (5), ncol (5), apply (4), as.numeric (4), rownames (4), by (3), cbind (3), colSums (3), dim (3), formatC (3), merge (3), nchar (3), nrow (3), paste0 (3), sqrt (3), system.file (3), unique (3), diff (2), is.na (2), mean (2), rep (2), seq (2), seq_along (2), abs (1), all.vars (1), as.data.frame (1), list (1), log (1), match.call (1), sum (1)

igraph

cliques (6), add_edges (4), make_empty_graph (4), V (3), decompose (2), E (2), graph_from_data_frame (2), clique_num (1), cluster_edge_betweenness (1)

dendroNetwork

cor_mat_overlap (3), t_value (3), wuchswerte (3), clique_community_names_par (2), sim_table (2), clique_community_names (1), cyto_clean_styles (1), cyto_create_cpm_style (1), cyto_create_gn_style (1), cyto_create_graph (1), dendro_network (1), find_all_cpm_com (1)

magrittr

%>% (20)

reshape2

melt (10)

RCy3

createNetworkFromIgraph (4), importVisualStyles (3), layoutNetwork (1), loadTableData (1)

dplyr

mutate (5), row_number (2)

stats

D (3), weights (2), pnorm (1)

grDevices

colorRampPalette (2), colors (2)

RColorBrewer

brewer.pal (3)

dplR

as.rwl (2)

foreach

foreach (2)

doParallel

registerDoParallel (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 16 files) and
  • 1 authors
  • 1 vignette
  • 2 internal data files
  • 14 imported packages
  • 13 exported functions (median 29 lines of code)
  • 13 non-exported functions in R (median 28 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 16 74.9
files_vignettes 3 92.4
files_tests 8 88.2
loc_R 434 43.1
loc_vignettes 161 41.5
loc_tests 30 17.7
num_vignettes 1 64.8
data_size_total 112963 84.1
data_size_median 56481 88.8
n_fns_r 26 35.7
n_fns_r_exported 13 53.9
n_fns_r_not_exported 13 28.8
n_fns_per_file_r 1 0.2 TRUE
num_params_per_fn 3 33.6
loc_per_fn_r 28 74.9
loc_per_fn_r_exp 29 61.6
loc_per_fn_r_not_exp 28 76.0
rel_whitespace_R 5 19.2
rel_whitespace_vignettes 21 25.8
rel_whitespace_tests 7 5.2
doclines_per_fn_exp 32 36.7
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 7 27.1

2a. Network visualisation

Click to see the interactive network visualisation of calls between objects in package


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

pkgcheck.yaml R-CMD-check.yaml

GitHub Workflow Results

id name conclusion sha run_number date
7901669279 pkgcheck success e76e3d 22 2024-02-14
7901669272 R-CMD-check success e76e3d 10 2024-02-14

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following notes:

  1. checking for hidden files and directories ... NOTE Found the following hidden files and directories: .github These were most likely included in error. See section ‘Package structure’ in the ‘Writing R Extensions’ manual.
  2. checking top-level files ... NOTE File LICENSE is not mentioned in the DESCRIPTION file.
  3. checking package subdirectories ... NOTE Found the following CITATION file in a non-standard place: CITATION.cff Most likely ‘inst/CITATION’ should be used instead.
  4. checking R code for possible problems ... NOTE clique_community_names: no visible binding for global variable ‘com’ clique_community_names: no visible binding for global variable ‘com_name’ clique_community_names_par: no visible binding for global variable ‘i’ clique_community_names_par: no visible binding for global variable ‘com’ clique_community_names_par: no visible binding for global variable ‘com_name’ dendro_network: no visible binding for global variable ‘r’ dendro_network: no visible binding for global variable ‘sgc’ dendro_network: no visible binding for global variable ‘p’ dendro_network: no visible binding for global variable ‘series_a’ dendro_network: no visible binding for global variable ‘series_b’ find_all_cpm_com: no visible binding for global variable ‘node’ find_all_cpm_com: no visible binding for global variable ‘com_name’ find_all_cpm_com: no visible binding for global variable ‘n’ gn_names: no visible binding for global variable ‘GN_com’ gn_names: no visible binding for global variable ‘node’ gn_names: no visible binding for global variable ‘com_name’ Undefined global functions or variables: com com_name GN_com i n node p r series_a series_b sgc

R CMD check generated the following check_fails:

  1. rcmdcheck_stale_license_file
  2. rcmdcheck_citation_file_at_standard_place
  3. rcmdcheck_undefined_globals
  4. rcmdcheck_hidden_files_and_directories

Test coverage with covr

Package coverage: 91.44

Cyclocomplexity with cyclocomp

The following function have cyclocomplexity >= 15:

function cyclocomplexity
cyto_clean_styles 20

Static code analyses with lintr

lintr found the following 96 potential issues:

message number of times
Avoid 1:length(...) expressions, use seq_len. 2
Avoid library() and require() calls in packages 2
Lines should not be more than 80 characters. 92

4. Other Checks

Details of other checks (click to open)

:heavy_multiplication_x: The following function name is duplicated in other packages:

    • sim_table from BCEA

Package Versions

package version
pkgstats 0.1.3.11
pkgcheck 0.1.2.15

Editor-in-Chief Instructions:

This package is in top shape and may be passed on to a handling editor

ropensci-review-bot avatar Feb 14 '24 14:02 ropensci-review-bot

@ropensci-review-bot assign @ldecicco-USGS as editor

ldecicco-USGS avatar Feb 19 '24 15:02 ldecicco-USGS

Assigned! @ldecicco-USGS is now the editor

ropensci-review-bot avatar Feb 19 '24 15:02 ropensci-review-bot

Editor checks:

  • [x] Documentation: The package has sufficient documentation available online (README, pkgdown docs) to allow for an assessment of functionality and scope without installing the package. In particular,
    • [x] Is the case for the package well made?
    • [x] Is the reference index page clear (grouped by topic if necessary)?
    • [x] Are vignettes readable, sufficiently detailed and not just perfunctory?
  • [x] Fit: The package meets criteria for fit and overlap.
  • [x] Installation instructions: Are installation instructions clear enough for human users?
  • [x] Tests: If the package has some interactivity / HTTP / plot production etc. are the tests using state-of-the-art tooling?
  • [x] Contributing information: Is the documentation for contribution clear enough e.g. tokens for tests, playgrounds?
  • [x] License: The package has a CRAN or OSI accepted license.
  • [x] Project management: Are the issue and PR trackers in a good shape, e.g. are there outstanding bugs, is it clear when feature requests are meant to be tackled?

Editor comments

I was able to run the example functions from the readme and vignette. It would very helpful to push a compiled pkgdown site to a GitHub Page. You can set that up with:

usethis::use_pkgdown_github_pages()

Setting up a pkgdown site should take care of most of the "Documentation " subtasks. The other sub-category that could be improved is "not just perfunctory" vignettes. Perhaps you could take the contents of the "paper.md" and put that same information in a vignette?

I would also ask that you take a look at the following packages and make sure there's not specific overlap:

https://github.com/AndyBunn/dplR https://github.com/hanecakr/fellingdateR https://github.com/ropensci/MtreeRing

There's a good chance I'd be asking authors from those packages to do a review. I do not know enough about tree ring science to understand where the overlap might fall.


ldecicco-USGS avatar Feb 19 '24 15:02 ldecicco-USGS

Thank you for your helpful comments! More steps to make my package better :)

The paper is there to submit to JOSS in a later stage, but I have added an extra Vignette and I'll think about developing more Vignettes.

I have created a pkgdown website: https://ronaldvisser.github.io/dendroNetwork/ and that was and interesting and fun thing to do :)

There is no overlap with the packages you mentioned:

  • https://github.com/AndyBunn/dplR: this is for other purposes, mainly general analyses of tree-ring material. I am also a contributor to that package. In addition, my package uses that package as a dependency.
  • https://github.com/hanecakr/fellingdateR: I know that package and the author. That package serves another goal: mainly to analyse felling dates, while my package aims at making the use of network analysis accessible for dendrochronology
  • https://github.com/ropensci/MtreeRing: This package is for measuring tree rings and not for visualising patterns in networks.

I believe that the dendroNetwork package can work very well with these packages, but it adds new functionality to the available R-packages and I have tried to explain that in the paper (for JOSS) I have added in the repository.
Oh, for your information, there are more packages in R for dendrochronology and I have compiled a list in the past: https://ronaldvisser.github.io/Dendro_R/

RonaldVisser avatar Feb 20 '24 15:02 RonaldVisser

@ropensci-review-bot assign @kaijagahm as reviewer

ldecicco-USGS avatar Feb 22 '24 14:02 ldecicco-USGS

@kaijagahm added to the reviewers list. Review due date is 2024-03-14. Thanks @kaijagahm for accepting to review! Please refer to our reviewer guide.

rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.

ropensci-review-bot avatar Feb 22 '24 14:02 ropensci-review-bot

@kaijagahm: If you haven't done so, please fill this form for us to update our reviewers records.

ropensci-review-bot avatar Feb 22 '24 14:02 ropensci-review-bot

@ropensci-review-bot assign @gzach93 as reviewer

ldecicco-USGS avatar Mar 07 '24 12:03 ldecicco-USGS

@gzach93 added to the reviewers list. Review due date is 2024-03-28. Thanks @gzach93 for accepting to review! Please refer to our reviewer guide.

rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more.

ropensci-review-bot avatar Mar 07 '24 12:03 ropensci-review-bot

@gzach93: If you haven't done so, please fill this form for us to update our reviewers records.

ropensci-review-bot avatar Mar 07 '24 12:03 ropensci-review-bot

:calendar: @kaijagahm you have 2 days left before the due date for your review (2024-03-14).

ropensci-review-bot avatar Mar 12 '24 14:03 ropensci-review-bot

Package Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

  • Briefly describe any working relationship you have (had) with the package authors.
  • I have no relationship with the package author.
  • ☒ As the reviewer I confirm that there are no conflicts of interest for me to review this work (if you are unsure whether you are in conflict, please speak to your editor before starting your review).

Documentation

The package includes all the following forms of documentation:

  • A statement of need: clearly stating problems the software is designed to solve and its target audience in README

  • Installation instructions: for the development version of package and any non-standard dependencies in README

    Some functionality of the package depends on having Cytoscape installed. This is briefly mentioned in the README, but I would recommend being a little more explicit that this is an external program that will need to be installed and that the Cytoscape-related portions of the package won’t work without it. You might also mention that CyREST should be automatically installed with Cytoscape, and that if users encounter errors with CyREST they should try restarting their computer, maybe downloading CyREST separately, etc.

  • Vignette(s): demonstrating major functionality that runs successfully locally

    Vignettes exist, but vignette(package = "dendroNetwork") returns no results, browseVignettes(package = "dendroNetwork") returns no results, and the vignettes aren’t listed under ?dendroNetwork. Make sure to include the vignettes when you build the package, and see https://r-pkgs.org/vignettes.html for reference on how to incorporate vignettes.

    Some of the vignettes (cytoscape.Rmd) do seem to run locally (and they are a bit clearer than the README about needing to install Cytoscape separately!) However, dendroNetwork_use.Rmd fails to run locally because it needs citations… Maybe I’m just not understanding how to run a vignette properly? Maybe I need all the files there? Sorry if this is not a failure of the package but just a failure of me knowing how to run vignettes locally!

  • Function Documentation: for all exported functions

  • Examples: (that run successfully locally) for all exported functions

Example in wuchswerte fails because object anos1 is not found.

library(dendroNetwork)
data(hol_rom)
dplR::as.rwl(apply(anos1, 2, wuchswerte))
#> Error in eval(expr, envir, enclos): object 'anos1' not found

Created on 2024-03-12 with reprex v2.1.0

t_value doesn’t return anything to console–consider including an explicit return statement.

library(dendroNetwork)
t_value(0.5, 100) # no output
a <- t_value(0.5, 100)
a
#> [1] 5.744563

Created on 2024-03-12 with reprex v2.1.0

cyto_create_gn_style(g_hol, gn_coms = g_hol_gn) fails when run as part of the example for cyto_create_gn_style. Seems to be unable to load a file?

library(dendroNetwork)
data(hol_rom)
sim_table_hol <- sim_table(hol_rom)
g_hol <- dendro_network(sim_table_hol)
hol_com_cpm_k3 <- clique_community_names(g_hol, k = 3)
cyto_create_cpm_style(g_hol, k = 3, com_k = hol_com_cpm_k3)
#> Error: Don't know how to read file:/private/var/folders/xy/lqbp515s27q8v1drkll9gynw0000gr/T/RtmppMCfZy/reprex-172671e49826-large-unau/

Created on 2024-03-12 with reprex v2.1.0

cyto_create_cpm_style fails similarly.

library(dendroNetwork)
data(hol_rom)
sim_table_hol <- sim_table(hol_rom)
g_hol <- dendro_network(sim_table_hol)
hol_com_cpm_k3 <- clique_community_names(g_hol, k = 3)
cyto_create_cpm_style(g_hol, k = 3, com_k = hol_com_cpm_k3)
#> Error: Don't know how to read file:/private/var/folders/xy/lqbp515s27q8v1drkll9gynw0000gr/T/RtmppMCfZy/reprex-172625011c73-alive-lark/

Created on 2024-03-12 with reprex v2.1.0

  • Community guidelines: including contribution guidelines in the README or CONTRIBUTING, and DESCRIPTION with URL, BugReports and Maintainer (which may be autogenerated via Authors@R).

Missing contribution guidelines. Includes URL, BugReports, and Maintainer.

Functionality

  • Installation: Installation succeeds as documented.
  • Functionality: Any functional claims of the software been confirmed.
  • Performance: Any performance claims of the software been confirmed.
  • Automated tests: Unit tests cover essential functions of the package and a reasonable range of inputs and conditions. All tests pass on the local machine.

I see that there are tests set up, but I am not familiar with how to run the tests for someone else’s package on my own local machine. If anyone can provide guidance on this, I’d be happy to take a look! I have run tests for my own package before, but never for a package I’ve installed.

  • Packaging guidelines: The package conforms to the rOpenSci packaging guidelines.

Title: good

codemetar: I’m not familiar with this.

Platforms: runs on Mac; I can’t comment on other systems.

Package API: function names are in snake_case and are reasonably logical. Could be nice to preface them all with a common thing like dendro_ and make some of them shorter, but effort has already been made to make them short and consistent. I appreciate that the cytoscape-interface functions are all named with cyto_at the beginning, for instance.

Input checking: There is some input checking, and the error messages returned seem sensible. I would suggest doing a little more input checking, for example making sure that the network objects being passed to the functions are actually igraph network objects as expected. This goes hand in hand with my recommendation that you be a bit more specific about what data format is expected from users of the package. Keep in mind data types etc. and think about which ones will or won’t break your functions. I like to use the checkmate package for fast and easy argument checking, but there are many options including just more base R checks.

CITATION file: good

README etc: generally, multiple points of entry are done well. There is redundancy in where the information is presented, and I was mostly able to find out about the package and its core workflow through the README as well as the vignettes.

Documentation website: ?

Consider @family tag for function grouping

Estimated hours spent reviewing: 4

  • ☒ Should the author(s) deem it appropriate, I agree to be acknowledged as a package reviewer (“rev” role) in the package DESCRIPTION file.

Review Comments

  1. I am coming to this review without any prior understanding of dendrochronology. Therefore, it would be helpful if you could provide more information about the data types. For example, ?hol_rom tells me that this dataset contains dendrochronological site chronologies. I don’t actually know what a “site chronology” is. What is an object of class “rwl”, and how would I go about making sure that an object I’m feeding into this function has class “rwl” (or is it okay if it’s just a data frame)? What does a single row in this dataset represent? What does a single column represent? What do the column names mean? It’s possible that anyone who would be using this package would already understand these things, but I think there’s no harm in being more explicit. When I go to use a package, typically my first question is “If I wanted to use this package on my data, what would my data have to look like, exactly, in order for the functions to work?”

  2. Regarding the documentation for sim_table: I think I would understand this better if I understood the the data better, as described in 1). It seems like you’re saying that trs1 (hol_rom, in this example) represents a single tree ring series (or is it multiple series? I can’t tell). trs2 is optional. I did some experimenting and found that if you don’t specify trs2, the function ends up comparing trs1 to itself; that is, identical(sim_table(hol_rom), sim_table(hol_rom, hol_rom)) is TRUE. In the description for the trs1 argument, maybe specify that behavior, instead of saying “to be compared with trs2.

  3. Carrying on with the theme of me being naive to the domain: I don’t understand what last_digit_radius does. What is a “series name” and what is the “radius of the tree-ring series”? What would be the units of the radius? Why does this argument matter? Again, if the answers to some of these questions would be obvious to domain-familiar users of your package, then maybe it’s not necessary to define them, but I was wondering.

  4. Make sure to specify in multiple places that Cytoscape has to be not only installed but actually running when you use the functions that relate to it.

  5. It would be nice if there was an example of how to use the package on large datasets. I recognize, though, that including a large dataset is probably not practical. Maybe use a small dataset as an example but still run it in parallel, using tic() and toc() to demonstrate the time difference? In the given example, it wasn’t clear that the object network in the example code wasn’t a real object and that the code wouldn’t actually run.

  6. cyto_create_cpm_style maybe didn’t work for me? I’m not exactly sure what was supposed to happen, but I didn’t see any colors or styling appearing, just black and white. I can provide more details/screenshots if that would help.

Some more detailed comments on the pre-cytoscape functions (some of this is maybe overly nitpicky, but it was my thought process as I was working through the functions!)

library(dendroNetwork) # load the package
data(hol_rom) # what is this? I have no knowledge of tree networks, so I don't understand what I'm looking at.
?hol_rom # pulls up some documentation. As someone with know domain knowledge, I don't understand what a "site chronology" is. What does a single row represent? What does each column represent?
sim_table_hol <- sim_table(hol_rom) # what format does the data need to be in for this function to work? Is this a standard format that everyone in the field will know? Are you sure? Can you be more explicit? What is a Rwl object?
# What does it mean to only use one dataset, versus to use two datasets compared to each other?
# I don't understand what `last_digit_radius` really does. What is a "series name" and what is the "radius of the tree-ring series"? What would the radius be measured in?
# I recommend explicitly defining each of the columns output
identical(sim_table(hol_rom), sim_table(hol_rom, hol_rom)) # these are identical. Seems that the sim_table function just compares trs1 to itself if trs2 isn't provided.

g_hol <- dendro_network(sim_table_hol)
g_hol_gn <- gn_names(g_hol) # in doc: "iGraph" should be "igraph", and consider linking to the function explicitly.
# in doc: for "Value", should say "A data frame. Column 1 contains node names; column 2 contains community names" or similar.
# Say explicitly what class of object needs to be passed to the function (g)
gn_names(hol_rom) # "Error in `ensure_igraph()`: ! Must provide a graph object (provided wrong object type). Run `rlang::last_trace()` to see where the error occurred." This is a good, informative error! Put it in the documentation to make it even clearer.
g_hol_cpm <- clique_community_names(g_hol, k = 2) # says "the default is set to smallest possible size (3) but if I put in k = 2 there is no error thrown.
# in Value, give an example of a community name, like "CPM_K2_4"
clique_community_names(g_hol, k = 3) # only gives some of the nodes, not all of them. Why?
clique_community_names(g_hol, k = 4) #"Error in clique_community_names(g_hol, k = 4) : The maximum clique size in the network is 3. Therefore k cannot exceed this number". But the documentation says that k is the *minimum*, not the max. What gives?
# Is this function supposed to be returning community assignments (in which case k is the number of communities to be found) or is it supposed to be returning communities with a minimum size of k?

hol_com_cpm_all <- find_all_cpm_com(g_hol) # I don't understand what is happening here
# seems to return in wide format. Why? Is this just the wide-format version of the previous function?

kaijagahm avatar Mar 13 '24 02:03 kaijagahm

Hi @kaijagahm, thank you for the review and your detailed comments. These are very helpful for improving the package and the documentation, which makes me happy. I am looking forward to address the various things you pointed out and I hope to do this as soon as possible.

RonaldVisser avatar Mar 13 '24 07:03 RonaldVisser

You're very welcome! It was fun to explore this. I know my comments are a bit all over the place; I hope they are navigable. Feel free to ask if you encounter any confusion.

Except for some concerns over the examples running and one of the functions not showing colors in Cytoscape, and some documentation tweaks, most of my comments were around the margins and the package seems to be doing pretty well at its core functionality. I look forward to seeing how this develops!

kaijagahm avatar Mar 13 '24 15:03 kaijagahm

@ropensci-review-bot submit review https://github.com/ropensci/software-review/issues/627#issuecomment-1993235710 time 4

ldecicco-USGS avatar Mar 13 '24 16:03 ldecicco-USGS

Logged review for kaijagahm (hours: 4)

ropensci-review-bot avatar Mar 13 '24 16:03 ropensci-review-bot

:calendar: @gzach93 you have 2 days left before the due date for your review (2024-03-28).

ropensci-review-bot avatar Mar 26 '24 12:03 ropensci-review-bot