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.