从is.nan返回错误的逻辑(Returning incorrect logical from is.nan)
我正在分析来自公开数据库的微阵列数据,我的输出是一个对数比矩阵,将实验数据与对照进行比较。 我发现我的一个列填充了
NaN
值,因为这种处理没有相应的控制。 我的数据框(fc_initial
)尺寸为9049 x 647。> dim(fc_initial) [1] 9049 647
由NaN填充的列是第580列
head(fc_initial[,580]) # [1] NaN NaN NaN NaN NaN NaN summary(is.nan(fc_initial[,580])) # Mode TRUE NA's # logical 9049 0
当我尝试使用
apply
检查所有列时,R错误地返回此列的所有FALSE
。fc_num <- apply(fc_initial, 2, is.nan) summary(fc_num[ ,580]) # Mode FALSE NA's # logical 9049 0
我已经使用
fc_initial
和fc_num
视图在视觉上确认了这fc_num
,我已经仔细检查过我正在寻找使用which()
的正确列。which(fc_num, arr.ind = TRUE) # row col
which
返回显示为TRUE
单元格。我错过了什么? 为什么R为一列我在视觉上确认为
TRUE
的值返回一列FALSE
?I am analyzing microarray data from a publicly available database, and my output is a log-ratio matrix comparing experimental data to controls. I have discovered that one of my columns is populated with
NaN
values due to the fact that this treatment does not have a corresponding control. My data frame's (fc_initial
) dimensions are 9049 x 647.> dim(fc_initial) [1] 9049 647
the column that is populated by NaN is the 580th column
head(fc_initial[,580]) # [1] NaN NaN NaN NaN NaN NaN summary(is.nan(fc_initial[,580])) # Mode TRUE NA's # logical 9049 0
When I try to examine this for all columns using
apply
, R incorrectly returns allFALSE
for this column.fc_num <- apply(fc_initial, 2, is.nan) summary(fc_num[ ,580]) # Mode FALSE NA's # logical 9049 0
I have visually confirmed this using view for both
fc_initial
andfc_num
, and I have double checked that I am looking for the right column usingwhich()
.which(fc_num, arr.ind = TRUE) # row col
which
returns no cells showing asTRUE
.What am I missing? Why is R returning a column of
FALSE
for a column of values I have visually confirmed to beTRUE
?
原文:https://stackoverflow.com/questions/36895663
最满意答案
Afair GAE基于python-django,所以网上有很多相关信息。 检查例如: http : //www.b-list.org/weblog/2006/sep/02/django-tips-user-registration/
如果你谷歌搜索更多可用:django电子邮件确认
Afair GAE is based on python-django, so there’s much information on this in the web. Check for example: http://www.b-list.org/weblog/2006/sep/02/django-tips-user-registration/
More is available if you google for: django email confirmation
相关问答
更多-
读取源代码,看起来InboundEmailMessage大多数属性只有在它们具有非空值时才会被设置。 你可以这样做: try: item.cc = mail_message.cc except AttributeError: pass Reading the source, it looks like most of the attributes of an InboundEmailMessage only get set at all if they'd have a non-empty ...
-
您的代码片段似乎是正确的(除了第一个函数的不正确缩进),因此我将提供一些调试信息来帮助您解决问题。 检查应用程序的日志以查看代码是否引发任何异常,这可能会阻止事情按预期工作。 https://appengine.google.com/logs?&app_id= YOUR_APP_ID 检查应用程序的配额详细信息,以查看是否已发送任何电子邮件。 https://appengine.google.com/dashboard/quotadetails?&app_id= YOUR_APP_ID 确保sender电子 ...
-
RabbitMQ vs GAE(RabbitMQ vs GAE)[2022-12-27]
GAE与RabbitMQ不具有可比性,因为您的问题几乎没有意义。 RabbitMQ只是消息传递,您很可能必须设置更多基础架构来支持您的用例。 GAE是一个完整的基础设施。 也就是说,RabbitMQ每秒可以处理大量的消息。 也许你想为手机游戏连接到一个API,以及一些应用程序逻辑来处理这些消息。 您不会让游戏客户端连接到您的RabbitMQ服务器并直接与其他客户端通信。 在GAE上,您通常会有请求并立即回复。 如果您需要持续时间较长的连接并允许您将消息推送到游戏客户端(不使用APN等),您可能需要考虑XMP ... -
Afair GAE基于python-django,所以网上有很多相关信息。 检查例如: http : //www.b-list.org/weblog/2006/sep/02/django-tips-user-registration/ 如果你谷歌搜索更多可用:django电子邮件确认 Afair GAE is based on python-django, so there’s much information on this in the web. Check for example: http://ww ...
-
GAE Python - 如何将csv.writer的结果附加到电子邮件中?(GAE Python - How to attach the results of csv.writer to an email?)[2024-03-12]
尝试修改此行。 message = mail.EmailMessage(sender="Me", subject="Shop Export", attachments=[("shops.csv", self.response.body)]) try to modify this line. message = mail.EmailMessage(sender="Me ", subject="Shop ... -
sys.getsizeof(object[, default]) getsizeof 我没有在gae中使用过邮件,但可能你可以获得你要发送的内容的大小,将其添加到空邮件的大小,这可能会有效。 sys.getsizeof(object[, default]) getsizeof I've not used mail in gae but presumably you can get the size of the contents you want to send, add that to the siz ...
-
您无法从任意电子邮件地址发送。 如概述文档所述 ,您只能发送: 当前登录用户的Gmail或Google Apps帐户 任何形式为anything@appname.appspotmail.com或anything@appalias.appspotmail.com的电子邮件地址 在Developers Console的App Engine设置页面中找到的Email API授权发件人中列出的任何电子邮件地址 如果您是要发送的电子邮件帐户的所有者,并且它是GMail帐户,则可以从App Engine控制台将其添加到 ...
-
GAE给我发错误(GAE email me errors)[2023-08-03]
我认为你能做的最好的事情就是在main函数中加入一些像......这样的代码: try: ...normal body of your main goes here... except: from google.appengine.api import mail import sys mail.send_mail(sender="Your GAE App", to="You 是否可以从另一个GAE应用程序部署一个GAE应用程序?(Is it possible to deploy one GAE application from another GAE application?)[2022-09-10]
可能吗? 是。 用于更新应用程序的协议appcfg完全基于HTTP,所以绝对没有理由你不能编写能够部署其他应用程序(或重新部署自身 - 自修改代码)的应用程序! 你甚至可以重用appcfg.py的大部分来完成它。 这简单吗? 可能不会。 你很可能需要了解一大堆appcfg的内部结构,以及它用来上传新应用程序的RPC - 这不是一项微不足道的事情。 您还需要尽可能将您的凭据存储在应用程序中 - 尽管您可以使用仅为其部署的应用程序管理的角色帐户,以最大限度地降低风险。 Is it possible? Yes. ...看看这里的文档查询: 您的查询部分应如下所示: product_list = db.GqlQuery("SELECT * FROM Post") 或者对于NDB: product_list = ndb.gql("SELECT * FROM Post") Take a look at the docs here for querying: Your query part should look something like this: product_list = db.GqlQuery("SELECT ...相关文章
更多- Ext grid分页的问题
- \ 关于业务逻辑 我是否需要synchronized 方法 困惑?
- 在javascript中,逻辑运算符==和===有何不同
- java通用返回对象
- SSH2整合业务逻辑层设计的问题?
- 解密微信介入智能硬件的逻辑
- 微信游戏背后蕴藏的大数据逻辑
- java分页返回对象
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)