首页
\
问答
\
如何对sum的数据帧进行采样,其中sum与列总和部分匹配(How to sample dataframe where sum matches partially with column sum)
如何对sum的数据帧进行采样,其中sum与列总和部分匹配(How to sample dataframe where sum matches partially with column sum)
我有以下数据帧:
id sum 123 12 234 12 345 50 124 23 111 20 116 20
现在我想要将
sum
与100或接近100匹配的数据帧期望的数据帧将是
id sum 123 12 234 12 345 50 124 23
总和是97,接近100
如何在不使用for循环的情况下在R中执行此操作?
I have a following dataframe:
id sum 123 12 234 12 345 50 124 23 111 20 116 20
Now I want to subset dataframe where
sum
matches 100 or near to 100desired dataframe would be
id sum 123 12 234 12 345 50 124 23
Sum is 97 which is near to 100
How can I do it in R without using for loop?
原文:https://stackoverflow.com/questions/49233522
更新时间:2022-07-18 15:07
最满意答案
您必须将输入放在
mat-form-field
容器中以查看差异。<mat-form-field> <input matInput class="form-control" placeholder="First Name" name="firstName" [(ngModel)]="value"> </mat-form-field>
You have to put your input in a
mat-form-field
container to see the difference.<mat-form-field> <input matInput class="form-control" placeholder="First Name" name="firstName" [(ngModel)]="value"> </mat-form-field>
相关问答
更多-
Phonegap样式-webkit-user-select:无;(Phonegap styles -webkit-user-select: none; disabling text field)[2023-07-02]
尝试添加到您的CSS: input { -webkit-user-select: auto !important; } 这将覆盖您在每个单元上(通过*选择器)为输入字段设置的文本选择禁用。 Try adding this to your css: input { -webkit-user-select: auto !important; } This will override the text selection disabling that you have set on every ... -
如果您有有效的IHTMLDocument2,则可以调用其createStyleSheet() 。 它将返回IHTMLStyleSheet实例。 您可以使用其cssText属性来设置样式。 确保考虑到文档的字符编码。 If you have valid IHTMLDocument2, then you can call its createStyleSheet(). It will return IHTMLStyleSheet instance. You can use its cssText propert ...
-
您必须将输入放在mat-form-field容器中以查看差异。首先,我建议不要编辑引导程序样式表,除非你绝对必须这样做。 更好的做法是覆盖自己样式表中的特定引导类(确保样式表是网页加载的最后一个样式表)。 由于您使用的是LESS,您还可以将引导程序样式表导入到自己的样式表中,并使用@import "path/to/bootstrap.min.css"类的内容加载单个样式表。 要更改下拉菜单中项目的颜色,您可以使用'element:hover'作为css选择器。 在bootstrap中,我相信它看起来像这样: .dropdown-menu > li > a:hover ...
Rails CSS - 单个生成的文本输入字段中的不同样式(Rails CSS - different styles in a single generated text input field)[2023-11-05]
不幸的是,那是不可能的。 您不能在放置任何子元素。 要实现这样的功能,您需要使用多个元素,并为每个元素设置样式。 Unfortunately, that's not possible. You can't place any child elements inside . To achieve something like this you need to use multiple elements, and style each one of th ...您需要为要素类别添加节点,并启用或禁用此类别的功能。 请查看文档: http : //dev.day.com/docs/en/cq/current/administering/configuring_rich_text_editor.html 以下是我使用的相当受限的RTE示例::not() (或此时的任何CSS选择器)无法将DOM遍历到父选择器。 所以,不幸的是,您需要在覆盖样式中执行类似的操作: .alert a { /* override styles here for any a element IN .alert */ } 或者,或者: :not(.alert) a { /* override styles for anything EXCEPT alert > a */ } 只要在加载bootstrap 后加载覆盖样式,就不需要!important ...如何覆盖引导样式?(How to override bootstrap styles?)[2022-08-06]
使包含.navbar-inverse类样式的自定义.navbar-inverse bootstrap类更具体。 您可以在标记中添加一个类,并使用它作为自定义覆盖的前缀。 .myCustomStyle .navbar-inverse 如果您无法编辑HTML,则可以使用每个html文档具有的明显标记: body .navbar-inverse 还将使您的样式更具体,但对于代码可读性而言,请使用第一种方法。 因为CSS特异性将始终覆盖bootstraps类+你总是可以确定它是你的类的名称前缀,这使 ...根据AEM 6.0文档,在Touch UI中删除了在富文本编辑器中使用自定义样式的选项。 触控优化的UI不支持以下插件/功能组合: 编辑 图片 sourceedit 款式 表 值得庆幸的是, 他们又回到了AEM 6.2 。 我不确定6.1,他们可能也受到支持。 AEM 6.2的文档描述了启用Styles RTE插件所需的步骤 。 它花了我很多阅读但我设法让Styles插件工作。 在TL的方式中; DR我只能说样式配置遵循与经典UI相同的格式,并且您还需要注意组件的uiSettings ,因为它们会提高Tou ...将特定文本定位到表单输入字段并为其添加样式?(Targeting specific text entered into form input field and add styles to it?)[2022-07-02]
给定一串单词,我认为对单个单词进行样式设置的最简单方法是将.split()输入字符串转换为单个单词的数组,然后根据它们在数组中的位置更新您想要的任何一个单词。 .join()重新组合成一串HTML。 通过这种方式,可以很容易地将单个单词包含在具有特定类的span元素中,然后根据您的喜好设置该类的样式。 “该文本由网站管理员输入,并在页面上输出到网站的前面。必须有一种方法可以定位和设置样式。” 是。 使用jQuery选择有问题的元素,然后将上述技术应用于它。 也许有点像这样: $(".styleMe").ht ...相关文章
更多- 求一个group by后面字段顺序影响结果的例子
- SQL中GROUP BY与HAVING的用法
- 色子问题
- 实习第一天
- Hadoop中一些采样器的实现
- Hadoop实现共同出现的单词(Word co-occurrence)
- POJ 3620 Avoid The Lakes【DFS水题练格式Avoid The Lakes Time Limit: 1000MS Memory Limit: 65536K Total Sub】
- HBase适合做BI分析的数据源吗?
- 正则啊正则!
- 用JAVA语言编写“求相亲数”
最新问答
更多- 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
- 如何通过引用返回对象?(How is returning an object by reference possible?)
- 矩阵如何存储在内存中?(How are matrices stored in memory?)
- 每个请求的Java新会话?(Java New Session For Each Request?)
- css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
- 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
- xcode语法颜色编码解释?(xcode syntax color coding explained?)
- 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
- 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
- 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
- 西安哪有PLC可控制编程的培训
- 在Entity Framework中选择基类(Select base class in Entity Framework)
- 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
- 电脑二级VF有什么用
- Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
- 金华英语角.
- 手机软件如何制作
- 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
- 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
- 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
- Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
- 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
- python的访问器方法有哪些
- DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
- 在Ruby中对组合进行排序(Sorting a combination in Ruby)
- 网站开发的流程?
- 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
- 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
- 透明度错误IE11(Transparency bug IE11)
- linux的基本操作命令。。。