1

I just noticed that I now have to explicitly state FALSE when using such functions as read.csv or setting printFlag to FALSE in mice. Is this an update to RStudio or just a bug?

Sample:

read.csv(text="1,S0006,C000124,12Jan2017,179,7296
2,S0002,C000124,26Feb2017,109,7941
         3,S0008,C000124,22Feb2017,190,4511
         4,S0006,C000124,03Jan2017,150,7296
         5,S0005,C000124,08Feb2017,120,5812
         6,S0003,C000124,26Apr2017,46,7512",header=F)

fails with:

Error in !header : invalid argument type which can then be fixed by setting header=FALSE

RStudio: $version
[1] ‘1.1.463’
R: 3.5.3RC
Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
NelsonGon
  • 13,015
  • 7
  • 27
  • 57

1 Answers1

5

I can almost replicate this (not quite the same error message) by assigning a character value to F:

F <- "abc"
read.csv(text="1,S0006,C000124,12Jan2017,179,7296
    2,S0002,C000124,26Feb2017,109,7941
          3,S0008,C000124,22Feb2017,190,4511
          4,S0006,C000124,03Jan2017,150,7296
          5,S0005,C000124,08Feb2017,120,5812
          6,S0003,C000124,26Apr2017,46,7512",header=F)

Error in !header : invalid argument type

using FALSE instead of F is a good idea (for precisely this reason); you could also try rm(F) and see if that allows your original code to work.

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
  • 1
    I'm guessing that this probably exactly replicates the error; but OP forgot to insert a line break in the question between this message and the following words. – dww Apr 10 '19 at 12:48