Skip to content

Commit

Permalink
fix error in network examples during rcmdcheck cran: interactive plot…
Browse files Browse the repository at this point in the history
… should only be made in interactive session
  • Loading branch information
evaham1 committed Oct 4, 2024
1 parent d8b5a0f commit 56a703a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/network-examples.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ show.edge.labels = FALSE)
dev.off()


## interactive 'cutoff'

network(nutri.res, comp = 1:3, cutoff = 0.55, interactive = TRUE)
## select the 'cutoff' and "see" the new network
## interactive 'cutoff' - select the 'cutoff' and "see" the new network
## only run this during an interactive session
if (interactive()) {
network(nutri.res, comp = 1:3, cutoff = 0.55, interactive = TRUE)
}
dev.off()

## network representation for objects of class 'spls'
data(liver.toxicity)
Expand Down

0 comments on commit 56a703a

Please sign in to comment.