Correctness and Performance of graph plotting on R
The plot looks about right with the data, and I see no egrerious errors in your code. I do have a few remarks.


In r it's unnecessary to end your lines with a semi-colon, and most styleguides advise against it. The only real purpose it has is allowing multiple statements on a single line, but why would we want that.
With regards to your code where you install packages. There are two ways of loading a library: library(name) and require(name). One big difference is that require returns a FALSE when the package is missing, library throws an error. What you can do is try and load the library, and if it fails install it:


for(libraryName in c("ggplot2", "reshape2")){
  if(!require(libraryName)){
    install.package(libraryName)
    require(libraryName)
  }
}



If your csv files are going to be huge, I recommend using data.table::fread for reading your csv files. In my experience it is the fastest reading large datasets. It also allows for efficient dataframe operations.
If at reading time you specify the correct columnnames, you can prevent having to do the melt operation later: add the argument col.names = c("File.Length", "value"). Add the column FileOutputWithoutBufferMetrics["Time"] &lt;- "Non.Buffered.Time.Taken..ns." to both dataframes, and simply rbind them. This is most likely more efficient than melt, especially on big datasets.
# This line has to be updated on every place, possible. This is generally accounted for using the "working directory" of the R process. If you run the script from commandline, the working directory is the current directory. If you run it from Rstudio you can set it using the setwd(dir) function, or in Session -&gt; Set Working Directory -&gt; To Source File Location in the Rstudio ui. Once that is set, you don't have to add that path to the filename in read.csv.




In summary:

for(libraryName in c("ggplot2", "data.table")){
  if(!require(libraryName)){
    install.package(libraryName)
    require(libraryName)
  }
}

FileOutputWithoutBufferMetrics &lt;- fread("FileOutputWithoutBuffer-Metrics.csv"), col.names = c("File.Length", "value"))
FileOutputWithoutBufferMetrics["Time"] &lt;- "Non.Buffered.Time.Taken..ns."

FileOutputWithBufferMetrics    &lt;- fread("FileOutputWithBuffer-Metrics.csv"), col.names = c("File.Length", "value"))
FileOutputWithBufferMetrics["Time"] &lt;- "Buffered.Time.Taken..ns."

df &lt;- rbind(FileOutputWithoutBufferMetrics, FileOutputWithBufferMetrics)


ggplot(df, aes(File.Length, value)) + geom_line(aes(colour = Time))