A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cran.r-project.org/web/packages/fda.usc/../rmarkdown/../sinaplot/vignettes/SinaPlot.html below:

sinaplot: an enhanced chart for simple and truthful representation of single observations over multiple classes

x <- c(rnorm(200, 4, 1), rnorm(200, 5, 2), rnorm(400, 6, 1.5))
groups <- c(rep("Cond1", 200), rep("Cond2", 200), rep("Cond3", 400))

library(sinaplot)
#Use any "plot" argument
sinaplot(x, groups, col = 2:4, pch = 20, bty = "n")
Blood

We use a cohort of 2095 AML, ALL and healthy bone marrow samples to illustrate some of the strengths of sinaplot.

ALL t(12;21) 7.553129 ALL t(12;21) 7.252447 ALL t(12;21) 5.608201 ALL t(12;21) 5.971710 ALL t(12;21) 6.554109 ALL t(12;21) 5.655416 ALL t(12;21) 6.127554 ALL t(12;21) 6.043007 ALL t(12;21) 7.681021 ALL t(12;21) 5.959204
sinaplot(Gene ~ Class, data = blood, pch = 20)

By setting the argument scale = FALSE we turn off the group-wise scaling based on the class with the highest density.

sinaplot(Gene ~ Class, data = blood, pch = 20, scale = FALSE)

Using the method = "counts" to compute the borders we get a less smooth spread of the samples due to the absence of the kernel density estimate.

sinaplot(Gene ~ Class, data = blood, pch = 20, scale = FALSE, method = "counts")

Sinaplot aesthetics can be tweaked in the same manner as in graphics::plot.

par(mar = c(9,4,4,2) + 0.1)
n_groups <- length(levels(blood$Class))

sinaplot(Gene ~ Class, data = blood, pch = 20, xaxt = "n", col = rainbow(n_groups), 
         ann = FALSE, bty = "n")
axis(1, at = 1:n_groups, labels = FALSE)
text(x = 1:n_groups,
     y = par()$usr[3] - 0.1 * (par()$usr[4] - par()$usr[3]),
     labels = levels(blood$Class), srt = 45, xpd = TRUE, adj = 1,
     cex = .8)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4