I am trying to read some data from the Roper Center into R to do some analysis with it. The older data sometimes comes in only ASCII format, it is just a data file of numbers, sometimes with no spaces or delimiters. Also every person has several rows. Here is an example
0001 01 06722121 101632 3113581R50106 050110M323
0001 0202089917300208991744 100154109020B73013.22 1O
0001 039049MON FEB 8 1999 05:30pm 1 8 0208991830 6:30PM 05071
0001 04 5 51
0001 052206 32 1 21 111
0001 06 1122223413323 1122160921080711122112 11
0001 0722221205111223241121212220612111111122 21 2222
0002 01 09318035 001582 2123551R00106 0501I333
0002 0202089917320208991746 50074616080B42014.20 1O
0002 039039MON FEB 8 1999 05:31pm 1 8 0208991831 6:31PM 05041
0002 04 2 61
0002 05 206 32 3 11 121
0002 06 1245545554555 1152080614031221121131 11
0002 0752321202112112322112434410722131242122 21 122222
I changed some numbers in there, hopefully I didn't mess it up but I think you need a subscription to the Roper Center to get this data.
I need to extract several elements for each respondent and put them into columns. Ill be doing this many times so code that only works for this case is not practical.
I have been using the package readr in R so far, but now that there are many rows per person its becoming more complicated and I wondered if anyone knew of a fast way to handle this with a R package or simple function.
A good example would be to get all of the weights in this sample. Those occur in columns 13-15 and are found in the first row for each person.