Announcement

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

  • How to import of variable labels and notes from spreadsheet?

    I have a spreadsheet of 30K gene expression measurements over a bunch of subjects.
    I want to import this data with 30K variable labels and 30K variable notes.
    But there's no option to do that. It understands subject labels as a specified column, but not variable labels and notes as specified rows.
    Seems like a pretty major oversight.
    I understand there's a hard way to do it (programmatically).
    Can somebody please provide template code for that?
    While I pray they fix this in version 19.
    Thank you!



  • #2
    There is probably not enough information here to provide useful advice let alone code. It is not even clear whether the "spreadsheet" is an Excel file, a csv-file, or something else. It is also not clear how it is set up. What do rows represent? What do columns represent? Which rows and columns contain which information in which format? How is the resulting dataset supposed to look like?

    More generally speaking, what is important to you might not be as important for 90+ percent of other Stata users. Spreadsheet-like thinking and approaches have never been the focus of Stata. Given limited resources, I can think of many features I would like to see implemented before what you suggest, especially since what you want is probably easy to program and perhaps has already been programmed.
    Last edited by daniel klein; 18 Jan 2024, 12:37.

    Comment


    • #3
      Originally posted by daniel klein View Post
      There is probably not enough information here to provide useful advice let alone code. It is not even clear whether the "spreadsheet" is an Excel file, a csv-file, or something else. It is also not clear how it is set up. What do rows represent? What do columns represent? Which rows and columns contain which information in which format? How is the resulting dataset supposed to look like?

      More generally speaking, what is important to you might not be as important for 90+ percent of other Stata users. Spreadsheet-like thinking and approaches have never been the focus of Stata. Given limited resources, I can think of many features I would like to see implemented before what you suggest, especially since what you want is probably easy to program and perhaps has already been programmed.
      Well, I did pay the extra $1000 to be able to have tens of thousands of variables. So, that kind of users must be considered typical. I mean otherwise why make versions available with that many variables if such users are not the focus? Was it just to get my $1000 and then forget about me?

      You can click a checkbox to say the first column are subject ID's but you can't do that for rows? It can't possibly be that hard...


      Comment


      • #4
        As far as I can tell, which is not much, your problem has little to do with the number of variables. Your problem has to do with a spreadsheet format (and a point-and-click approach) that would probably not be considered typical by most Stata users; otherwise, StataCorp would probably have implemented what you ask for.

        Complaining about what Stata should do and how in several threads simultaneously is not going to solve your problem. If you provide information, we might able to move this into a more productive direction.

        Comment


        • #5
          A small example of (say) the first 10 lines of your data as they exist in Excel would help a lot. (A selection of 5-10 columns would likely be fine.) Given that most of us won't open an Excel file in this environment, I'd recommend that you save those 10 lines or so as a CSV file and paste it into a message. Like Daniel, I'm uncertain about exactly what your data layout is here, but there's a good chance that there's a reasonable way to handle it. Having variable labels and data in the same file is pretty unusual, but I think I recall seeing ways to work with similar raw data layouts before.

          Comment

          Working...
          X