Debugged 1889 query, first steps in R