Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: reading csv huge number as string #402
    seanpor
    Member

    add the parameter colClasses=’character’ and *all* columns will stay in character format – this is what I do… then I validate each column and convert each with the appropriate validation.

    alternatively you could say something like

    df <- read.csv(infile, sep=",",header=T, colClasses= c('character', rep.int('numeric', 14) ) ) so the first column will be read in as character then the rest of them will be read in as numeric. Sean

Viewing 1 post (of 1 total)
Scroll to top
Privacy Policy