Git Product home page Git Product logo

Comments (1)

luispfonseca avatar luispfonseca commented on August 10, 2024 2

join seems to require that key variables are of the same generic type. Is this related to the hashing algorithm? It seems to be fine with both being strings or both being numeric but not one of each.

Minimal example:

* generate data
clear

* master dataset
set seed 09092019
set obs 10
gen string_id = "A"
replace string_id = "B" if _n > 5
gen number_id = int(runiform() * 2)
save temp_master_dataset, replace

* using dataset
duplicates drop
gen usingvar = "BLA" * (number_id + 1)
tostring number_id, gen(number_id_tostring)
save temp_using_dataset, replace

use master, clear
* error when joining
join, from(temp_using_dataset) by(string_id number_id)

* case with no error when using only strings
tostring number_id, gen(number_id_tostring)
join usingvar, from(temp_using_dataset) by(string_id number_id_tostring)

Thank you for the package!

from ftools.

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.