search for: idcol

Displaying 6 results from an estimated 6 matches for "idcol".

Did you mean: icol
2019 Nov 01
3
Getting error in rbindlist
...t;) == 0]) %>% + lapply( + function(y) as.data.table(t(names(y))) %>% setnames(paste0("LC", seq_along(.))) + ) %>% + rbindlist(use.names=TRUE,fill = TRUE) + ) %>% rbindlist(use.names=TRUE,fill = TRUE) + ) %>% rbindlist(use.names=TRUE,fill = TRUE, idcol = "Item") *Error message:* Error in rbindlist(., use.names = TRUE, fill = TRUE, idcol = "Item") : attempt to set index 8424/8424 in SET_STRING_ELT In addition: There were 50 or more warnings (use warnings() to see the first 50) I am not understanding what is in SET_STRING_EL...
2019 Nov 01
0
Getting error in rbindlist
...? ? lapply( > ? ? ? ? function(y) as.data.table(t(names(y))) %>% > setnames(paste0("LC", seq_along(.))) > ? ? ? ) %>% > ? ? ? rbindlist(use.names=TRUE,fill = TRUE) > ? ) %>% rbindlist(use.names=TRUE,fill = TRUE) > ) %>% rbindlist(use.names=TRUE,fill = TRUE, idcol = "Item") > > > *Regards,* > > *Anshul Saravgi* > > Consulting > > m:?7757030307 > > <https://www.o9solutions.com/> > AI powered solutions that predict, prescribe, learn and are 100x > faster, smarter and easier to use > > > On Fri, N...
2018 May 03
1
Converting a list to a data frame
...),x=c(1:2,5:6),y=c(3:4,7:8)) >> >> Appreciate any pointers. > >Hi Kevin, > >data.table::rbindlist does exactly what you want in a very efficient >way: > >library(data.table) >dat <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) >rbindlist(dat, idcol = "type") > >Regards, >Denes > > >> >> Kevin >> > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the postin...
2018 May 02
0
Converting a list to a data frame
...t;,"A","B","B"),x=c(1:2,5:6),y=c(3:4,7:8)) > > Appreciate any pointers. Hi Kevin, data.table::rbindlist does exactly what you want in a very efficient way: library(data.table) dat <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) rbindlist(dat, idcol = "type") Regards, Denes > > Kevin >
2006 May 19
4
Fast update of a lot of records in a database?
We have a PostgreSQL table with about 400000 records in it. Using either RODBC or RdbiPgSQL, what is the fastest way to update one (or a few) column(s) in a large collection of records? Currently we're sending sql like BEGIN UPDATE table SET col1=value WHERE id=id (repeated thousands of times for different ids) COMMIT and this takes hours to complete. Surely there must be a quicker
2018 May 02
8
Converting a list to a data frame
I suspect this is pretty easy, but I'm having trouble figuring it out. Basically, I have a list of data frames such as the following example: list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) I would like to turn this into data frame where the list elements are essentially rbind'ed together and the element name becomes a new variable. For example, I would like to turn the