Announcement

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

  • Variable names not found in data viewer or editor

    When I open the data editor in Stata and search a variable name, it always returns "not found." Including for variable names that I am looking at and know are in the dataset, are not being misspelled, wrong case, etc (see attached screenshot search for "survey"). I've also tried adding and removing leading and trailing spaces, but this doesn't help. This happens in both "editor" and "viewer" mode. This makes it difficult to find variables in datasets with many variables, any idea how to fix this or what I might be doing wrong? Thanks!
    Attached Files

  • #2
    please follow the advice in the FAQ and supply a -dataex- example of real(istic) data for at least a few observations

    Comment


    • #3
      You seem to be searching in the wrong place. When you search in that box, it is looking for values of variables, not variable names.

      In the data editor, look at the pane called Variables. You should see another search box at the bottom of that. That's where you can search for variable names.

      Comment


      • #4
        Thank you, Hemanshu Kumar, that's helpful! I do see the Variables pane and search button at the bottom of that, but it doesn't seem to help me navigate to that variable within the data viewer. Maybe that's not functionality that's there? I have over 600 variables, so I'm just trying to find a way to navigate more easily to specific ones within the Data Viewer.

        Comment


        • #5
          In the list of variables in that pane, select all variables (e.g. using ⌘A on a Mac), then right-click and select "Hide selected variables". Now use the search box below to type the name of the variable you're interested in. When it shows up in the list, put a check on the box next to it, and it will show up in the data editor.

          Comment


          • #6
            Hemanshu Kumar, thank you, that works!

            Comment


            • #7
              I almost always browse only the variables of interest, often using a "wildcard" designation, and perhaps this practice might be useful here:
              Code:
              browse ThisVar ThatVar MyVar*
              I might also precede this with various -describe- commands, usually with a similarly abbreviated variable list, so as to let me know what's there. I don't think of the data editor as a useful venue for finding variables.

              Comment

              Working...
              X