lianos / sparrow

Take command of your set enrichment analyses.
https://lianos.github.io/sparrow/
MIT License
20 stars 1 forks source link

fix: get rid of warnings in `sparrow::corplot` #12

Closed gladkia closed 3 years ago

gladkia commented 3 years ago

Hi Steve,

I encountered the issue with multiple warnings being thrown when running sparrow::corplot. It seems that small fix with formals does the job.

Please find the example session to reproduce/evaluate the issue below. Interestingly the supressWarnings inside the sparrow::corplot did not prevent the appearance of the warnings in the global env.

> assign("last.warning", NULL, envir = baseenv())
> warnings()
> x <- matrix(rnorm(1000), ncol=5)
> sparrow::corplot(x)
> warnings()
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
  "col.point" is not a graphical parameter
2: In doTryCatch(return(expr), name, parentenv, handler) :
  "smooth.scatter" is not a graphical parameter
3: In doTryCatch(return(expr), name, parentenv, handler) :
  "col.point" is not a graphical parameter
4: In doTryCatch(return(expr), name, parentenv, handler) :
  "smooth.scatter" is not a graphical parameter
5: In doTryCatch(return(expr), name, parentenv, handler) :
  "col.point" is not a graphical parameter
6: In doTryCatch(return(expr), name, parentenv, handler) :
  "smooth.scatter" is not a graphical parameter
7: In doTryCatch(return(expr), name, parentenv, handler) :
  "col.point" is not a graphical parameter
8: In doTryCatch(return(expr), name, parentenv, handler) :
  "smooth.scatter" is not a graphical parameter
lianos commented 3 years ago

@gladkia feel free to update the the Authors@R bits of the DESCRIPTION file to add you as a contributor, and I will be happy to merge, ie. something like:

    person(
        "Steve", "Lianoglou", role = c("aut", "cre"),
        email = "slianoglou@gmail.com",
        comment = c(ORCID = "0000-0002-0924-1754")),
    person("your", "name", ..., role = "ctb"),
    person("Denali Therapeutics", role = c("fnd"), comment = "2018+"),
    person("Genentech", role = c("fnd"), comment = "2014 - 2017"))

(if you want to, that is ...)

gladkia commented 3 years ago

@gladkia feel free to update the the Authors@R bits of the DESCRIPTION file to add you as a contributor, and I will be happy to merge, ie. something like:

    person(
        "Steve", "Lianoglou", role = c("aut", "cre"),
        email = "slianoglou@gmail.com",
        comment = c(ORCID = "0000-0002-0924-1754")),
    person("your", "name", ..., role = "ctb"),
    person("Denali Therapeutics", role = c("fnd"), comment = "2018+"),
    person("Genentech", role = c("fnd"), comment = "2014 - 2017"))

(if you want to, that is ...)

@lianos - done :). Thank you :).

lianos commented 3 years ago

Great, thank you for your contribution @gladkia!