QR decomposition with julia. How to?

Solved here

X, Y = df.x, df.y;
X1 = [X ones(length(X))];
QR = qr(X1);

(inv(QR.R) * QR.Q') * Y
 1.9393939393939394
 4.733333333333333