here is the data.txt:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 2280 728 ? Ss 20:44 0:00 init [2]
root 2 0.0 0.0 0 0 ? S 20:44 0:00 [kthreadd]
root 202 0.0 0.0 0 0 ? S< 20:44 0:00 [ext4-dio-unwri
root 334 0.0 0.1 2916 1452 ? Ss 20:44 0:00 udevd --daemon
how to read the data into a data.frame?
1.can not to decide separator
the last field is a problem,space
can not be the separator,
init [2] ,udevd --daemon are the one field,can not be separated by space
.
2.no fixed width
every line has different width.
so ,how can i read the data.txt into a data.frame?