随笔分类 - R语言
摘要:1、R-4.0.3安装过程中隐患 2、查看当前系统 [root@centos8 test]# cat /etc/redhat-release CentOS Linux release 8.3.2011 [root@centos8 test]# hostnamectl Static hostname:
阅读全文
摘要:1、当前路径文件 > dir() [1] "a.txt" 2、加载包,绘图测试 > library(Cairo) > Cairo.capabilities() png jpeg tiff pdf svg ps x11 win raster TRUE FALSE FALSE TRUE TRUE TRU
阅读全文
摘要:1、问题 install.packages('Cairo', repos='https://mirror.lzu.edu.cn/CRAN/') ………… ………… configure: error: Cannot find cairo.h! Please install cairo (http://
阅读全文
摘要:1、查看R版本 [root@centos8 test]# R --version R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out" Copyright (C) 2020 The R Foundation for Statistical
阅读全文
摘要:1、查看当前系统 [root@rhel8 home]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.3 (Ootpa) [root@rhel8 home]# hostnamectl Static hostname: rhel8
阅读全文
摘要:查看系统: [root@centos8 home]# cat /etc/redhat-release CentOS Linux release 8.0.1905 (Core) 1、下载R安装包 [root@centos8 home]# wget https://mirror.bjtu.edu.cn/
阅读全文
摘要:查看系统: [root@rhel7 home]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.9 (Maipo) [root@rhel7 home]# hostnamectl Static hostname: r
阅读全文
摘要:查看系统: [root@centos7 ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core) [root@centos7 ~]# hostnamectl Static hostname: centos7 Icon name:
阅读全文
摘要:1、 par(mai=c(2,2,2,2)) plot(1:10) legend(1,-1,"aaa",xpd=TRUE,box.lwd = 3, pch=15) legend(11,11,"bbb",xpd=TRUE,box.lwd = 3, pch=15) 2、 par(mai=c(2,2,2,
阅读全文
摘要:1、 setwd("C:/Users/75377/Desktop/SHEEP_ROH") png("12.png",width = 7000,height = 5500,pointsize = 170) par(mai = c(12,12,12,12),mgp = c(2.1,0.5,0)) #地图
阅读全文
摘要:1、 > library(REmap) > options(remap.ak = "此处输入个人秘钥") > city_vec = c("Beijing","Haerbin","Shanghai","Guangzhou") > get_city_coord("Shanghai") [1] 121.4
阅读全文
摘要:plot(1:10,xlab = expression (paste("xxx ",R[2], " (","xx", ")")))
阅读全文
摘要:> a <- c(2,5,6,7) > b <- c(6,3,2,9) > c = rbind(a,b) > c [,1] [,2] [,3] [,4] a 2 5 6 7 b 6 3 2 9 > class(c) [1] "matrix" "array" > c <- data.frame(c)
阅读全文
摘要:1、 > a <- c(3,NA,NA,4,1,5) > b <- c(NA,4,6,2,4,9) > c <- data.frame(a,b) > c a b 1 3 NA 2 NA 4 3 NA 6 4 4 2 5 1 4 6 5 9 > c[is.na(c)] <- 0 > c a b 1 3
阅读全文
摘要:1、 p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point() p 2、隐去x轴 p + xlab(NULL) 3、 隐去y轴 p + ylab(NULL)
阅读全文
摘要:1、 p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point() p 2、调整x轴 p+theme(axis.title.x=element_text(vjust=2, size=20,face = "bold")) p+theme(a
阅读全文
摘要:1、 library(gcookbook) library(ggplot2) p=ggplot(heightweight,aes(x=sex,y=heightIn))+geom_violin() p 2、指定x轴因子水平顺序 heightweight$sex<-factor(heightweight
阅读全文
摘要:1、 p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point() p 2、调整绘图边框的粗细 p + theme(panel.border = element_rect(fill=NA,color="black", size=5, li
阅读全文
摘要:1、 p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point() p 2、调整x轴 p+theme(axis.line.x=element_line(linetype=1,color="black",size=3)) 3、调整x轴刻度线
阅读全文
摘要:1、 p<-ggplot(mtcars,aes(mpg,hp,colour=factor(cyl)))+geom_point() p 2、去除图例 p + theme(legend.position = 'none')
阅读全文

浙公网安备 33010602011771号