unsafe fn set_dims<const NDIM: usize>(sexp: SEXP, dims: &[usize; NDIM])
Set dimensions on a SEXP.
Must be called from R main thread.