title: Error in Source in R
body: <p>I use the following source and get an error:</p>
  
  <pre><code>&gt;source("raw.githubusercontent.com/iembry-USGS/ie2misc/master/R/…)
  Error in source("raw.githubusercontent.com/iembry-USGS/ie2misc/master/R/…) : raw.githubusercontent.com/iembry-USGS/ie2misc/master/R/…: unexpected input 1: ï»
  </code></pre>
  
  <p>Since I have to use what is the error and how I can fix it?
  Here is my code (the last line is the relevant command:</p>
  
  <pre><code>library(zoo)
  library (xts)
  library(data.table)
  
  source("https://raw.githubusercontent.com/iembry-USGS/ie2misc/master/R/na.interp1.R")
  
  Lines &lt;- "D1,Diff
  1,20/11/2014 16:00,0.01
  2,20/11/2014 17:00,0.02
  3,20/11/2014 19:00,0.03
  4,21/11/2014 16:00,0.04
  5,21/11/2014 17:00,0.06 
  6,21/11/2014 20:00,0.10"
  z &lt;- read.zoo(text = Lines, tz = "", format = "%d/%m/%Y %H:%M", sep = ",")
  
  
  ## Source 1 begins
  startdate &lt;- as.character((start(z)))
  # set the start date/time as the 1st entry in the time series and make
  # this a character vector.
  
  start &lt;- as.POSIXct(startdate)
  # transform the character vector to a POSIXct object
  
  enddate &lt;- as.character((end(z)))
  # set the end date/time as the last entry in the time series and make   
  # this a character vector.
  
  end &lt;- as.POSIXct(enddate)
  # transform the character vector to a POSIXct object
  
  gridtime &lt;- seq(from = start, by = 3600, to = end)
  # create a sequence beginning with the start date/time with a 60 minute 
  # interval ending at the end date/time
  ## Source 1 ends
  
  ## Source 2 begins
  timeframe &lt;- data.frame(rep(NA, length(gridtime)))
  # create 1 NA column spaced out by the gridtime to complement the single 
  # column of z
  
  timelength &lt;- xts(timeframe, order.by = gridtime)
  # create a xts time series object using timeframe and gridtime
  
  zDate &lt;- merge(timelength, z)
  # merge the z zoo object and the timelength xts object  
  ## Source 2 ends
  
  Lines &lt;- as.data.frame(zDate)
  # to data.frame from zoo
  
  Lines[, "D1"] &lt;- rownames(Lines)
  # create column named D1
  
  Lines &lt;- setDT(Lines)
  # create data.table out of data.frame
  
  setcolorder(Lines, c(3, 2, 1))
  # set the column order as the 3rd column followed by the 2nd and 1st 
  # columns
  
  Lines &lt;- Lines[, 3 := NULL]
  # remove the 3rd column
  
  setnames(Lines, 2, "diff")
  # change the name of the 2nd column to diff
  
  Lines &lt;- setDF(Lines)
  # return to data.frame
  
  rowsinterps1 &lt;- which(is.na(Lines$diff == TRUE))
  # index of rows of Lines that have NA (to be interpolated)
  
  xi &lt;- as.numeric(Lines[which(is.na(Lines$diff == TRUE)), 1])
  # the Date-Times for diff to be interpolated in numeric format
  
  interps1 &lt;- na.interp1(as.numeric(Lines$Time), Lines$diff, xi = xi, na.rm = FALSE, maxgap = 3)
  # the interpolated values where only gap sizes of 3 are filled
  </code></pre>