在Stata中拆分样本

时间:2015-11-30 20:01:53

标签: stata

我有一个包含3100个值的变量X. 我需要将X分成变量Y和Z.Y包含1500个X和Z的第一个值,其中包含X的其余部分。 我不确定它是否适用于

set projectName1 to "test1"
set projectName2 to "test2"
set projectName3 to "test3"
set SearchWord1 to "Myword1"
set SearchWord2 to "Myword2"

tell application "Mail"
set allMessage to every message of inbox whose (subject contains projectName1) or (subject contains projectName2) or (subject contains projectName3) or (subject contains SearchWord1) or (subject contains SearchWord2)
repeat with MyMessage in allMessage
    set read status of MyMessage to true -- set read
    set flagged status of MyMessage to true -- display flag / false hide flag
    set flag index of MyMessage to 1 -- set first color for the flag (-1 remove the flag)
end repeat
end tell

或任何其他代码

1 个答案:

答案 0 :(得分:1)

你尝试过吗?

split用于分割字符串并根据其内容将它们分成几部分。

如果您愿意,您似乎需要separate X, by(_n <= 1500)之类的内容,然后重命名。两个generate语句也可以正常工作。