Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    $\begingroup$ try Map[FromDigits, StringSplit[StringData[[All, 2]], ","], {-1}]? $\endgroup$ Commented Aug 30, 2019 at 20:42
  • $\begingroup$ Thank you very much! I will test your method. In addition I add one small question in the end. Seems Internal`StringToDouble does not work with with a lists containing large number but fine with one single string. Do you know why?@kglr $\endgroup$ Commented Aug 30, 2019 at 21:00
  • $\begingroup$ Map[FromDigits, StringSplit[StringData[[All, 2]], ","], {-1}] works good. Is it possible works with string list with negitave number such as "-1" and so on? @kglr $\endgroup$ Commented Aug 30, 2019 at 21:07
  • 2
    $\begingroup$ because Internal`StringToDouble does not have the Listable attribute. You can make listable version using istd = Internal`StringToDouble; SetAttributes[istd, Listable] $\endgroup$ Commented Aug 30, 2019 at 21:08
  • 1
    $\begingroup$ @kglr that's an interesting subtlety to Listable... I hadn't realized it would take precedence over evaluating to Internal`StringToDouble. I assumed the Head would evaluate, then any Attributes would apply but I suppose it's the other way around? $\endgroup$ Commented Aug 30, 2019 at 21:17