Skip to content

Commit

Permalink
itriplot: take labels from column names
Browse files Browse the repository at this point in the history
  • Loading branch information
kbroman committed May 31, 2020
1 parent 048d7c7 commit e07a72a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: qtlcharts
Version: 0.12-4
Date: 2019-12-19
Version: 0.12-5
Date: 2020-05-31
Title: Interactive Graphics for QTL Experiments
Author: Karl W Broman [aut, cre] (<https://orcid.org/0000-0002-4914-6671>),
Michael Bostock [ctb, cph] (d3.js library in htmlwidgets/lib,
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
@@ -1,4 +1,7 @@
## qtlcharts 0.12-4 (2019-12-19)
## qtlcharts 0.12-5 (2020-05-31)

- `itriplot()` will take labels from the column names of the
probabilities, `p`.

- Allow `title` as chart option in `iplotMScanone()`,
`iplotScanone()`, `iheatmap()`.
Expand Down
4 changes: 4 additions & 0 deletions R/itriplot.R
Expand Up @@ -43,6 +43,10 @@ function(p, indID=NULL, group=NULL, chartOpts=NULL, digits=5)
stopifnot(length(indID) == n)
indID <- as.character(indID)

if(!is.null(colnames(p))) { # if column names for probabilities, use as labels
chartOpts <- add2chartOpts(chartOpts, labels=colnames(p))
}

if(is.null(group)) group <- rep(1, n)
group_levels <- sort(unique(group))
group <- group2numeric(group)
Expand Down

0 comments on commit e07a72a

Please sign in to comment.