Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Documentation for non existent function

    I was learning string functions in Stata. After obtaining help using help string functions command, one thing that particularly caught my attention was the strcat(s1,s2​​​) function which according to the description doesn't exist.
    This is what the help documentation says.
    strcat(s1,s2​​​​​)
    Domain s1: strings
    Domain s2: strings
    Range: strings
    Description: There is no strcat()function. ...............
    • ​​Why would Stata include help for a function that doesn't exist because I believe there are many other instances of operations which Stata doesn't have a command or functions for? What exactly was the motivation behind this?
    • Do I also expect similar documentations for other Stata commands and functions because I am still a newbie in Stata?
    Regards.
    MJ

  • #2
    My guess: this documentation entry exists because there are grounds for thinking that some users expect that the function could or should exist in Stata. Specifically, a quick search shows such a function in C, C++, MATLAB, ....

    Many Stata users come to Stata with a strong background in other software.

    Comment


    • #3
      Psychology/behavioural economics research has shown that people tend to overestimate how much others are agreed with them, and how much others are similar to them.

      For what I understand Stata's core is compiled in C, hence Stata developers are probably experts in C, hence Stata developers probably think that we are all experts in C. And this function exists in C (and many other languages including Matlab/Octave and Excel).

      So my guess regarding this peculiar entry in the help is that Stata developers thought that we would be looking for this function, as Nick said, but more importantly, they are also telling us how to achieve this task in Stata. As the full entry goes:

      strcat(s1,s2)
      Description: there is no strcat() function; instead the addition operator is used to concatenate strings

      "hello " + "world" = "hello world"
      "a" + "b" = "ab"
      "Café " + "de Flore" = "Café de Flore"
      Domain s1: strings
      Domain s2: strings
      Range: strings

      Comment

      Working...
      X