如何按组为案例分配值
这是我正在使用的数据示例:
这是将数据分配到不同的文件中,一个由组划分为2个元素,而anothe anothe anothe anothe则具有3个元素,由3个元素
在列检查中,我想按组来掩盖此代码(组变量是代码,区域,地板和框)。
对于每个组组合:
如果结果= 1,则情况= 1,另一个情况= 4,检查= 1 to case = 4,检查= 2 = 2 to结果= 1
如果结果= 1,则在一个情况下= 1,另一个情况= 1 3,检查= 1 to case = 3,检查= 2 = 2 = 1
如果结果= 1,则在一个情况下= 1,另一个情况= 1 1,检查= 1个情况,另一个检查= 2。
如何通过每个情况组对检查变量进行调整以在此图像中获得结果?
然后,我有每个组的案例:
https://i.sstatic.net/2migx.png“ alt =“在此处输入图像描述”>
对于每个组组合:
如果结果= 1,则一个情况和其他两个都有结果= 4和结果= 4,检查= 1至第一个情况,结果= 4,第二个情况= 4 asign检查= 0,检查= 2 = 2 = 1 = 1
如果结果= 1在一个情况下,另外两个的结果= 4,结果= 0,检查结果= 1,结果= 4,检查= 0 to case = 0,结果= 0,检查= 2至结果= 1
- < p>如果结果= 1,在所有情况下,在其中一种情况下进行检查= 1,而另一个情况下的检查= 2,那么我们在下面的图像上看到的
我该如何做到这一点?
This is sample of data I am working with:
Here is the data splited into different files, one for 2 elements by group and anothe one with 3 elements by group
https://drive.google.com/drive/folders/13NcZ1eDRz7RfPIV0w-bOsF6kS1ePSQ9j?usp=sharing
In the column inspection I want to assing this codes by group (group variables are Code, Area, Floor and Box).
For each group combination:
If result=1 in one the cases and the other has result=4, inspection=1 to case with result=4 and inspection=2 to result=1
If result=1 in one the cases and the other has result=3, inspection=1 to case with result=3 and inspection=2 to result=1
If result=1 in one the cases and the other has result=1, inspection=1 one of the cases and to the other inspection=2.
How can I make this adjustment to inspection variable by each case groups to get the result in this image?
Then, I have cases with 3 elements per group:
For each group combination:
If result=1 in one the cases and the other two has result=4 and result=4, inspection=1 to first case with result=4, the second case with result=4 asign inspection=0 and inspection=2 to result=1
If result=1 in one the cases and the other two has result=4 and result=0, inspection=1 to the case with result=4, inspection=0 to case with result=0 and inspection=2 to result=1
If result=1 in all the cases, inspection=1 in one of the cases and to the other inspection=2, as we can see on the image below
How can I do that asignation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如何仅使用
结果
重新安排c(2,1)
,例如:输出:输出:
How about just using the order of
Result
to rearrangec(2,1)
, like this:Output: