Em 11 de dezembro de 2016, Jack escreveu:
On Sun, 11 Dec 2016, Henrique Andrade wrote:
> (...)
One more thing: it would be great if we could have a function like this to
> count the number of occurrences of a determined string. Something like
> this:
>
> string S = "I like Gretl because Gretl is great and Gretl is complete"
> scalar N = strscrapec(S, "Gretl") # strscrapc; String scrape counter
> # result: N = 3
>
I don't like very much this either. If you need this sort of things
regularly, then use python. IMO hansl should stay focused on
statistics/econometrics. I can't really see a point in chasing python or
Julia on the data mining field. But I'm open to changing my mind.
I'm a little bit confused now. Following your stream of thought, where is
the econometrics/statistics in the following code?
<hansl>
string s="Here is some text 1.5e-4with embedded 12345 numbers \
stuck int0 1t."
matrix vals = strscrape(s)
print vals
</hansl>
But it is ok, the question is just rhetorical. It was just a suggestion.
Best,
Henrique Andrade