Created
January 9, 2014 15:48
-
-
Save dmarcelinobr/8336287 to your computer and use it in GitHub Desktop.
Esse script lê todas as bases em "txt" que existir no diretório informado.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setwd("~/Documents/Data/BRAZIL/TSE") | |
| todos.arquivos <-"" | |
| nomes.bases <- dir(path = getwd(), pattern =".txt") | |
| for(i in 1:length(nomes.bases)){ | |
| base <- read.table(nomes.bases[i],header=TRUE, sep=";", | |
| stringsAsFactors=FALSE) | |
| todos.arquivos <- rbind(todos.arquivos, base) | |
| } | |
| write.table(todos.arquivos, file = "bases_tse.txt",sep=";", | |
| row.names = FALSE, qmethod = "double", | |
| fileEncoding="windows-1252") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment