Online, efficient GNG R package in C++