0

Am trying to export a table into a csv file using data.table::fwrite()

However I get the following issue when am using the command

library(data.table)
fwrite(DT, "location")
Error: could not find function "fwrite"

I had installed data.table like this

install.packages("data.table")

Am I missing something here?

Frank
  • 66,179
  • 8
  • 96
  • 180
Hardik Gupta
  • 4,700
  • 9
  • 41
  • 83
  • Did you load `data.table`? `library(data.table)`. Also, `fwrite` is pretty new. I think it was introduced in version 1.9.8 or 1.10.0. The newest version on CRAN is 1.10.4. If you are using MS R open, then you have to specify the repository, as it will use an archive for when that version of R was released. – lmo Mar 02 '17 at 13:31
  • can you help me with the syntax? – Hardik Gupta Mar 02 '17 at 13:38
  • I have 1.9.6, how can I install the new one – Hardik Gupta Mar 02 '17 at 13:40
  • Yes MS R open.. – Hardik Gupta Mar 02 '17 at 13:40
  • Try `install.packages("data.table", repos="https://mran.revolutionanalytics.com/snapshot/2017-03-01/")`. Note that if you are not using maintenance versions 3.1.3 or 3.2.5, you might be better off updating your version of MS R open to 3.3.2. – lmo Mar 02 '17 at 13:42
  • is it any different with this `install.packages("data.table", type = "source", repos = "http://Rdatatable.github.io/data.table")` – Hardik Gupta Mar 02 '17 at 13:43

0 Answers0