Text
T-Minus 4 Days...
…Until MLB Opening Day. And with that, my forever unfulfilled ambition to implement some cool viz methods after picking up ‘Analysing Baseball Data wit R’ in 2015(!). Here is an example of the cool stuff to be expected (stolen from Rotoworld) - maybe this year is the year!
0 notes
Text
R/DBI - ‘Inactive Result Set’ - WEIRD
Having some weird behaviour when looping into a PostGres DB (I know it sounds a mess - but its the quickest way to fetch data based on a number of different parameters, each dependent on the input of the other) - and for no discernible reason, R throws this error at me:
Error in result_fetch(res@ptr, n = n) : Inactive result set
For the first time in my life - this is un-Google-able! No Stack Exchange - nothing! Well it turns out this is an issue with making repeated calls to a PostGres DB through DBI without closing the result set (NOTE: this is NOT to do with closing connections, or a connections leak - just the results set!)
If you clear the results set after your query has been fetched, you’re out of the woods.
print(’Thanks for nothing, internet’)
0 notes