鑽研subset() 函數| R
文章推薦指數: 80 %
前面練習示範的刪除欄位只是 subset() 函數的其中一個功能。
subset() 函數在篩選觀測值與變數非常實用,假如你想快速看到草帽魯夫的懸賞金額,可以練習在R Console ...
Exercise鑽研subset()函數前面練習示範的刪除欄位只是subset()函數的其中一個功能。
subset()函數在篩選觀測值與變數非常實用,假如你想快速看到草帽魯夫的懸賞金額,可以練習在RConsole輸入:
subset(straw_hat_df,name=="MonkeyD.Luffy",select=c(name,bounty))
Instructions100XP
將草帽海賊團賞金大於1000萬貝里並且年齡小於30歲的成員篩選出來,欄位只需要包含姓名、賞金與年齡。
TakeHint(-30XP)Loading
延伸文章資訊
- 1Subsetting Data | R Learning Modules - IDRE UCLA
1. Subsetting variables ... To manipulate data frames in R we can use the bracket notation to acc...
- 2R 语言中subset()函数使用- 何帅 - 博客园
R语言中的subset()应用也可以使用select参数选择指定的列以上是subset函数在结合data.frame进行条件筛选时的常见用法subset函数还可以用在向量上, ...
- 3R語言subset()用法及代碼示例- 純淨天空
R program to create # subset of a data frame # Creating a Data Frame df<-data.frame(row1 = 0:2, r...
- 4R語言subset和merge函式的使用- IT閱讀
R語言subset和merge函式的使用 · > selectresult=subset(df1,name=="aa",select=c(age,sex)); > · > selectresul...
- 5How can I subset a data set? | R FAQ - UCLA
It is possible to subset both rows and columns using the subset function. The select argument let...