Giter VIP home page Giter VIP logo

Comments (4)

mcaceresb avatar mcaceresb commented on July 21, 2024

@fredericky123 The current limitation of the Stata plugin API is that I can read strL variables in version 14.1 and later, but I cannot write strL variables at all, so I cannot support it.

You can try to coalesce strL variables into fixed length if that's feasible. You can also try to encode the strL variable and merge it back later (I believe gegen shoud be able to do that correctly; if you're on 16+ then you can use frames and that might not be so slow, but I haven't benchmarked it).

from stata-gtools.

fredericky123 avatar fredericky123 commented on July 21, 2024

Thanks a ton! @mcaceresb I see, strL variables can be read while not written. Just a thought, if greshape can be integrated with frames, that will be great since you said it might not be slow.

from stata-gtools.

mcaceresb avatar mcaceresb commented on July 21, 2024

@fredericky123 You can code it up as needed. I'm not sure what the general use case is, but encoding, copying the unique levels to a frame, reshaping, then merge (frlink/frget I think are the commands?) on the encoded variable. Something like this maybe?

gegen id = group(strLvar)
frame put id strLvar, into(tmp)
frame tmp: gduplicates drop
greshape ..., by(id ...) ...
frlink m:1 id , frame(tmp)
frget strLvar, from(tmp)

I don't know that I'd add it as a generic option (certainly not in the near future). There's also no way to interact with frames from the plugin, so the code I'd write would just be generic helper code like the pseudo-code snippet above.

from stata-gtools.

fredericky123 avatar fredericky123 commented on July 21, 2024

I see. Thanks a ton!

from stata-gtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.