添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
沉着的投影仪  ·  PostgreSQL: 文档: 17: ...·  4 周前    · 
捣蛋的骆驼  ·  计算学部·  1 月前    · 
含蓄的火腿肠  ·  java 单线程定时运行 ...·  11 月前    · 
Dear all,
I have a very simple do-file with a few commands. When running this do-file as a whole everything seems to be going fine: all commands run smoothly and the output I get is the one I expect. Yet, when checking my data, I see that some commands, like replace, have not been really executed.
When I run the do-file with (among others) these commands:
list EnumID VilID HHID ID_entrant aq1 if EnumID == 5 & HHID == 22
replace HHID = 2 if EnumID == 5 & HHID == 22 & aq1 == "BUTYOKA"
list EnumID VilID HHID aq1 ID_entrant if EnumID == 5 & HHID == 2

Then I get the following response
which seems fine.
Yet, when I then copy paste the following line from my do-file into the command box
list EnumID VilID HHID aq1 ID_entrant if EnumID == 5 & HHID == 2
then I get the following response, which is indicating that my data were not really changed...
Can anybody explain what is the problem here? What am I doing wrong? I have added my log file as an attachment.
Thank you,
Kewan Mertens Attached Files I don't see your last command in your log file (launch the do-file without the log close, then run the command line directly from the command box, and then close log from command box).
I'd like to see whether the two outputs really comes from the same dataset.
Actually, the data seems to be manipulated beetween the two command you wrote, as the position (line of observation) changes from 142 to 97...
Code:
. list EnumID VilID HHID aq1 if EnumID == 1 & HHID == 21
     +------------------------------------+
     | EnumID   VilID   HHID          aq1 |
     |------------------------------------|
 21. |      1      22     21   BUGHENDERO |
 23. |      1      24     21     BUTHONYO |
     +------------------------------------+
. list EnumID VilID HHID ID_entrant aq1 if EnumID == 5 & HHID == 2
     +--------------------------------------------+
     | EnumID   VilID   HHID   ID_ent~t       aq1 |
     |--------------------------------------------|
142. |      5       2      2         26   BUTYOKA |
     +--------------------------------------------+
. replace  HHID = 2 if EnumID == 5 & HHID == 22 & aq1 == "BUTYOKA"
(1 real change made)
. list EnumID VilID HHID aq1 ID_entrant if EnumID == 5 & HHID == 2
     +--------------------------------------------+
     | EnumID   VilID   HHID       aq1   ID_ent~t |
     |--------------------------------------------|
142. |      5       2      2   BUTYOKA         26 |
143. |      5       2      2   BUTYOKA         27 |
     +--------------------------------------------+
At first glance (and without seeing all your data), the results are possible. The first list refers to HHID == 21, whereas your replace command refers to HHID == 22. What precisely are you trying to achieve?
Dear Stephen and Charlie,
Thank you for your fast reply. I apologize for the lack of clarity. The problem has been solved by one of my colleagues though. The problem was that somewhere in my do-file I had 'preserve' without it being followed by 'restore', so all changes being made after this 'preserve' were not kept (even if I saved the file after the changes).
Thank you,
Kind regards
Kewan Mertens