0

I'm using the code: setDT(data)[ ,.SD[which.min(Julian_Day)],.(species,year)] to make a subset of my data set and have to include the library(data.table) which I made sure to install but I keep getting and error message:

Error in eval(expr, envir, enclos) : could not find function "."

I've used this before in the past with no problem so I'm not sure what's going on.

Thanks in advance!

Jon Kiparsky
  • 7,499
  • 2
  • 23
  • 38
John
  • 59
  • 1
  • 9
  • I think the `.` has only been a recent addition - are you using the most up-to-date development version of `data.table` ? – thelatemail Mar 23 '15 at 00:35
  • I have 1.9.2 installed and the repository version is 1.9.2 if that's what you mean – John Mar 23 '15 at 00:43
  • Current version for github is 1.9.4 furthermore that repos says it has been for 6 months "v1.9.4 on CRAN, released 2nd Oct 2014." – IRTFM Mar 23 '15 at 01:37
  • How can I get the newest version? I've just been going to install packages at the top and loading whatever they suggest... – John Mar 23 '15 at 01:42
  • `devtools::install_github("Rdatatable/data.table", build_vignettes = FALSE)` – Tad Dallas Mar 23 '15 at 03:22
  • Trying the above I got: ERROR: compilation failed for package ‘data.table’ * removing ‘/Users/natalyamaitz/Library/R/3.1/library/data.table’ Error: Command failed (1) – John Mar 23 '15 at 03:43
  • Great answers for the duplicate question at http://stackoverflow.com/questions/7027288/error-could-not-find-function-in-r – WebComer Nov 23 '15 at 13:23

0 Answers0