Hi everyone,
I have a string var and I would like to split that var to get the last part of the string text, say the string var has dataset as below:
name
adam smith
julia jig
beffy mark
And I want to get the last part of this dataset, which is "smith", "jig" and "mark'.
I have tried to use the command as below but it does not work:
-- egen newvar=ends(name) trim[last]
Could anyone help me to sold this issue. Sorry if this question is a basic one. I've searched on google but I cannot find the solution yet.
Thank you a lot
Kind regards
Linh
Related Posts with Split string variable
fillin (a question on Twitter)https://twitter.com/johannesmboehm/s...48146396504064 raised a question about fillin. As tweets may …
Demeaning and standardizing variables in panel regressionHello everyone, I am analyzing a panel data set with 55 countries. My dependent variable is firm eq…
How to get the start and end round of each user?Hi all, I need your help. I have a dataset with two variables: - Username - Round: Ordinal number o…
Pooled OLS, fixed & random effects: Panel DataHey everyone, (Data description is posted in the buttom) I'm currently writing by bachelor at Copenh…
Looping regression to determine one set of control variables that make models significantHi everyone, I have one dependent variable Y, four independent variables X1 X2 X3 X4, 12 control va…
Subscribe to:
Post Comments (Atom)
0 Response to Split string variable
Post a Comment