poojatya / USA-COVID-state-level-air-pollution-SARIMA-analysis

MIT License
0 stars 2 forks source link

Error in data.table syntax #1

Open mbsabath opened 3 years ago

mbsabath commented 3 years ago

found an error in your data.table syntax here: https://github.com/NSAPH/USA-COVID-state-level-air-pollution-SARIMA-analysis/blob/main/Rcode_NO2_figure1.R#L114

If you're trying to just select columns in data.table, the correct syntax would be dt[, .(col1, col2, col3)]. There's definitely some other places where this error exists.

daniellebraun commented 3 years ago

i got same error, but @poojatya mentioned its related to version of data table

mbsabath commented 3 years ago

I tried with data.table version 1.12.8 (matching the version in the session info I was sent) and I'm still getting the same data.table syntax error. I think this is from a broader issue of mixing data.table and tidyverse syntax + methods in a single script. I think with some minor rewrites this code should run, but as it's currently written it definitely doesn't work.

daniellebraun commented 3 years ago

hi @poojatya let us know how to proceed, do you want to give the rewrite a try? or @mbsabath or I can try to help? or do you have any other suggestions?