Manual merge of of implemented features from other branch in LineGraph r-script.

This should prevent merge conflicts in the R file for branch owner later on.
Cherry picked most recent LineGraphLoader.r commit from branch 225, and resolved inbound merge conflicts for this specific file.