Hi. im trying to replace observations of a string variable from another string variable (Both the string variable contains data from multi select questions. Even though both the variables are string i get a message 0 real changes made.
The code im trying to run is replace var1 = var2 if var1 == "."
The data looks like below,
var 1
1 2 3
.
6 2 1
.
var 2
.
4 5 6
.
4 2 1
I would want a variable that looks like,
var1
1 2 3
4 5 6
6 2 1
4 2 1
Related Posts with Replacing String variables with another string variable. (String variables contain data from multi select questions)
Panel count data with repeated measurements per day, per groupHi I have a data set I could use some input on how best to analyze. Its a hierarchical data with an…
Generate vars with conditions inside a loopHi, I have a question, why the next sintaxis(with conditions) is not possible? foreach i of numlis…
CTRL+F in browse mode not working properlyHi all, I am using a dataset with Greek characters. I've noticed that when I do a ctrl+f in browse …
failure to run programDear Stata Forum members, I made a program like this: cap program drop sampletps program define sa…
Summarize for second level onlyDear all, I would like to ask you wheter it is possible to get information (mainly about number of …
Subscribe to:
Post Comments (Atom)
0 Response to Replacing String variables with another string variable. (String variables contain data from multi select questions)
Post a Comment