aitech-eks-pub/wyk/08_files/linregr2.r

9 lines
255 B
R
Raw Permalink Normal View History

2021-04-27 19:00:36 +02:00
library(ggplot2)
prices = read.csv("mieszkania.tsv", sep="\t", header=TRUE)
prices$area = prices$powierzchnia
prices$price = prices$cena
pdf("linregr2.pdf")
ggplot(prices, aes(x=area, y=price)) + geom_point() + stat_smooth(method=lm, se=FALSE)
dev.off()