
library(RJSplot)
boxplot_rjs(attitude, "attitude", "favourable responses")

barplot_rjs(USArrests, "states", "arrests")

data <- data.frame(Uni05 = (1:100)/21, Norm = rnorm(100), `5T` = rt(100, df = 5), Gam2 = rgamma(100, shape = 2))
densityplot_rjs(data, "x", "y")

scatterplot_rjs(iris[["Sepal.Width"]], iris[["Sepal.Length"]], abline.x = c(3.4,3.8), abline.y = c(5.8,7), col = iris[["Species"]], pch = as.numeric(iris[["Species"]]), id = iris[["Species"]], xlab = "Sepal Width (cm)", ylab = "Sepal Length (cm)")

piechart_rjs(VADeaths)

bubbles_rjs(scale(mtcars[,c("mpg","hp")],FALSE), mtcars[["wt"]])

dendrogram_rjs(dist(USArrests),USArrests)

x <- 1-cor(t(mtcars))
source <- rep(rownames(x),nrow(x))
target <- rep(rownames(x),rep(ncol(x),nrow(x)))
links <- data.frame(source=source,target=target,value=as.vector(x))
network_rjs(links[links[,3]>0.1,], mtcars, group = "cyl", size = "hp", color = "mpg")

symheatmap_rjs(links, mtcars, group = "cyl")

hiveplot_rjs(links, mtcars, group = "cyl", size = "wt", color = "carb")

metadata <- data.frame(phenotype1 = sample(c("yes","no"),ncol(mtcars),TRUE), phenotype2 = sample(1:5,ncol(mtcars),TRUE))
heatmap_rjs(data.matrix(mtcars), metadata, scale="column")

words <- data.frame(word = rownames(USArrests), freq = USArrests[,4])
wordcloud_rjs(words)

chr <- character()
pos <- numeric()
for(i in 1:nrow(GRCh38)){
chr <- c(chr,as.character(rep(GRCh38[i,"chr"],100)))
pos <- c(pos,sample(GRCh38[i,"start"]:GRCh38[i,"end"],100))
}
value <- round(rexp(length(pos)),2)
data <- data.frame(paste0("ProbeSet_",seq_along(pos)),chr,pos,value)
manhattan_rjs(data, GRCh38, 0, 1, 0, TRUE, "log2Ratio")

track <- data.frame(chr,pos,pos+1,NA,value)
genomemap_rjs(GRCh38.bands, track)

scatter3d_rjs(iris[["Sepal.Width"]], iris[["Sepal.Length"]], iris[["Petal.Width"]], color = iris[["Species"]], xlab = "Sepal Width (cm)", ylab = "Sepal Length (cm)", zlab = "Petal Width (cm)")

surface3d_rjs(volcano,color=c("red","green"))

tables_rjs(swiss)
