楼主: 学R的胖胖
2869 0

[有偿编程] R制作小提琴图时报错'breaks' are not unique [推广有奖]

  • 0关注
  • 0粉丝

等待验证会员

初中生

28%

还不是VIP/贵宾

-

威望
0
论坛币
5 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
83 点
帖子
4
精华
0
在线时间
17 小时
注册时间
2019-8-13
最后登录
2022-4-3

4论坛币

id

B cells naive

B cells memory

Plasma cells

T cells CD8

T cells CD4 naive

T cells CD4 memory resting

T cells CD4 memory activated

T cells follicular helper

T cells regulatory (Tregs)

T cells gamma delta

NK cells resting

NK cells activated

Monocytes

Macrophages M0

Macrophages M1

Macrophages M2

Dendritic cells resting

Dendritic cells activated

Mast cells resting

Mast cells activated

Eosinophils

Neutrophils

1

0.11826622

0

0.18725566

0.0825916

0

0.12439993

0

0.00948341

0

0

0.06391741

0.00544186

0.0484135

0

0.00078692

0.16844597

0.0619187

0

0.12907882

0

0

0

2

0.15197035

0

0.1855595

0.06994096

0

0.04370553

0

0.00611278

0.01511758

0

0.01885103

0.00530484

0.01463

0

0.00138838

0.19839095

0.03385533

4.41E-05

0.25512868

0

0

0

3

0.05809158

0.0796556

0.01742153

0.19891486

0

0.17296414

0.02108818

0.01370105

0

0

0.11284013

0

0.03965057

0

0.01543053

0.17220614

0

0.01497963

0.03061786

0.02283899

0

0.02959921

4

0.01254683

0.07265487

0.08881109

0.1075312

0

0.03059072

0.0231192

0.05635669

0.05617409

0

0.125394

0

0.10598838

0

0.01589224

0.12246793

0

0.00603928

0

0.07818332

0

0.09825016

5

0.07650204

0

0.1013614

0.05905612

0

0.09327195

0

0.02950609

0

0

0.03543004

0.01960896

0.02023386

0

0

0.3605778

0.00535786

0

0.19881698

0

0

0.0002769

6

0.00237062

0

0

0.08172594

0

0.17146872

0

0.01623844

0.00039878

0

0

0.0311613

0.02023978

0

0.01331926

0.31302188

0.03674968

0

0.31330559

0

0

0

7

0.05387037

0.03155722

0.05155959

0.19311834

0

0.19410838

0

0.10373183

0.01215986

0

0.05750579

0.01217146

0.03156875

0

0.01132437

0.20740876

0

0

0.02981808

0

0

0.01009719

8

0

0.21879579

0.07304974

0.1479532

0

0.01600877

0

0.08512496

0

0

0.04022062

0.01455777

0.02868674

0

0

0.14625729

0.01516988

0.02207139

0.18862234

0

0

0.00348151

9

0.14911905

0.06909256

0

0.15115819

0

0.17102034

0

0.03833852

0.02374462

0

0.01150715

0.00414962

0.04565422

0

0.01054363

0.22278709

0

0.01173911

0.0911459

0

0

0

10

0.20154774

0

0.1663826

0.21533574

0

0.12506152

0

0.04915535

0.02011146

0

0.01601836

0

0.01887043

0

0.01789576

0.08643327

0

0

0.05775151

0.02543626

0

0

11

0.06183112

0

0.04261998

0.05870415

0

0.08391047

0

0.04001839

0

0

0.00301464

0.02465648

0.08118667

0

0

0.24478284

0.01545453

0.03327859

0.31054214

0

0

0

12

0

0.05481877

0.00307822

0.14159155

0

0.1853971

0

0.08522265

0.07465162

0

0

0.05802825

0.03160373

0

0

0.11670966

0.10295829

0.00276646

0.09567247

0

0

0.04750124

13

0.11182837

0.08912494

0.04077401

0.11519739

0

0.1320353

0

0.08327243

0

0

0.03588802

0

0.0274545

0

0.00141743

0.23653874

0

0.03084678

0.09562208

0

0

0

14

0

0.03598862

0.02785588

0.16922611

0

0

0.05154306

0.01770623

0.00986381

0

0.0583125

0.00725273

0.03493541

0

0.13481504

0.20534805

0

0.0913251

0.15320001

0

0

0.00262743

15

0.09206536

0

0.07907354

0.12285395

0

0.12604173

0

0.03620344

0.00412278

0

0.09003586

0

0.03179048

0

0.02206401

0.11217472

0

0.00350086

0.25985939

0

0

0.0202139

16

0.12651593

0

0.10824509

0.05838519

0

0.09870039

0

0.09451476

0

0

0

0.02469132

0.03068623

0

0

0.24354705

0.01234094

0.01062373

0.19174938

0

0

0

17

0.22002392

0

0.06642489

0.12030135

0

0.13980856

0

0.05217754

0

0

0.0204804

0.01467495

0.04045743

0

0

0.1077576

0.05174541

0

0.16614794

0

0

0

18

0.00049896

0.1737874

0.05349715

0.07949763

0

0.10923258

0

0.12831909

0

0

0.00337993

0.00401535

0.01972607

0

0

0.11315199

0

0.05670916

0.14213104

0.02712928

0.08139967

0.00752469

19

0.05756209

0.08351501

0.10692023

0.11252937

0

0.08071665

0.01766351

0.07780425

0

0

0.03093311

0

0.11259922

0

0.01028378

0.1596525

0.02964641

0.01365822

0.10308721

0

0

0.00342842

20

0.05505009

0.16212112

0.0294367

0.11159822

0

0.05079706

0

0.09513972

0

0

0

0.02773165

0.00736073

0

0

0.16153781

0.02691855

0.03801681

0.23429154

0

0

0

21

0

0.35102556

0

0.02110995

0

0.0089614

0

0.08467349

0

0

0.06032923

0.02185678

0.01345187

0

0.00020905

0.20338171

0.04602821

0.00807884

0.1808939

0

0

0

22

0.13796621

0.03060972

0.01857302

0.06274116

0

0.10666208

0

0.13720245

0

0

0.03031291

0.03139332

0.01958943

0

0.06618662

0.18242622

0

0.00271545

0.16058309

0

0

0.01303834

23

0.0072006

0.11649509

0.04922075

0.02751011

0

0.16710426

0

0.12347204

0

0

0.02319637

0

0.08570437

0

0

0.12018129

0.06506007

0.06902213

0.13908498

0.00156358

0

0.00518435

24

0.04031068

0

0.00176432

0.00446399

6.61E-05

0.05584037

0

0.00126901

0

0

0.02264961

0

0.34463646

0

0.00214235

0.35682024

0

0.00426075

0.10232124

0

0

0.06345487


R提示
> for(i in 1:ncol(rt)){
+   normalData=rt[1:normal,i]
+   tumorData=rt[(normal+1):(normal+tumor),i]
+   vioplot(normalData,at=3*(i-1),lty=1,add = T,col = 'blue')
+   vioplot(tumorData,at=3*(i-1)+1,lty=1,add = T,col = 'red')
+   wilcoxTest=wilcox.test(normalData,tumorData)
+   p=round(wilcoxTest$p.value,3)
+   mx=max(c(normalData,tumorData))
+   lines(c(x=3*(i-1)+0.2,x=3*(i-1)+0.8),c(mx,mx))
+   text(x=3*(i-1)+0.5,y=mx+0.02,labels=ifelse(p<0.001,paste0("p<0.001"),paste0("p=",p)),cex = 0.8)
+   text(seq(1,64,3),-0.05,xpd = NA,labels=colnames(rt),cex = 1,srt = 45,pos=2)
+ }
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
Error in cut.default(x, breaks = breaks) : 'breaks' are not unique

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 00:09