I'm working with a data matrix I received from a colleague who no longer works in our research group. The numbers are gene expression values. When I read the data.frame using R, numbers look like this: 715.583.892.852.256, 85.363.547.324.901. I don't know why they look like that. Expected numbers are: 715.5, 85.3. Can anyone explain to me why they appear like that? How can I trim the original numbers in order to obtain the desired ones?
Thanks in advance
Here is a brute force way:
x <- c("715.583.892.852.256", "85.363.547.324.901") as.numeric( sapply( strsplit(x, "\\."), function(x)paste(x, paste(x[-1], collapse = ""), sep = ".") ) )
 715.58389 85.36355