Adrià Vilanova Martínez | 8d6bb62 | 2023-03-30 21:23:52 +0200 | [diff] [blame] | 1 | table <- read.table('dades/dades.txt', sep="\t", dec='.', header=TRUE) |
2 | table$LogIntensitatReal <- log(table$IntensitatReal) | ||||
3 | |||||
4 | fit <- lm(LogIntensitatReal~GruixMassic, data = table) | ||||
5 | summary(fit) | ||||
6 | |||||
7 | svg(file='output/p1a.svg', width=6, height=5) | ||||
8 | plot(table$GruixMassic, table$LogIntensitatReal, xlab="Gruix màssic (mg/cm^2)", ylab="log(Intensitat · s)") | ||||
9 | abline(fit, col = "mediumorchid2") | ||||
10 | dev.off() |