0
$\begingroup$

I have a string of measurements--mostly numbers, but occasionally an NA. Right now Mathematica is reading it all as text, so I'm using

Read[StringToStream[#], Number] & /@ z;

to convert to a number string, where z is the string.

Is there a way to skip the NA whenever it appears?

Edit: the numbers are all in scientific notation (2.00E-07)

Sample string:

{NA,NA,NA,2.05E-08,2.07E-06,3.45E-09,7.52E-07,NA,NA...}
$\endgroup$
  • $\begingroup$ Can you post a sample string? $\endgroup$ – David Keith Jan 23 at 20:08
  • 1
    $\begingroup$ Why not just remove the NA afterwards, DeleteCases[z, NA]? $\endgroup$ – C. E. Jan 23 at 20:35
  • $\begingroup$ You sample string is not a string. Please put some effort in that :) $\endgroup$ – Kuba Jan 24 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.