Hello, I have a large dataset which I receive in 5 excel files. There is a variable, lets say X, this variable appears as double in some excel files and in others it appears as string. The problem is, they change everyday, for example, Excel 1 might contain X in double format one day and the next day, it might be string. Therefore, the code tostring X, gen(strX) format(%15.0f) does not always work. Is there a way to code this so that I don't have to change the programme every time? perhaps a conditional conversion?
Related Posts with Conditional conversion to string variable
DeletedDeleted …
Quantile Regression Code: reg price treatment i.state i.year income rural [fw=round(weight)] , cluster(state) Hi I ra…
Predicting probability of a multivalued endogenous treatmentI am trying to figure out how to predict probability of participating in different treatments (or mu…
spmapDear All, I am using stata14 and trying to create maps of Bangladesh using the package spmap. I want…
Dealing with id problems in panel data Hello, I am using a person-firm-level panel data for analysis of wage differentials. But I found th…
Subscribe to:
Post Comments (Atom)
0 Response to Conditional conversion to string variable
Post a Comment