pie_datacheck检查数据是否合适做饼图,R语言tastypie包简易饼图
# Wed Sep 08 01:23:40 2021 edit
# 字符编码:UTF-8
# R 版本:R 4.1.1 x64 for window 11
# cgh163email@163.com
# 个人笔记不负责任,拎了个梨🍐🍈
#.rs.restartR()
require(tastypie)
rm(list = ls());gc()
wrong <- c(1, 2, 3)
wrong2 <- data.frame("a" = c(1, 2, 3), "b" = c("ex", "am", "ple"))
# Would return an Error
right <- data.frame("a" = c("ex", "am", "ple"), "b" = c(1, 2, 3))
pie_datacheck(right) # No Error ==> OK!
pie_datacheck(right, check = TRUE) # Positive message
网友评论