
Olá pessoal, tudo bem ? Estou com um problema, estou querendo fazer o merge entre dois bancos de dados:
dim(bancolink) [1] 1630328 8 dim(fichaAlink) [1] 2954930 6
Minha variável - chave primária está com o formato character. Daí qunado eu faço:
CadUnico_fichaA_merge = merge(bancolink, fichaAlink, by.x=c('CPF'), by.y=c('NUMERO_CPF'))
Error in vecseq(f__, len__, if (allow.cartesian || notjoin || !anyDuplicated(f__, : Join results in 150596694 rows; more than 4585258 = nrow(x)+nrow(i). Check for duplicate key values in i each of which join to the same group in x over and over again. If that's ok, try by=.EACHI to run j for each group to avoid the large allocation. If you are sure you wish to proceed, rerun with allow.cartesian=TRUE. Otherwise, please search for this error message in the FAQ, Wiki, Stack Overflow and datatable-help for advice. Tentei fazer usando o formato data.table, daí ele dá um erro também:
CadfAmerge = bancolink[fichaAlink]
Error in `[.data.table`(bancolink, fichaAlink) : When i is a data.table (or character vector), x must be keyed (i.e. sorted, and, marked as sorted) so data.table knows which columns to join to and take advantage of x being sorted. Call setkey(x,...) first, see ?setkey. Desde já agradeço a todos, -- Wagner S. Tassinari Departamento de Matemática Universidade Federal Rural do Rio de Janeiro. BR-465, Km 7 - Seropedica, RJ - Brasil CEP: 23890-000 Skype: wagner.tassinari wtassinari@gmail.com tassinari@ufrrj.br ------------------------------------------------------- "Statistical thinking will one day be as necessary for efficient citizenship as the ability to read and write." (H.G.Wellis)

Você quer mesmo deixar seu banco com 150 milhões de linhas? Veja se os registros se repetem por CPF: length(bancolink$CPF) length(unique(bancolink$CPF)) e o mesmo para fichaAlink. Abcs, Manoel On Thu, Jan 14, 2016 at 2:13 PM, Wagner Tassinari <wtassinari@gmail.com> wrote:
Olá pessoal, tudo bem ?
Estou com um problema, estou querendo fazer o merge entre dois bancos de dados:
dim(bancolink) [1] 1630328 8 dim(fichaAlink) [1] 2954930 6
Minha variável - chave primária está com o formato character. Daí qunado eu faço:
CadUnico_fichaA_merge = merge(bancolink, fichaAlink, by.x=c('CPF'), by.y=c('NUMERO_CPF'))
Error in vecseq(f__, len__, if (allow.cartesian || notjoin || !anyDuplicated(f__, : Join results in 150596694 rows; more than 4585258 = nrow(x)+nrow(i). Check for duplicate key values in i each of which join to the same group in x over and over again. If that's ok, try by=.EACHI to run j for each group to avoid the large allocation. If you are sure you wish to proceed, rerun with allow.cartesian=TRUE. Otherwise, please search for this error message in the FAQ, Wiki, Stack Overflow and datatable-help for advice.
Tentei fazer usando o formato data.table, daí ele dá um erro também:
CadfAmerge = bancolink[fichaAlink]
Error in `[.data.table`(bancolink, fichaAlink) : When i is a data.table (or character vector), x must be keyed (i.e. sorted, and, marked as sorted) so data.table knows which columns to join to and take advantage of x being sorted. Call setkey(x,...) first, see ?setkey.
Desde já agradeço a todos,
-- Wagner S. Tassinari Departamento de Matemática Universidade Federal Rural do Rio de Janeiro. BR-465, Km 7 - Seropedica, RJ - Brasil CEP: 23890-000 Skype: wagner.tassinari wtassinari@gmail.com tassinari@ufrrj.br ------------------------------------------------------- "Statistical thinking will one day be as necessary for efficient citizenship as the ability to read and write." (H.G.Wellis)
_______________________________________________ R-br mailing list R-br@listas.c3sl.ufpr.br https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.
-- Manoel Galdino https://sites.google.com/site/galdinomcz/

Wagner, as colunas-índice (CPF, NUMERO_CPF) têm o mesmo formato? Uma vez tive dificuldade para mesclar dois *data frames* porque o código IBGE dos municípios estava com um dígito a mais (de verificação, suponho) em um deles. Leonardo Ferreira Fontenelle[1] Em Qui 14 jan. 2016, às 14:13, Wagner Tassinari escreveu:
Olá pessoal, tudo bem ?
Estou com um problema, estou querendo fazer o merge entre dois bancos de dados:
dim(bancolink) [1] 1630328 8 dim(fichaAlink) [1] 2954930 6
Minha variável - chave primária está com o formato character. Daí qunado eu faço:
CadUnico_fichaA_merge = merge(bancolink, fichaAlink, by.x=c('CPF'), by.y=c('NUMERO_CPF'))
Error in vecseq(f__, len__, if (allow.cartesian || notjoin || !anyDuplicated(f__, : Join results in 150596694 rows; more than 4585258 = nrow(x)+nrow(i). Check for duplicate key values in i each of which join to the same group in x over and over again. If that's ok, try by=.EACHI to run j for each group to avoid the large allocation. If you are sure you wish to proceed, rerun with allow.cartesian=TRUE. Otherwise, please search for this error message in the FAQ, Wiki, Stack Overflow and datatable-help for advice.
Tentei fazer usando o formato data.table, daí ele dá um erro também:
CadfAmerge = bancolink[fichaAlink]
Error in `[.data.table`(bancolink, fichaAlink) : When i is a data.table (or character vector), x must be keyed (i.e. sorted, and, marked as sorted) so data.table knows which columns to join to and take advantage of x being sorted. Call setkey(x,...) first, see ?setkey.
Desde já agradeço a todos,
-- Wagner S. Tassinari Departamento de Matemática Universidade Federal Rural do Rio de Janeiro. BR-465, Km 7 - Seropedica, RJ - Brasil CEP: 23890-000 Skype: wagner.tassinari wtassinari@gmail.com tassinari@ufrrj.br ------------------------------------------------------- "Statistical thinking will one day be as necessary for efficient citizenship as the ability to read and write." (H.G.Wellis) _________________________________________________ R-br mailing list R-br@listas.c3sl.ufpr.br https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.
Links: 1. http://lattes.cnpq.br/9234772336296638
participantes (4)
-
Leonardo Ferreira Fontenelle
-
Manoel Galdino
-
salah
-
Wagner Tassinari