0

As the title says, I'm not a programmer. I've tried R before, got very confused and abandoned it. I'm a physician, and I do all my statistics either with SPSS or Excel. I'd like to learn some coding for when I get into problems like this:

I have an ascii file that I'd like to extract data from. The fields are contained within columns of variable width. 90% of the file is useless to me. For example, the fields I'm interested in extracting are encoded in columns 00645-00649, 03315-03319, etc. I'd like to get this into a format so I can run stats in SPSS/Excel. Should I be looking to use R, Python, something else or am I totally beyond hope?

Thanks in advance.

Matt
  • 7,255
  • 2
  • 12
  • 34
  • There's not enough info here to provide an answer, it's not clear what the input data is (I think "ascii" is not the actual format because it's not a file format) or what the expected parsed data should be. But generally, you'll need to either learn a programming language OR hire someone to code this for you. Both of which though is not on-topic here. – Gino Mempin Apr 14 '20 at 00:36
  • 2
    If you mean that you have a `.txt` or `.csv` file, you can probably open it in SPSS by using `File > Open > Data` and then change `Files of type` to text. This can also be done in R very easily, but it seems like you have some experience using SPSS. – Matt Apr 14 '20 at 13:31

1 Answers1

0

It's impossible to say for certain given only the information here, but the DATA LIST command in SPSS may well allow you to read the data into SPSS directly from the current file. If you can specify the column locations of the desired variables, you can specify those on that command, and SPSS will simply skip over the unnamed columns.

David Nichols
  • 576
  • 3
  • 5