Maybe not a good idea, but this should work:
content <- scan('filepath','character',sep='~')
The idea is to read the entire file, get each of the 60 characters in one record, write it to the temp file and read the data from this temporary file before deleting the temporary file.
Another approach can be done with regular expressions and the stringr package (still with the content obtained from the verification above):
library(stringr) d <- data.frame( str_match_all( content, "(.{8})(.{4})(.{7})(.{41})")[[1]][,2:5], stringsAsFactors=FALSE)
which gives:
V1 V2 V3 V4 1 20141101 77h 3.210 0 3 2 20141102 76h 3.090 0 3
str_match_all return the list, here with 1 element, because there is only one line, so we delete it with [[1]] .
Now 5 columns are returned, the first of which is complete, the others by capture groups, so we multiply the matrix on columns 2 through 5 to get only 4 columns that we need, and wrap them in as.data.frame to get data .frame at the end.
you can then name the columns with colnames(d) <- c('date','time','data_point','rest')
If you want to clear spaces, you can wrap the result of str_extract_all in trimws (thanks @jaap for reminding me of this function) as follows:
td <- data.frame( trimws( str_match_all( content, "(.{8})(.{4})(.{7})(.{41})")[[1]][,2:5] ), stringsAsFactors=FALSE)
Output:
X1 X2 X3 X4 1 20141101 77h 3.210 0 3 2 20141102 76h 3.090 0 3