R Matrix,获取最小列的索引(R Matrix, get the index of minimum column)
我是R的新手,我正在学习。 我已经计算了这个区别,就像这样。 (与欧米茄的区别)
final_wights <- apply(wjs,2, function(x) (omega - x))^2
现在我想获得最小列的列号。 我可以使用最小列值
col <- apply(final_wights, 2, min)
,但我想获得索引,我如何获得矩阵中的索引列号
I am very new to R, I am learning. I have calculated the difference, column wise like this. (difference with omega)
final_wights <- apply(wjs,2, function(x) (omega - x))^2
Now i want to get the column number of the minimum column. I can get minimum column value using
col <- apply(final_wights, 2, min)
,But i want to get the index of that how do i just get the index column number in the matrix
原文:https://stackoverflow.com/questions/29666700
最满意答案
发现没有办法获得HTTPStatus代码以获得成功的响应。 只需听取异常即可确保成功上传。
Find out that there is no way to get the HTTPStatus Code for successful response. Just Listening to exceptions is enough to be sure of the succeeded upload .
相关问答
更多-
要在上传之前将该文件公开,您可以使用#withCannedAcl方法: myAmazonS3Client.putObject(new PutObjectRequest('some-grails-bucket', 'somePath/someKey.jpg', new File('/Users/ben/Desktop/photo.jpg')).withCannedAcl(CannedAccessControlList.PublicRead)) To make the file public befo ...
-
Amazon S3和CloudFront都不提供带宽限制。 如果带宽限制对您很重要,则必须编写自己的前端访问Amazon S3,以监控和限制带宽。 Neither Amazon S3 nor CloudFront provide bandwidth limits. If bandwidth limits are important to you, you'll have to write your own front end access to Amazon S3 that monitors and lim ...
-
您的网址存在错误。 比较您收到的回复中的密钥:
crawl-data/CC- MAIN-2018-05/segments/1516084886237.6/warc/CC- MAIN-20180116070444-20180116090444-00000.warc.gz\n 到预期的网址中的一个: https://commoncrawl.s3.amazonaws.com/crawl-data/CC-MAIN-2018-05/segments/1516084886237.6/warc/C ... -
如果您有防火墙,请检查您的设置。 您的防火墙很可能会过滤掉亚马逊的某些响应。 If you have a firewall, check your settings. It is quite possible that your firewall is filtering out certain responses from amazon.
-
感谢迈克尔的评论,我能够进一步追踪这个问题。 事实证明,问题实际上来自对deleteObjects()的调用。 这些命令正在cli上的shell脚本中执行,结果是在最后一次调用putObject()之前还有另一个调用。 它试图将空数组发送到s3服务......这显然会返回给定的MalformedXML状态代码。 Thanks to the comment from Michael I was able to track the issue down further. It turns out that th ...
-
发现没有办法获得HTTPStatus代码以获得成功的响应。 只需听取异常即可确保成功上传。 Find out that there is no way to get the HTTPStatus Code for successful response. Just Listening to exceptions is enough to be sure of the succeeded upload .
-
我理解你有关获取内容类型的对象的问题。 我认为迈克尔的答案有一些信息可以解决这个问题。 我只是想在S3存储桶中存储对象时添加一些额外的信息。 将对象添加到存储桶时,可以在元数据字段中设置内容类型。 如果要存储对象并在以后检索它,请在元数据中添加内容类型(Content-Type)。 这样您就可以在阅读时获取对象的内容类型。 如果稍后添加和检索对象,这是更好的方法。 doc application/msword docx application/vnd.openxmlformats-office ...
-
如你所说,你错过了一件小事。 使用ListVersionsRequest的前缀 例如 ListVersionsRequest Request = new ListVersionsRequest(); Request.BucketName = DocumentStorageFolder(DocumentId); Request.Prefix = KeyName 卡迈勒 As you mentioned, you are missing a small thing. Use prefix of the Lis ...
-
S3确实提供了对图像进行签名的功能,以便URL仅在有限的时间段内有效。 这里有更多细节 如此处所述,有多种处理访问的方法 S3 does provide the ability to sign an image so that the URL is only valid for a limited period of time. There are more details of that here There are a number of ways of handling access as descr ...
-
Java示例是关于如何使用Java下载并从Memory向MediaInfo发送数据的示例。 现在MediaInfo对S3有本机支持。 所以只需提供此URL即可。 唯一的问题是你必须拥有libcurl和使用libcurl支持编译的MediaInfo。 这在所有平台上都不可用(例如,在Windows上,您必须将来自libcurl网站的libcurl.dll放在与mediainfo相同的文件夹中)。 计划更好地提供此类支持(在所有平台上直接提供libcurl并进行全面测试),但没有ETA。 The Java ex ...