boxplot to analyze results between samples
pull/215/head
Robert 2019-08-19 20:13:45 +02:00 zatwierdzone przez GitHub
commit 84536884c0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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)