新建了一个Emacs package ess-view-data,在Emacs+ESS里可以采用类似 tidyverse/dplyr 的数据查看和操作。
CUSTOMIZATION
ESS-VIEW-DATA-BACKEND-LIST, 查看数据的后端
- dplyr (default)
- dplyr+DT
- data.table+magrittr
ESS-VIEW-DATA-PRINT-BACKEND-LIST,将数据显示到emacs buffer的后端
- print (default)
- kable
ESS-VIEW-DATA-SAVE-BACKEND-LIST 保存数据的后端
- write.csv (default)
- readr::write_csv
- data.table::fwrite
- kable
ESS-VIEW-DATA-COMPLETE-BACKEND-LIST 补全的后端
- jsonlite
ESS-VIEW-DATA-READ-STRING
- ess-completing-read (default)
- completing-read
- ido-completing-read
- ivy-completing-read
USAGE
在 ess-r 里,调用 ess-view-data-print,然后选择需要查看的data.frame,就会打开一个相应的buffer。
NOTE : 为了避免误操作,会将原data.frame复制一份(as.tibble)
- [x] ess-view-data-print: the main function to view data
- [x] ess-view-data-set-backend: change backend
- [x] ess-view-data-toggle-maxprint: toggle limitation of lines per page to print
- [x] ess-view-data-filter
- [x] ess-view-data-select / ess-view-data-unselect
- [x] ess-view-data-sort
- [x] ess-view-data-group / ess-view-data-ungroup
- [x] ess-view-data-mutate
- [x] ess-view-data-slice
- [x] ess-view-data-wide2long / ess-view-data-long2wide
- [x] ess-view-data-update
- [x] ess-view-data-reset
- [x] ess-view-data-unique
- [x] ess-view-data-count
- [x] ess-view-data-summarise
- [x] ess-view-data-overview
- [x] ess-view-data-goto-page / -next-page / -preious-page / -first-page / -last-page / -page-number
- [x] ess-view-data-save