Skip to content

Commit

Permalink
fix: update package checking
Browse files Browse the repository at this point in the history
- use `GiottoUtils::package_check()` for package checking
- remove `library()` calls. These are not allowed inside a package.
  • Loading branch information
jiajic committed Feb 27, 2024
1 parent ae78350 commit e3adddb
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions R/python_hmrf.R
Original file line number Diff line number Diff line change
Expand Up @@ -1068,31 +1068,19 @@ initHMRF_V2 =
Nature biotechnology 36 (12), 1183-1190. 2018\n"
)

if (!requireNamespace("smfishHmrf", quietly = TRUE)) {
stop("\n package ", "smfishHmrf", " is not yet installed \n",
"To install: \n", "devtools::install_bitbucket(\"qzhudfci/smfishHmrf-r\") \n",
"see http://spatial.rc.fas.harvard.edu for more information",
call. = FALSE)
}
if (!requireNamespace("tidygraph", quietly = TRUE)) {
stop("\n package ", "tidygraph", " is not yet installed \n",
call. = FALSE)
}
if (!requireNamespace("ggraph", quietly = TRUE)) {
stop("\n package ", "ggraph", " is not yet installed \n",
call. = FALSE)
}
if (!requireNamespace("graphcoloring", quietly = TRUE)) {
stop("\n package ", "graphcoloring", " is not yet installed \n",
"To install: \n", "devtools::install_bitbucket(\"qzhudfci/graphcoloring\") \n",
call. = FALSE)
}
library(smfishHmrf)
library(tidygraph)
library(ggraph)
library(graphcoloring)
package_check(
pkg_name = c(
"tidygraph", "ggraph", "dplyr", "smfishHmrf", "graphcoloring"
),
repository = c(
"CRAN:tidygraph",
"CRAN:ggraph",
"CRAN:dplyr",
"bitbucket:qzhudfci/smfishHmrf-r",
"bitbucket:qzhudfci/graphcoloring"
)
)

package_check('dplyr')

# DT vars
to = from = clus = NULL
Expand Down

0 comments on commit e3adddb

Please sign in to comment.