AWK: row number NR

Hi

I've file1 as:

after I read all rows with awk, I need to change some of them.
I mean, for example if the last row is zero then change row number 4 in zero too.
So I'd like to refers each row as a vector and change its value accordly some conditions. I know that NR keep just the "current" row value.
Is there a way to refers to a specific row ?

thanks

D.

awk '{arr[FNR]=$0}
       END { if (arr[4]=something) { arr[4]=somethingelse}
                for (i=1;i<FNR; i++){print arr}' infile > outfile

FNR is NR for a given file; NR totals all records from all input files.

Hi jim

thanks a lot for the fast answ. It works.
D.