Correction of example.
This commit is contained in:
+5
-1
@@ -17,7 +17,11 @@ Generates a heatmap using ggplot for a dataframe.
|
|||||||
\examples{
|
\examples{
|
||||||
library(tidyverse)
|
library(tidyverse)
|
||||||
|
|
||||||
df<-data.frame("pats"=paste0("PAT", 1:20), "CytA"=rnorm(20,5), "CytB"=rnorm(20,5),"CytC"=c(rnorm(5,10),rnorm(5,5),rnorm(5,10),rnorm(5,5)),"CytD"=rnorm(20,5),"CytE"=c(rnorm(5,10),rnorm(5,5),rnorm(5,10),rnorm(5,5)),"CytF"=rnorm(20,5),"CytG"=c(rnorm(5,10),rnorm(5,5),rnorm(5,10),rnorm(5,5))) %>% gather(Cyt, Value,-pats)
|
df<-data.frame("pats"=paste0("PAT", 1:20), "CytA"=rnorm(20,5), "CytB"=rnorm(20,5),
|
||||||
|
"CytC"=c(rnorm(5,10),rnorm(5,5),rnorm(5,10),rnorm(5,5)),"CytD"=rnorm(20,5),
|
||||||
|
"CytE"=c(rnorm(5,10),rnorm(5,5),rnorm(5,10),rnorm(5,5)),"CytF"=rnorm(20,5),
|
||||||
|
"CytG"=c(rnorm(5,10),rnorm(5,5),rnorm(5,10),rnorm(5,5)))
|
||||||
|
df<-gather(df, Cyt, Value,-pats)
|
||||||
head(df)
|
head(df)
|
||||||
|
|
||||||
ggheatmap(df)
|
ggheatmap(df)
|
||||||
|
|||||||
Reference in New Issue
Block a user