rethomics / damr

Read TriKinetics' DAM data in R
http://rethomics.github.io
6 stars 7 forks source link

load_dam failure: column or expression 1 of 'by' or 'keyby' is type list... #20

Closed alvarovegahd closed 5 years ago

alvarovegahd commented 5 years ago

I am following the tutorial and am receiving an error:

library(damr)
DATA_DIR<-"/home/damr_tutorial"
setwd(DATA_DIR)
list.files()
metadata <- fread("metadata.csv")
metadata
metadata_linked <- link_dam_metadata(metadata, result_dir = DATA_DIR)
metadata_linked
dt <- load_dam(metadata)

Everything works well until load_dam, which gives me this error:

Error in `[.data.table`(q, , .(regions = list(region_id)), by = c("path",  : 
  column or expression 1 of 'by' or 'keyby' is type list. Do not quote column names. Usage: DT[,sum(colC),by=list(colA,month(colB))]

What do you guys think I am doing wrong?

alvarovegahd commented 5 years ago

Update: I had to do dt <- load_dam(metadata_linked) instead. Sorry guys. Nothing to see here.

qgeissmann commented 5 years ago

No problem, glad you figured it out :+1: