首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >斯塔塔:如何重复观察?

斯塔塔:如何重复观察?
EN

Stack Overflow用户
提问于 2014-06-16 18:47:35
回答 1查看 1.6K关注 0票数 0

我有一系列的交易,每一个都表明购买了多少单位。例如,我有

  • 芽轻3单位每盎司30美分
  • 米勒轻型2台,每盎司23美分

我想复制3次花蕾灯和2次米勒灯:

  • 芽轻1单位每盎司30美分
  • 芽轻1单位每盎司30美分
  • 芽轻1单位每盎司30美分
  • 米勒轻型1单位,每盎司23美分
  • 米勒轻型1单位,每盎司23美分

换句话说,我需要像我的专栏中所指出的那样,创建相同数量的单个采购条目。

我怎么能这么做?感谢你的任何投入。

EN

回答 1

Stack Overflow用户

发布于 2016-03-21 16:48:14

有一个命令正是这样做的。

看看expand

描述

代码语言:javascript
复制
expand replaces each observation in the dataset with n copies of the observation, where n is equal to the
required expression rounded to the nearest integer.  If the expression is less than 1 or equal to missing,
it is interpreted as if it were 1, and the observation is retained but not duplicated.
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24250192

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档