0

How to use the index and substr funtions that are used in SAS to do it in R. See below codes given in SAS

if index(number,'%75') then do;
    i=0;
    do while(index(number,'%75') > 0);
      i+1;
      pos=index(number,'%75');
      val=input(substr(number,_pos+3,2), $hex2.);
      substr(number, _pos,3)='^^^';
      substr(number, _pos+3,2)='^'||_val;
    end;

    number=transtrn(number,'^^^^',trimn(''));
    number=transtrn(number,'^^^',trimn('%75'));
end;
suresh
  • 33
  • 5
  • 1
    Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – zx8754 May 02 '16 at 10:16
  • Please provide input and expected output, instead of SAS code. – zx8754 May 02 '16 at 10:16

0 Answers0