A quick question about qr_thin_Q

Hello,

May I ask a quick question about Stan QR function qr_thin_Q? Is it the same as Gram-Schmidt orthogonalization except for the standardization of each column? For instance, a1 (Nx1) (1st column) of matrix qr_thin_Q(A) (NxM), multiplied by sqrt(N - 1) is just the standardized A[:,1]. In other words, the 1st column of a matrix after qr_thin_Q is the standardized 1st column of the original matrix divided by sqrt(N - 1)?

Btw, where can I find a detailed Stan function explanation instead of only supported signatures? If I would like to test the output of a Stan function in R, is stanFunction("qr_thin_Q", x = A) the right way? I am not sure, but it seems stanFunction requires Rstan and I am using cmdstanr, would it be possible that stanFunction is referring to a different version of the same function used in cmdstan? Thank you very much.