title: Making Demogdata in R
body: <p>I am new to the R and I am trying to fit mortality data from HMD. However everytime I do a correction, I get an error message about read.demogdata or more specially creating demogdata. I can not create my own demogdata. Here is my code, but I can not move forward:</p>
  
  <pre><code>library(demography)
  library(forecast)
  aus&lt;-read.demogdata("AUS.Mx_1x1.txt", type="mortality", label="AUS", skip=2)
  tra.data&lt;-window(aus, ages=0:16, years=1921:1986)
  test.data&lt;-window(aus, ages=0:16, years=1987:2016)
  lcmodel&lt;-lca(tra.data)
  
  Error in lca(tra.data) : Not demography data
  </code></pre>
  
  <p>In where I made a mistake? How can I overcome?</p>
  
  <p>Many thanks in advance..</p>
  
  <p>Also this:</p>
  
  <pre><code>    aus2&lt;-read.demogdata("Mx_1x1.txt", "Exposures_1x1.txt",type="mortality",label="AUS")
  
      Error in scan(file = file, what = what, sep = sep, quote = quote, dec =         dec,  : 
        line 3884 did not have 3 elements
      In matrix(tmp1[, i + 2], nrow = m, ncol = n) :
  </code></pre>