title: Convert date to julian
body: <p>I am trying to convert a date into a julian date. I have this data frame</p>
  
  <pre><code>      diff   yr mo dy hr
  1 3.174583 1873 12  1  1
  2 2.874583 1873 12  1  3
  3 2.574583 1873 12  1  5
  4 2.074583 1873 12  1  7
  5 1.774583 1873 12  1  9
  6 1.474583 1873 12  1 11
  </code></pre>
  
  <p>and for every row I want to assign the number of days since a particular date (e.g. "1870-01-01").</p>
  
  <p>I tried like this</p>
  
  <pre><code>julian(as.Date(paste(dep$yr,dep$mo,dep$dy,sep="/"),"%Y/%m/%d")) 
  </code></pre>
  
  <p>but this gives me the days since "1970-01-01".. If I try to set the origin</p>
  
  <pre><code>  julian(as.Date(paste(dep$yr,dep$mo,dep$dy,sep="/"),"%Y/%m/%d"),origin = paste(1870,1,1,sep="-"))
  </code></pre>
  
  <p>then I get this error</p>
  
  <pre><code>Error in unclass(x) - unclass(origin) : 
    non-numeric argument to binary operator
  </code></pre>
  
  <p>Can some one help me?</p>
  
  <p>Many thanks</p>