R data.table 介紹 | data.table r
目標:找出BBS自2009年以來,低中高三個海拔段每年各做了多少樣區及樣點在BBS的資料中,樣區代號最前面的英文字母為各樣區所屬的海拔段(A開頭的樣區為低海拔樣區;B開頭的樣區為中海拔樣區;C開頭的樣區為高海拔樣區),因此我們可以利用這樣的資料特性,給定一個新欄位elevation,然後用elevation分類群來計算我們要的結果從BBS中擷取需要的資料並且增加新欄位elevation,依據樣區編號開頭的英文字母填入所屬的海拔段利用uniqueN()計算每年每個海拔段的樣區與樣點數量BBS.agg<- BBS[,list(year,locationID)]%>%#取出需要的...
目標:找出BBS自2009年以來,低中高三個海拔段每年各做了多少樣區及樣點在BBS的資料中,樣區代號最前面的英文字母為各樣區所屬的海拔段(A開頭的樣區為低海拔樣區;B開頭的樣區為中海拔樣區;C開頭的樣區為高海拔樣區),因此我們可以利用這樣的資料特性,給定一個新欄位elevation,然後用elevation分類群來計算我們要的結果
從BBS中擷取需要的資料並且增加新欄位elevation,依據樣區編號開頭的英文字母填入所屬的海拔段利用uniqueN()計算每年每個海拔段的樣區與樣點數量
BBS.agg <- BBS[, list(year, locationID)] %>% # 取出需要的欄位 separate(locationID, c("Site", "Point"), "_") %>% # 分開樣區跟樣點資訊 .[Site %like% "A", elevation := "低海拔"] %>% #樣區名稱包含A的樣區,elevation填入"低海拔" .[Site %like% "B", elevation := "中海拔"] %>% #樣區名稱包含B的樣區,elevation填入"中海拔" .[Site %like% "C", elevation := "高海拔"] %>% #樣區名稱包含C的樣區,elevation填入"高海拔" .[, .(N.site = uniqueN(Site), #計算樣區數 N.point = uniqueN(Point)), #計算樣點數 by = list(year, elevation)] #分類群依據year跟elevation看一下整理完的結果
View(BBS.agg) year elevation N.site N.point 2015 低海拔 306...取得本站獨家住宿推薦 15%OFF 訂房優惠
本站住宿推薦 20%OFF 訂房優惠,親子優惠,住宿折扣,限時回饋,平日促銷
7 探索式資料分析| 資料科學與R語言 | data.table r
Data.table: Extension of 'Data.frame'. https://CRAN.R-project.org/package=data.table. Wickham, Hadley, Romain Francois, Lionel Henry, and ... Read More
7 探索式資料分析| 資料科學與R語言 | data.table r
7.2 data.table. data.table是data.frame資料框型別的延伸,如要使用必須安裝並載入data.table(Dowle ... Read More
data.table in R | data.table r
2019年11月13日 — data.table is a package is used for working with tabular data in R. It provides the efficient data.table object which is a much improved ... Read More
data.table in R | data.table r
2019年11月13日 — data.table is a package is used for working with tabular data in R. It provides the efficient data.table object which is a much improved ... Read More
data.table package | data.table r
2021年9月27日 — data.table is widely used by the R community. It is being directly used by hundreds of CRAN and Bioconductor packages, and indirectly by ... Read More
data.table進階技巧及範例 | data.table r
2019年11月17日 — .GRP – 為每個Group加上Index · 以row index及column index來subset · 將data.table物件轉換成Vector · 用dcast轉置時,修改預設的欄位名稱 · 推薦文章 ... Read More
DT | data.table r
The R package DT provides an R interface to the JavaScript library DataTables. R data objects (matrices or data frames) can be displayed as tables on HTML ... Read More
Extension of `data.frame` • data.table | data.table r
data.table is widely used by the R community. It is being directly used by hundreds of CRAN and Bioconductor packages, and indirectly by thousands. It is ... Read More
Introduction to data.table | data.table r
2022年11月15日 — table ? data.table is an R package that provides an enhanced version of data.frame s, which are the standard data structure ... Read More
Introduction to data.table | data.table r
2021年9月22日 — This vignette introduces the data.table syntax, its general form, ... data.table is an R package that provides an enhanced version of ... Read More
Package 'data.table' | data.table r
由 M Dowle 著作 · 2021 · 被引用 47 次 — It is inspired by A[B] syntax in R where A is a matrix and B is a 2-column matrix. Since a data.table is a data.frame, it is compatible with R functions and ... Read More
Package data.table | data.table r
2021年9月27日 — Offers a natural and flexible syntax, for faster development. Version: 1.14.2. Depends: R (≥ 3.1.0). Imports: methods. Read More
R data.table 介紹 | data.table r
2018年3月17日 — 個人覺得data.table是資料整理上很強大的一個package,尤其當你面對的是一兩百萬筆 ... BBS <- fread(F:/R markdown/BBS2009-2015/occurrence.txt, ... Read More
R's data.table package extends data.frame | data.table r
data.table is widely used by the R community. It is being directly used by hundreds of CRAN and Bioconductor packages, and indirectly by thousands. It is ... Read More
訂房住宿優惠推薦