Questions tagged as 'data.table'

5
answers

How to consolidate (aggregate or group) the values in a database?

Suppose I have the following database vendas<-c(100,140,200,300,20,1000,200,3000) vendedor<-c("A","B","A","B","C","C","D","A") regiao<-c("Norte","Sul","Leste","Norte","Sul","Norte","Leste","Sul") df<-data.frame(vendedor,regiao,vend...
asked by 27.02.2014 / 02:36
1
answer

Is there a way to open a straight SQL table in a data.table without doing the SQL data.frame data.table path?

I want to open a straight SQL table in a data.table. When I query with dbGetQuery , what I get is a data.frame. I know I can later turn that data.frame into a data.table easily. But I'd like to skip this step - which on some occasions may...
asked by 19.09.2014 / 13:27
1
answer

Add row by row in a data.table in R

Is there any method that can be added row by row in a data.table in R without needing to use a 'for', so that the value of the next row in a column is the value of the previous row added with a different value for each line? Trying to solve a...
asked by 25.06.2017 / 09:03