R lapply and unique -


i have list of dataframes called test , trying lowest ranking of month per accountid using lapply , unique. current code looks this, throwing error. causing problem?

test_1 <- lapply(test, function(x) unique(x[,list(x$ranking =  min(x$ranking), x$month), = x$accountid])) 

when working 1 datatable (one datable 1 month), code below worked fine.

best_rank_mar <-  unique(rank_mar[,list(ranking=min(ranking), month), = accountid]) 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -