1

lintr throws error while using data.table functions like .SD, .SDcols, e.g:

/path/readData.R:130:29: warning: no visible binding for global variable ‘.SD’, Did you mean 'SSD'?
      DT[, "row.sum" := rowSums(.SD), .SDcols =  names(DT)]
                                ^~~

How can I fix this?

Taz
  • 5,755
  • 6
  • 26
  • 63

1 Answers1

3

Add linters: with_defaults(object_usage_linter = NULL) to your .lintr file.

mlevy
  • 315
  • 2
  • 12