updating R scripts
multiple queries over one complex