Hi,
probably a very simple issue to fix but I am strugling to solve:
I have a txt numeric table with column header.
identical(
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'numeric'),
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'numeric'))
return FALSE most of the time
while
identical(
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'character'),
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'character'))
return always TRUE
On the other hand base read.table() does not have this issue (but it's way slower).
I would prefere to avoid loading the table as character to coerce it to numeric later (because of speed, otherwise I would have used read.table).
Any suggestion on how to read the same file twice and obtain identical objects (and why this is happening)?
Thank you in advance for help,
Luigi
Hi,
probably a very simple issue to fix but I am strugling to solve:
I have a txt numeric table with column header.
identical(
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'numeric'),
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'numeric'))
return FALSE most of the time
while
identical(
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'character'),
data.table::fread(fileName,sep='\t',header = T,check.names = F,colClasses = 'character'))
return always TRUE
On the other hand base read.table() does not have this issue (but it's way slower).
I would prefere to avoid loading the table as character to coerce it to numeric later (because of speed, otherwise I would have used read.table).
Any suggestion on how to read the same file twice and obtain identical objects (and why this is happening)?
Thank you in advance for help,
Luigi