library(ggplot2) prices = read.csv("mieszkania.tsv", sep="\t", header=TRUE) prices$area = prices$powierzchnia prices$price = prices$cena pdf("linregr1.pdf") ggplot(prices, aes(x=area, y=price)) + geom_point() dev.off()