![](/img/trans.png)
[英]R:Having unique rows except one cell, how to get unique rows keeping the differencies
[英]How to get all the rows except one in R
除了所需的線以外,如何獲得整個矩陣?
我知道這可能是一個簡單的問題,但我沒有到達那里。
line <- matrix[index,]
這讓我想到了一條線。 我想反其道而行之。
我已經嘗試了line <- matrix[!index,]
,但我得到一個空矩陣。
如果index
是一個數值,你可以使用:
line <- matrix[-index,]
!index
僅適用於邏輯值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.