boxplot to analyze results between samples

pull/214/head
RobertGawron 2019-08-19 17:57:17 +01:00
rodzic 9363431eb2
commit 5b62e11f1b
1 zmienionych plików z 44 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,44 @@
inputFileName ="DataNoSample.csv"
fileNoSample <- read.delim(inputFileName, , sep=",")
inputFileName ="DataAmSample1.csv"
fileAmSample1 <- read.delim(inputFileName, , sep=",")
inputFileName ="DataRaSample2.csv"
fileAmSample2 <- read.delim(inputFileName, , sep=",")
backgroundLevel = fileNoSample$Counter
AmIsotope = fileAmSample1$Counter
RaIsotope = fileAmSample2$Counter
# date column should be type of date, not string, so parse it
png(filename = paste0("results-", format(Sys.time(), "%d_%b_%Y_%H_%M"), ".png"), width = 800, height = 900, bg = "white")
verticalLabels <- c("background level\nradiation", "Am isotope\n(somke detector)", "Ra isotope\n(old compass)")
boxplot(backgroundLevel, AmIsotope, RaIsotope,
col="grey",
names=verticalLabels,
horizontal = FALSE,
main = "Radioactivity of different samples meassured using Ionization Chamber",
xlab = "Measurement",
ylab = "Sensor voltage",
boxwex=0.2)
# no X grid, Y grid grid aligns with the tick marks
grid(NA, NULL)
boxplot(backgroundLevel, AmIsotope, RaIsotope,
col="grey",
names=verticalLabels,
horizontal = FALSE,
main = "Radioactivity of different samples meassured using Ionization Chamber",
xlab = "Measurement",
ylab = "Sensor voltage",
boxwex=0.2,
add=T)