Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>this brazilian census website provides a SAS importation script. the quickest way to import an ASCII data set with only a SAS importation script is to use <a href="http://cran.r-project.org/package=SAScii">the SAScii package</a>. you can find the SAS importation script inside <a href="ftp://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Mensal_de_Emprego/Microdados/documentacao/Documentacao.zip">this zipped file</a> -- it's INPUT.txt. notice that the INPUT block of those SAS importation instructions don't start until the fourth line, so your <code>beginline</code> parameter will be 4. test out that you're reading the SAS script correctly first with <code>?parse.SAScii</code></p> <pre><code>library(SAScii) parse.SAScii( "INPUT.txt" , beginline = 4 ) </code></pre> <p>once you see that that's printed the column names and widths correctly, you can use the <code>?read.SAScii</code> function to directly read your text file into an R data frame</p> <pre><code>x &lt;- read.SAScii( "filename.txt" , "INPUT.txt" , beginline = 4 ) head( x ) </code></pre> <p>if your file is too big to read entirely into RAM, you can instead read it into a SQLite database. use the <code>read.SAScii.sqlite()</code> function found not in the SAScii package but in <a href="https://github.com/ajdamico/usgsd/blob/master/SQLite/read.SAScii.sqlite.R">my github account here</a> -- it's just a slight variation of the read.SAScii() function, but it doesn't overload RAM. you can see an example of its usage in the download script on this <a href="http://www.asdfree.com/search/label/area%20resource%20file%20%28arf%29">united states government survey data set website</a>.</p> <p>for more detail about the SAScii package, check out <a href="http://blog.revolutionanalytics.com/2012/07/importing-public-data-with-sas-instructions-into-r.html">this overview</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload