0

I want to read data and specify the data type at the beginning.

I have csv data look like this, it's data type is "character":

  • Id
  • "76561198042769362 "
  • "76561198049454009 "
  • "76561198066403163 "
  • "76561198079071374 "

And when I read data, it gives me this:

f<-read.csv('community_friendship.csv')
  • ID
  • 1 7.65612e+16
  • 2 7.65612e+16
  • 3 7.65612e+16
  • 4 7.65612e+16
  • 5 7.65612e+16

I try to transform it back to character, however, it round the origin data so I can not have people's real ID

as.character(f)
  • ID
  • "76561198042769360"
  • "76561198049454016"
  • "76561198066403168"
  • "76561198079071376"
  • "76561198083602880"

Do anyone know how to read origin data without transform data type?

S.F. Yeh
  • 61
  • 10

0 Answers0