-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathREADME.html
1473 lines (1462 loc) · 195 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
@font-face {
font-family: octicons-link;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');
}
body {
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
color: #333;
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
strong {
font-weight: bold;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
img {
border: 0;
}
hr {
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre {
font-family: monospace, monospace;
font-size: 1em;
}
input {
color: inherit;
font: inherit;
margin: 0;
}
html input[disabled] {
cursor: default;
}
input {
line-height: normal;
}
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
* {
box-sizing: border-box;
}
input {
font: 13px / 1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
a {
color: #4078c0;
text-decoration: none;
}
a:hover,
a:active {
text-decoration: underline;
}
hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
hr:before {
display: table;
content: "";
}
hr:after {
display: table;
clear: both;
content: "";
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
h1 {
font-size: 30px;
}
h2 {
font-size: 21px;
}
h3 {
font-size: 16px;
}
h4 {
font-size: 14px;
}
h5 {
font-size: 12px;
}
h6 {
font-size: 11px;
}
blockquote {
margin: 0;
}
ul,
ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ol ol,
ul ol {
list-style-type: lower-roman;
}
ul ul ol,
ul ol ol,
ol ul ol,
ol ol ol {
list-style-type: lower-alpha;
}
dd {
margin-left: 0;
}
code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.select::-ms-expand {
opacity: 0;
}
.octicon {
font: normal normal normal 16px/1 octicons-link;
display: inline-block;
text-decoration: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.octicon-link:before {
content: '\f05c';
}
.markdown-body:before {
display: table;
content: "";
}
.markdown-body:after {
display: table;
clear: both;
content: "";
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
a:not([href]) {
color: inherit;
text-decoration: none;
}
.anchor {
display: inline-block;
padding-right: 2px;
margin-left: -18px;
}
.anchor:focus {
outline: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
h1 .octicon-link,
h2 .octicon-link,
h3 .octicon-link,
h4 .octicon-link,
h5 .octicon-link,
h6 .octicon-link {
color: #000;
vertical-align: middle;
visibility: hidden;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
text-decoration: none;
}
h1:hover .anchor .octicon-link,
h2:hover .anchor .octicon-link,
h3:hover .anchor .octicon-link,
h4:hover .anchor .octicon-link,
h5:hover .anchor .octicon-link,
h6:hover .anchor .octicon-link {
visibility: visible;
}
h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
h1 .anchor {
line-height: 1;
}
h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
h2 .anchor {
line-height: 1;
}
h3 {
font-size: 1.5em;
line-height: 1.43;
}
h3 .anchor {
line-height: 1.2;
}
h4 {
font-size: 1.25em;
}
h4 .anchor {
line-height: 1.2;
}
h5 {
font-size: 1em;
}
h5 .anchor {
line-height: 1.1;
}
h6 {
font-size: 1em;
color: #777;
}
h6 .anchor {
line-height: 1.1;
}
p,
blockquote,
ul,
ol,
dl,
table,
pre {
margin-top: 0;
margin-bottom: 16px;
}
hr {
height: 4px;
padding: 0;
margin: 16px 0;
background-color: #e7e7e7;
border: 0 none;
}
ul,
ol {
padding-left: 2em;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-top: 0;
margin-bottom: 0;
}
li>p {
margin-top: 16px;
}
dl {
padding: 0;
}
dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
blockquote>:first-child {
margin-top: 0;
}
blockquote>:last-child {
margin-bottom: 0;
}
table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
table th {
font-weight: bold;
}
table th,
table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
img {
max-width: 100%;
box-sizing: content-box;
background-color: #fff;
}
code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0,0,0,0.04);
border-radius: 3px;
}
code:before,
code:after {
letter-spacing: -0.2em;
content: "\00a0";
}
pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.highlight {
margin-bottom: 16px;
}
.highlight pre,
pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.highlight pre {
margin-bottom: 0;
word-break: normal;
}
pre {
word-wrap: normal;
}
pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
pre code:before,
pre code:after {
content: normal;
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.pl-c {
color: #969896;
}
.pl-c1,
.pl-s .pl-v {
color: #0086b3;
}
.pl-e,
.pl-en {
color: #795da3;
}
.pl-s .pl-s1,
.pl-smi {
color: #333;
}
.pl-ent {
color: #63a35c;
}
.pl-k {
color: #a71d5d;
}
.pl-pds,
.pl-s,
.pl-s .pl-pse .pl-s1,
.pl-sr,
.pl-sr .pl-cce,
.pl-sr .pl-sra,
.pl-sr .pl-sre {
color: #183691;
}
.pl-v {
color: #ed6a43;
}
.pl-id {
color: #b52a1d;
}
.pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.pl-ml {
color: #693a17;
}
.pl-mh,
.pl-mh .pl-en,
.pl-ms {
color: #1d3e81;
font-weight: bold;
}
.pl-mq {
color: #008080;
}
.pl-mi {
color: #333;
font-style: italic;
}
.pl-mb {
color: #333;
font-weight: bold;
}
.pl-md {
background-color: #ffecec;
color: #bd2c00;
}
.pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.pl-mdr {
color: #795da3;
font-weight: bold;
}
.pl-mo {
color: #1d3e81;
}
kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.task-list-item {
list-style-type: none;
}
.task-list-item+.task-list-item {
margin-top: 3px;
}
.task-list-item input {
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
:checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4078c0;
}
.sourceLine {
display: inline-block;
}
code .kw { color: #000000; }
code .dt { color: #ed6a43; }
code .dv { color: #009999; }
code .bn { color: #009999; }
code .fl { color: #009999; }
code .ch { color: #009999; }
code .st { color: #183691; }
code .co { color: #969896; }
code .ot { color: #0086b3; }
code .al { color: #a61717; }
code .fu { color: #63a35c; }
code .er { color: #a61717; background-color: #e3d2d2; }
code .wa { color: #000000; }
code .cn { color: #008080; }
code .sc { color: #008080; }
code .vs { color: #183691; }
code .ss { color: #183691; }
code .im { color: #000000; }
code .va {color: #008080; }
code .cf { color: #000000; }
code .op { color: #000000; }
code .bu { color: #000000; }
code .ex { color: #000000; }
code .pp { color: #999999; }
code .at { color: #008080; }
code .do { color: #969896; }
code .an { color: #008080; }
code .cv { color: #008080; }
code .in { color: #008080; }
</style>
<style>
body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
padding-top: 0px;
}
</style>
</head>
<body>
<!-- README.md is generated from README.Rmd. Please edit that file -->
<h1 id="clinspacy">clinspacy</h1>
<!-- badges: start -->
<p><a href="https://lifecycle.r-lib.org/articles/stages.html#stable"><img src="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iOTgiIGhlaWdodD0iMjAiIHJvbGU9ImltZyIgYXJpYS1sYWJlbD0ibGlmZWN5Y2xlOiBzdGFibGUiPjx0aXRsZT5saWZlY3ljbGU6IHN0YWJsZTwvdGl0bGU+PGxpbmVhckdyYWRpZW50IGlkPSJzIiB4Mj0iMCIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2JiYiIgc3RvcC1vcGFjaXR5PSIuMSIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1vcGFjaXR5PSIuMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJyIj48cmVjdCB3aWR0aD0iOTgiIGhlaWdodD0iMjAiIHJ4PSIzIiBmaWxsPSIjZmZmIi8+PC9jbGlwUGF0aD48ZyBjbGlwLXBhdGg9InVybCgjcikiPjxyZWN0IHdpZHRoPSI1NSIgaGVpZ2h0PSIyMCIgZmlsbD0iIzU1NSIvPjxyZWN0IHg9IjU1IiB3aWR0aD0iNDMiIGhlaWdodD0iMjAiIGZpbGw9IiM0YzEiLz48cmVjdCB3aWR0aD0iOTgiIGhlaWdodD0iMjAiIGZpbGw9InVybCgjcykiLz48L2c+PGcgZmlsbD0iI2ZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC1mYW1pbHk9IlZlcmRhbmEsR2VuZXZhLERlamFWdSBTYW5zLHNhbnMtc2VyaWYiIHRleHQtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iIGZvbnQtc2l6ZT0iMTEwIj48dGV4dCBhcmlhLWhpZGRlbj0idHJ1ZSIgeD0iMjg1IiB5PSIxNTAiIGZpbGw9IiMwMTAxMDEiIGZpbGwtb3BhY2l0eT0iLjMiIHRyYW5zZm9ybT0ic2NhbGUoLjEpIiB0ZXh0TGVuZ3RoPSI0NTAiPmxpZmVjeWNsZTwvdGV4dD48dGV4dCB4PSIyODUiIHk9IjE0MCIgdHJhbnNmb3JtPSJzY2FsZSguMSkiIGZpbGw9IiNmZmYiIHRleHRMZW5ndGg9IjQ1MCI+bGlmZWN5Y2xlPC90ZXh0Pjx0ZXh0IGFyaWEtaGlkZGVuPSJ0cnVlIiB4PSI3NTUiIHk9IjE1MCIgZmlsbD0iIzAxMDEwMSIgZmlsbC1vcGFjaXR5PSIuMyIgdHJhbnNmb3JtPSJzY2FsZSguMSkiIHRleHRMZW5ndGg9IjMzMCI+c3RhYmxlPC90ZXh0Pjx0ZXh0IHg9Ijc1NSIgeT0iMTQwIiB0cmFuc2Zvcm09InNjYWxlKC4xKSIgZmlsbD0iI2ZmZiIgdGV4dExlbmd0aD0iMzMwIj5zdGFibGU8L3RleHQ+PC9nPjwvc3ZnPg==" alt="Lifecycle: stable" /></a></p>
<!-- badges: end -->
<p>The goal of clinspacy is to perform biomedical named entity recognition, Unified Medical Language System (UMLS) concept mapping, and negation detection using the Python spaCy, scispacy, and medspacy packages.</p>
<h2 id="installation">Installation</h2>
<p>You can install the CRAN version of clinspacy with:</p>
<pre><code>install.packages('clinspacy')
</code></pre>
<p>You can install the GitHub version of clinspacy with:</p>
<pre><code>remotes::install_github('ML4LHS/clinspacy', INSTALL_opts = '--no-multiarch')
</code></pre>
<h2 id="how-to-load-clinspacy">How to load clinspacy</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw">library</span>(clinspacy)</a></code></pre></div>
<h2 id="initiating-clinspacy">Initiating clinspacy</h2>
<p><em>Note: the very first time you run <code>clinspacy_init()</code> or <code>clinspacy()</code> after installing the package, you may receive an error stating that <code>spaCy</code> was unable to be imported because it was not found. Restarting your R session should resolve the issue.</em></p>
<p>Initiating clinspacy is optional. If you do not initiate the package using <code>clinspacy_init()</code>, it will be automatically initiated without the UMLS linker. The UMLS linker takes up ~12 GB of RAM, so if you would like to use the linker, you can initiate clinspacy with the linker. The linker can still be added on later by reinitiating with the <code>use_linker</code> argument set to <code>TRUE</code>.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"><span class="kw">clinspacy_init</span>() <span class="co"># This is optional! The default functionality is to initiatie clinspacy without the UMLS linker</span></a></code></pre></div>
<h2 id="named-entity-recognition-without-the-umls-linker">Named entity recognition (without the UMLS linker)</h2>
<p>The <code>clinspacy()</code> function can take a single string, a character vector, or a data frame. It can output either a data frame or a file name.</p>
<h3 id="a-single-character-string-as-input">A single character string as input</h3>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="kw">clinspacy</span>(<span class="st">'This patient has diabetes and CKD stage 3 but no HTN.'</span>)</a>
<a class="sourceLine" id="cb5-2" title="2"><span class="co">#> | | | 0% | |==============================================================================================================| 100%</span></a>
<a class="sourceLine" id="cb5-3" title="3"><span class="co">#> clinspacy_id entity lemma is_family is_historical is_hypothetical is_negated is_uncertain section_category</span></a>
<a class="sourceLine" id="cb5-4" title="4"><span class="co">#> 1 1 patient patient FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb5-5" title="5"><span class="co">#> 2 1 diabetes diabetes FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb5-6" title="6"><span class="co">#> 3 1 CKD stage 3 ckd stage 3 FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb5-7" title="7"><span class="co">#> 4 1 HTN htn FALSE FALSE FALSE TRUE FALSE <NA></span></a>
<a class="sourceLine" id="cb5-8" title="8"></a>
<a class="sourceLine" id="cb5-9" title="9"><span class="kw">clinspacy</span>(<span class="st">'HISTORY: He presents with chest pain. PMH: HTN. MEDICATIONS: This patient with diabetes is taking omeprazole, aspirin, and lisinopril 10 mg but is not taking albuterol anymore as his asthma has resolved. ALLERGIES: penicillin.'</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a>
<a class="sourceLine" id="cb5-10" title="10"><span class="co">#> clinspacy_id entity lemma is_family is_historical is_hypothetical is_negated is_uncertain</span></a>
<a class="sourceLine" id="cb5-11" title="11"><span class="co">#> 1 1 chest pain chest pain FALSE TRUE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-12" title="12"><span class="co">#> 2 1 PMH PMH FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-13" title="13"><span class="co">#> 3 1 HTN htn FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-14" title="14"><span class="co">#> 4 1 patient patient FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-15" title="15"><span class="co">#> 5 1 diabetes diabetes FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-16" title="16"><span class="co">#> 6 1 omeprazole omeprazole FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-17" title="17"><span class="co">#> 7 1 aspirin aspirin FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-18" title="18"><span class="co">#> 8 1 lisinopril lisinopril FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-19" title="19"><span class="co">#> 9 1 albuterol albuterol FALSE FALSE FALSE TRUE FALSE</span></a>
<a class="sourceLine" id="cb5-20" title="20"><span class="co">#> 10 1 asthma asthma FALSE FALSE FALSE TRUE FALSE</span></a>
<a class="sourceLine" id="cb5-21" title="21"><span class="co">#> 11 1 penicillin penicillin FALSE FALSE FALSE FALSE FALSE</span></a>
<a class="sourceLine" id="cb5-22" title="22"><span class="co">#> section_category</span></a>
<a class="sourceLine" id="cb5-23" title="23"><span class="co">#> 1 <NA></span></a>
<a class="sourceLine" id="cb5-24" title="24"><span class="co">#> 2 past_medical_history</span></a>
<a class="sourceLine" id="cb5-25" title="25"><span class="co">#> 3 past_medical_history</span></a>
<a class="sourceLine" id="cb5-26" title="26"><span class="co">#> 4 medications</span></a>
<a class="sourceLine" id="cb5-27" title="27"><span class="co">#> 5 medications</span></a>
<a class="sourceLine" id="cb5-28" title="28"><span class="co">#> 6 medications</span></a>
<a class="sourceLine" id="cb5-29" title="29"><span class="co">#> 7 medications</span></a>
<a class="sourceLine" id="cb5-30" title="30"><span class="co">#> 8 medications</span></a>
<a class="sourceLine" id="cb5-31" title="31"><span class="co">#> 9 medications</span></a>
<a class="sourceLine" id="cb5-32" title="32"><span class="co">#> 10 medications</span></a>
<a class="sourceLine" id="cb5-33" title="33"><span class="co">#> 11 allergies</span></a></code></pre></div>
<h3 id="a-character-vector-as-input">A character vector as input</h3>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="kw">clinspacy</span>(<span class="kw">c</span>(<span class="st">'This pt has CKD and HTN'</span>, <span class="st">'Pt only has CKD but no HTN'</span>),</a>
<a class="sourceLine" id="cb6-2" title="2"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a>
<a class="sourceLine" id="cb6-3" title="3"><span class="co">#> clinspacy_id entity lemma is_family is_historical is_hypothetical is_negated is_uncertain section_category</span></a>
<a class="sourceLine" id="cb6-4" title="4"><span class="co">#> 1 1 CKD ckd FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb6-5" title="5"><span class="co">#> 2 1 HTN htn FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb6-6" title="6"><span class="co">#> 3 2 Pt pt FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb6-7" title="7"><span class="co">#> 4 2 CKD ckd FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb6-8" title="8"><span class="co">#> 5 2 HTN htn FALSE FALSE FALSE TRUE FALSE <NA></span></a></code></pre></div>
<h3 id="a-data-frame-as-input">A data frame as input</h3>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1"><span class="kw">data.frame</span>(<span class="dt">text =</span> <span class="kw">c</span>(<span class="st">'This pt has CKD and HTN'</span>, <span class="st">'Diabetes is present'</span>),</a>
<a class="sourceLine" id="cb7-2" title="2"> <span class="dt">stringsAsFactors =</span> <span class="ot">FALSE</span>) <span class="op">%>%</span></a>
<a class="sourceLine" id="cb7-3" title="3"><span class="st"> </span><span class="kw">clinspacy</span>(<span class="dt">df_col =</span> <span class="st">'text'</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a>
<a class="sourceLine" id="cb7-4" title="4"><span class="co">#> clinspacy_id entity lemma is_family is_historical is_hypothetical is_negated is_uncertain section_category</span></a>
<a class="sourceLine" id="cb7-5" title="5"><span class="co">#> 1 1 CKD ckd FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb7-6" title="6"><span class="co">#> 2 1 HTN htn FALSE FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb7-7" title="7"><span class="co">#> 3 2 Diabetes Diabetes FALSE FALSE FALSE FALSE FALSE <NA></span></a></code></pre></div>
<h3 id="saving-the-output-to-file">Saving the output to file</h3>
<p>The <code>output_file</code> can then be piped into <code>bind_clinspacy()</code> or <code>bind_clinspacy_embeddings()</code>. This saves a lot of time because you can try different strategies of subsetting in both of these functions without needing to re-process the original data.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1"><span class="cf">if</span> (<span class="op">!</span><span class="kw">dir.exists</span>(rappdirs<span class="op">::</span><span class="kw">user_data_dir</span>(<span class="st">'clinspacy'</span>))) {</a>
<a class="sourceLine" id="cb8-2" title="2"> <span class="kw">dir.create</span>(rappdirs<span class="op">::</span><span class="kw">user_data_dir</span>(<span class="st">'clinspacy'</span>), <span class="dt">recursive =</span> <span class="ot">TRUE</span>)</a>
<a class="sourceLine" id="cb8-3" title="3">}</a>
<a class="sourceLine" id="cb8-4" title="4"></a>
<a class="sourceLine" id="cb8-5" title="5">mtsamples =<span class="st"> </span><span class="kw">dataset_mtsamples</span>()</a>
<a class="sourceLine" id="cb8-6" title="6"></a>
<a class="sourceLine" id="cb8-7" title="7">mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>,]</a>
<a class="sourceLine" id="cb8-8" title="8"><span class="co">#> note_id description medical_specialty</span></a>
<a class="sourceLine" id="cb8-9" title="9"><span class="co">#> 1 1 A 23-year-old white female presents with complaint of allergies. Allergy / Immunology</span></a>
<a class="sourceLine" id="cb8-10" title="10"><span class="co">#> 2 2 Consult for laparoscopic gastric bypass. Bariatrics</span></a>
<a class="sourceLine" id="cb8-11" title="11"><span class="co">#> 3 3 Consult for laparoscopic gastric bypass. Bariatrics</span></a>
<a class="sourceLine" id="cb8-12" title="12"><span class="co">#> 4 4 2-D M-Mode. Doppler. Cardiovascular / Pulmonary</span></a>
<a class="sourceLine" id="cb8-13" title="13"><span class="co">#> 5 5 2-D Echocardiogram Cardiovascular / Pulmonary</span></a>
<a class="sourceLine" id="cb8-14" title="14"><span class="co">#> sample_name</span></a>
<a class="sourceLine" id="cb8-15" title="15"><span class="co">#> 1 Allergic Rhinitis</span></a>
<a class="sourceLine" id="cb8-16" title="16"><span class="co">#> 2 Laparoscopic Gastric Bypass Consult - 2</span></a>
<a class="sourceLine" id="cb8-17" title="17"><span class="co">#> 3 Laparoscopic Gastric Bypass Consult - 1</span></a>
<a class="sourceLine" id="cb8-18" title="18"><span class="co">#> 4 2-D Echocardiogram - 1</span></a>
<a class="sourceLine" id="cb8-19" title="19"><span class="co">#> 5 2-D Echocardiogram - 2</span></a>
<a class="sourceLine" id="cb8-20" title="20"><span class="co">#> transcription</span></a>
<a class="sourceLine" id="cb8-21" title="21"><span class="co">#> 1 SUBJECTIVE:, This 23-year-old white female presents with complaint of allergies. She used to have allergies when she lived in Seattle but she thinks they are worse here. In the past, she has tried Claritin, and Zyrtec. Both worked for short time but then seemed to lose effectiveness. She has used Allegra also. She used that last summer and she began using it again two weeks ago. It does not appear to be working very well. She has used over-the-counter sprays but no prescription nasal sprays. She does have asthma but doest not require daily medication for this and does not think it is flaring up.,MEDICATIONS: , Her only medication currently is Ortho Tri-Cyclen and the Allegra.,ALLERGIES: , She has no known medicine allergies.,OBJECTIVE:,Vitals: Weight was 130 pounds and blood pressure 124/78.,HEENT: Her throat was mildly erythematous without exudate. Nasal mucosa was erythematous and swollen. Only clear drainage was seen. TMs were clear.,Neck: Supple without adenopathy.,Lungs: Clear.,ASSESSMENT:, Allergic rhinitis.,PLAN:,1. She will try Zyrtec instead of Allegra again. Another option will be to use loratadine. She does not think she has prescription coverage so that might be cheaper.,2. Samples of Nasonex two sprays in each nostril given for three weeks. A prescription was written as well.</span></a>
<a class="sourceLine" id="cb8-22" title="22"><span class="co">#> 2 PAST MEDICAL HISTORY:, He has difficulty climbing stairs, difficulty with airline seats, tying shoes, used to public seating, and lifting objects off the floor. He exercises three times a week at home and does cardio. He has difficulty walking two blocks or five flights of stairs. Difficulty with snoring. He has muscle and joint pains including knee pain, back pain, foot and ankle pain, and swelling. He has gastroesophageal reflux disease.,PAST SURGICAL HISTORY:, Includes reconstructive surgery on his right hand 13 years ago. ,SOCIAL HISTORY:, He is currently single. He has about ten drinks a year. He had smoked significantly up until several months ago. He now smokes less than three cigarettes a day.,FAMILY HISTORY:, Heart disease in both grandfathers, grandmother with stroke, and a grandmother with diabetes. Denies obesity and hypertension in other family members.,CURRENT MEDICATIONS:, None.,ALLERGIES:, He is allergic to Penicillin.,MISCELLANEOUS/EATING HISTORY:, He has been going to support groups for seven months with Lynn Holmberg in Greenwich and he is from Eastchester, New York and he feels that we are the appropriate program. He had a poor experience with the Greenwich program. Eating history, he is not an emotional eater. Does not like sweets. He likes big portions and carbohydrates. He likes chicken and not steak. He currently weighs 312 pounds. Ideal body weight would be 170 pounds. He is 142 pounds overweight. If ,he lost 60% of his excess body weight that would be 84 pounds and he should weigh about 228.,REVIEW OF SYSTEMS: ,Negative for head, neck, heart, lungs, GI, GU, orthopedic, and skin. Specifically denies chest pain, heart attack, coronary artery disease, congestive heart failure, arrhythmia, atrial fibrillation, pacemaker, high cholesterol, pulmonary embolism, high blood pressure, CVA, venous insufficiency, thrombophlebitis, asthma, shortness of breath, COPD, emphysema, sleep apnea, diabetes, leg and foot swelling, osteoarthritis, rheumatoid arthritis, hiatal hernia, peptic ulcer disease, gallstones, infected gallbladder, pancreatitis, fatty liver, hepatitis, hemorrhoids, rectal bleeding, polyps, incontinence of stool, urinary stress incontinence, or cancer. Denies cellulitis, pseudotumor cerebri, meningitis, or encephalitis.,PHYSICAL EXAMINATION:, He is alert and oriented x 3. Cranial nerves II-XII are intact. Afebrile. Vital Signs are stable.</span></a>
<a class="sourceLine" id="cb8-23" title="23"><span class="co">#> 3 HISTORY OF PRESENT ILLNESS: , I have seen ABC today. He is a very pleasant gentleman who is 42 years old, 344 pounds. He is 5'9". He has a BMI of 51. He has been overweight for ten years since the age of 33, at his highest he was 358 pounds, at his lowest 260. He is pursuing surgical attempts of weight loss to feel good, get healthy, and begin to exercise again. He wants to be able to exercise and play volleyball. Physically, he is sluggish. He gets tired quickly. He does not go out often. When he loses weight he always regains it and he gains back more than he lost. His biggest weight loss is 25 pounds and it was three months before he gained it back. He did six months of not drinking alcohol and not taking in many calories. He has been on multiple commercial weight loss programs including Slim Fast for one month one year ago and Atkin's Diet for one month two years ago.,PAST MEDICAL HISTORY: , He has difficulty climbing stairs, difficulty with airline seats, tying shoes, used to public seating, difficulty walking, high cholesterol, and high blood pressure. He has asthma and difficulty walking two blocks or going eight to ten steps. He has sleep apnea and snoring. He is a diabetic, on medication. He has joint pain, knee pain, back pain, foot and ankle pain, leg and foot swelling. He has hemorrhoids.,PAST SURGICAL HISTORY: , Includes orthopedic or knee surgery.,SOCIAL HISTORY: , He is currently single. He drinks alcohol ten to twelve drinks a week, but does not drink five days a week and then will binge drink. He smokes one and a half pack a day for 15 years, but he has recently stopped smoking for the past two weeks.,FAMILY HISTORY: , Obesity, heart disease, and diabetes. Family history is negative for hypertension and stroke.,CURRENT MEDICATIONS:, Include Diovan, Crestor, and Tricor.,MISCELLANEOUS/EATING HISTORY: ,He says a couple of friends of his have had heart attacks and have had died. He used to drink everyday, but stopped two years ago. He now only drinks on weekends. He is on his second week of Chantix, which is a medication to come off smoking completely. Eating, he eats bad food. He is single. He eats things like bacon, eggs, and cheese, cheeseburgers, fast food, eats four times a day, seven in the morning, at noon, 9 p.m., and 2 a.m. He currently weighs 344 pounds and 5'9". His ideal body weight is 160 pounds. He is 184 pounds overweight. If he lost 70% of his excess body weight that would be 129 pounds and that would get him down to 215.,REVIEW OF SYSTEMS: , Negative for head, neck, heart, lungs, GI, GU, orthopedic, or skin. He also is positive for gout. He denies chest pain, heart attack, coronary artery disease, congestive heart failure, arrhythmia, atrial fibrillation, pacemaker, pulmonary embolism, or CVA. He denies venous insufficiency or thrombophlebitis. Denies shortness of breath, COPD, or emphysema. Denies thyroid problems, hip pain, osteoarthritis, rheumatoid arthritis, GERD, hiatal hernia, peptic ulcer disease, gallstones, infected gallbladder, pancreatitis, fatty liver, hepatitis, rectal bleeding, polyps, incontinence of stool, urinary stress incontinence, or cancer. He denies cellulitis, pseudotumor cerebri, meningitis, or encephalitis.,PHYSICAL EXAMINATION: ,He is alert and oriented x 3. Cranial nerves II-XII are intact. Neck is soft and supple. Lungs: He has positive wheezing bilaterally. Heart is regular rhythm and rate. His abdomen is soft. Extremities: He has 1+ pitting edema.,IMPRESSION/PLAN:, I have explained to him the risks and potential complications of laparoscopic gastric bypass in detail and these include bleeding, infection, deep venous thrombosis, pulmonary embolism, leakage from the gastrojejuno-anastomosis, jejunojejuno-anastomosis, and possible bowel obstruction among other potential complications. He understands. He wants to proceed with workup and evaluation for laparoscopic Roux-en-Y gastric bypass. He will need to get a letter of approval from Dr. XYZ. He will need to see a nutritionist and mental health worker. He will need an upper endoscopy by either Dr. XYZ. He will need to go to Dr. XYZ as he previously had a sleep study. We will need another sleep study. He will need H. pylori testing, thyroid function tests, LFTs, glycosylated hemoglobin, and fasting blood sugar. After this is performed, we will submit him for insurance approval.</span></a>
<a class="sourceLine" id="cb8-24" title="24"><span class="co">#> 4 2-D M-MODE: , ,1. Left atrial enlargement with left atrial diameter of 4.7 cm.,2. Normal size right and left ventricle.,3. Normal LV systolic function with left ventricular ejection fraction of 51%.,4. Normal LV diastolic function.,5. No pericardial effusion.,6. Normal morphology of aortic valve, mitral valve, tricuspid valve, and pulmonary valve.,7. PA systolic pressure is 36 mmHg.,DOPPLER: , ,1. Mild mitral and tricuspid regurgitation.,2. Trace aortic and pulmonary regurgitation.</span></a>
<a class="sourceLine" id="cb8-25" title="25"><span class="co">#> 5 1. The left ventricular cavity size and wall thickness appear normal. The wall motion and left ventricular systolic function appears hyperdynamic with estimated ejection fraction of 70% to 75%. There is near-cavity obliteration seen. There also appears to be increased left ventricular outflow tract gradient at the mid cavity level consistent with hyperdynamic left ventricular systolic function. There is abnormal left ventricular relaxation pattern seen as well as elevated left atrial pressures seen by Doppler examination.,2. The left atrium appears mildly dilated.,3. The right atrium and right ventricle appear normal.,4. The aortic root appears normal.,5. The aortic valve appears calcified with mild aortic valve stenosis, calculated aortic valve area is 1.3 cm square with a maximum instantaneous gradient of 34 and a mean gradient of 19 mm.,6. There is mitral annular calcification extending to leaflets and supportive structures with thickening of mitral valve leaflets with mild mitral regurgitation.,7. The tricuspid valve appears normal with trace tricuspid regurgitation with moderate pulmonary artery hypertension. Estimated pulmonary artery systolic pressure is 49 mmHg. Estimated right atrial pressure of 10 mmHg.,8. The pulmonary valve appears normal with trace pulmonary insufficiency.,9. There is no pericardial effusion or intracardiac mass seen.,10. There is a color Doppler suggestive of a patent foramen ovale with lipomatous hypertrophy of the interatrial septum.,11. The study was somewhat technically limited and hence subtle abnormalities could be missed from the study.,</span></a>
<a class="sourceLine" id="cb8-26" title="26"><span class="co">#> keywords</span></a>
<a class="sourceLine" id="cb8-27" title="27"><span class="co">#> 1 allergy / immunology, allergic rhinitis, allergies, asthma, nasal sprays, rhinitis, nasal, erythematous, allegra, sprays, allergic,</span></a>
<a class="sourceLine" id="cb8-28" title="28"><span class="co">#> 2 bariatrics, laparoscopic gastric bypass, weight loss programs, gastric bypass, atkin's diet, weight watcher's, body weight, laparoscopic gastric, weight loss, pounds, months, weight, laparoscopic, band, loss, diets, overweight, lost</span></a>
<a class="sourceLine" id="cb8-29" title="29"><span class="co">#> 3 bariatrics, laparoscopic gastric bypass, heart attacks, body weight, pulmonary embolism, potential complications, sleep study, weight loss, gastric bypass, anastomosis, loss, sleep, laparoscopic, gastric, bypass, heart, pounds, weight,</span></a>
<a class="sourceLine" id="cb8-30" title="30"><span class="co">#> 4 cardiovascular / pulmonary, 2-d m-mode, doppler, aortic valve, atrial enlargement, diastolic function, ejection fraction, mitral, mitral valve, pericardial effusion, pulmonary valve, regurgitation, systolic function, tricuspid, tricuspid valve, normal lv</span></a>
<a class="sourceLine" id="cb8-31" title="31"><span class="co">#> 5 cardiovascular / pulmonary, 2-d, doppler, echocardiogram, annular, aortic root, aortic valve, atrial, atrium, calcification, cavity, ejection fraction, mitral, obliteration, outflow, regurgitation, relaxation pattern, stenosis, systolic function, tricuspid, valve, ventricular, ventricular cavity, wall motion, pulmonary artery</span></a>
<a class="sourceLine" id="cb8-32" title="32"></a>
<a class="sourceLine" id="cb8-33" title="33">clinspacy_output_file =<span class="st"> </span></a>
<a class="sourceLine" id="cb8-34" title="34"><span class="st"> </span>mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>] <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb8-35" title="35"><span class="st"> </span><span class="kw">clinspacy</span>(<span class="dt">df_col =</span> <span class="st">'description'</span>,</a>
<a class="sourceLine" id="cb8-36" title="36"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>,</a>
<a class="sourceLine" id="cb8-37" title="37"> <span class="dt">output_file =</span> <span class="kw">file.path</span>(rappdirs<span class="op">::</span><span class="kw">user_data_dir</span>(<span class="st">'clinspacy'</span>),</a>
<a class="sourceLine" id="cb8-38" title="38"> <span class="st">'output.csv'</span>),</a>
<a class="sourceLine" id="cb8-39" title="39"> <span class="dt">overwrite =</span> <span class="ot">TRUE</span>)</a>
<a class="sourceLine" id="cb8-40" title="40"></a>
<a class="sourceLine" id="cb8-41" title="41">clinspacy_output_file</a>
<a class="sourceLine" id="cb8-42" title="42"><span class="co">#> [1] "C:\\Users\\kdpsingh\\AppData\\Local\\clinspacy\\clinspacy/output.csv"</span></a></code></pre></div>
<h2 id="binding-named-entities-to-a-data-frame-without-the-umls-linker">Binding named entities to a data frame (without the UMLS linker)</h2>
<p>Negated concepts, as identified by the medspacy cycontext flag, are ignored by default and do not count towards the frequencies. However, you can now change the subsetting criteria.</p>
<p>Note that you now need to re-provide the original dataset to the <code>bind_clinspacy()</code> function.</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1">mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>] <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb9-2" title="2"><span class="st"> </span><span class="kw">clinspacy</span>(<span class="dt">df_col =</span> <span class="st">'description'</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>) <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb9-3" title="3"><span class="st"> </span><span class="kw">bind_clinspacy</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>])</a>
<a class="sourceLine" id="cb9-4" title="4"><span class="co">#> clinspacy_id note_id description 2-d 2-d m-mode allergy</span></a>
<a class="sourceLine" id="cb9-5" title="5"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. 0 0 1</span></a>
<a class="sourceLine" id="cb9-6" title="6"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb9-7" title="7"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb9-8" title="8"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. 0 1 0</span></a>
<a class="sourceLine" id="cb9-9" title="9"><span class="co">#> 5 5 5 2-D Echocardiogram 1 0 0</span></a>
<a class="sourceLine" id="cb9-10" title="10"><span class="co">#> complaint consult doppler echocardiogram laparoscopic gastric bypass white female</span></a>
<a class="sourceLine" id="cb9-11" title="11"><span class="co">#> 1 1 0 0 0 0 1</span></a>
<a class="sourceLine" id="cb9-12" title="12"><span class="co">#> 2 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb9-13" title="13"><span class="co">#> 3 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb9-14" title="14"><span class="co">#> 4 0 0 1 0 0 0</span></a>
<a class="sourceLine" id="cb9-15" title="15"><span class="co">#> 5 0 0 0 1 0 0</span></a></code></pre></div>
<h3 id="we-can-also-store-the-intermediate-result-so-that-bind_clinspacy-does-not-need-to-re-process-the-text">We can also store the intermediate result so that bind_clinspacy() does not need to re-process the text.</h3>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" title="1">clinspacy_output_data =<span class="st"> </span></a>
<a class="sourceLine" id="cb10-2" title="2"><span class="st"> </span>mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>] <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb10-3" title="3"><span class="st"> </span><span class="kw">clinspacy</span>(<span class="dt">df_col =</span> <span class="st">'description'</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a>
<a class="sourceLine" id="cb10-4" title="4"></a>
<a class="sourceLine" id="cb10-5" title="5">clinspacy_output_data <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb10-6" title="6"><span class="st"> </span><span class="kw">bind_clinspacy</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>])</a>
<a class="sourceLine" id="cb10-7" title="7"><span class="co">#> clinspacy_id note_id description 2-d 2-d m-mode allergy</span></a>
<a class="sourceLine" id="cb10-8" title="8"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. 0 0 1</span></a>
<a class="sourceLine" id="cb10-9" title="9"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb10-10" title="10"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb10-11" title="11"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. 0 1 0</span></a>
<a class="sourceLine" id="cb10-12" title="12"><span class="co">#> 5 5 5 2-D Echocardiogram 1 0 0</span></a>
<a class="sourceLine" id="cb10-13" title="13"><span class="co">#> complaint consult doppler echocardiogram laparoscopic gastric bypass white female</span></a>
<a class="sourceLine" id="cb10-14" title="14"><span class="co">#> 1 1 0 0 0 0 1</span></a>
<a class="sourceLine" id="cb10-15" title="15"><span class="co">#> 2 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-16" title="16"><span class="co">#> 3 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-17" title="17"><span class="co">#> 4 0 0 1 0 0 0</span></a>
<a class="sourceLine" id="cb10-18" title="18"><span class="co">#> 5 0 0 0 1 0 0</span></a>
<a class="sourceLine" id="cb10-19" title="19"></a>
<a class="sourceLine" id="cb10-20" title="20">clinspacy_output_data <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb10-21" title="21"><span class="st"> </span><span class="kw">bind_clinspacy</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>],</a>
<a class="sourceLine" id="cb10-22" title="22"> <span class="dt">cs_col =</span> <span class="st">'entity'</span>)</a>
<a class="sourceLine" id="cb10-23" title="23"><span class="co">#> clinspacy_id note_id description 2-D 2-D M-Mode Consult Doppler</span></a>
<a class="sourceLine" id="cb10-24" title="24"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. 0 0 0 0</span></a>
<a class="sourceLine" id="cb10-25" title="25"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-26" title="26"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-27" title="27"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. 0 1 0 1</span></a>
<a class="sourceLine" id="cb10-28" title="28"><span class="co">#> 5 5 5 2-D Echocardiogram 1 0 0 0</span></a>
<a class="sourceLine" id="cb10-29" title="29"><span class="co">#> Echocardiogram allergies complaint laparoscopic gastric bypass white female</span></a>
<a class="sourceLine" id="cb10-30" title="30"><span class="co">#> 1 0 1 1 0 1</span></a>
<a class="sourceLine" id="cb10-31" title="31"><span class="co">#> 2 0 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-32" title="32"><span class="co">#> 3 0 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-33" title="33"><span class="co">#> 4 0 0 0 0 0</span></a>
<a class="sourceLine" id="cb10-34" title="34"><span class="co">#> 5 1 0 0 0 0</span></a>
<a class="sourceLine" id="cb10-35" title="35"></a>
<a class="sourceLine" id="cb10-36" title="36">clinspacy_output_data <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb10-37" title="37"><span class="st"> </span><span class="kw">bind_clinspacy</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>],</a>
<a class="sourceLine" id="cb10-38" title="38"> <span class="dt">subset =</span> <span class="st">'is_uncertain == FALSE & is_negated == FALSE'</span>)</a>
<a class="sourceLine" id="cb10-39" title="39"><span class="co">#> clinspacy_id note_id description 2-d 2-d m-mode allergy</span></a>
<a class="sourceLine" id="cb10-40" title="40"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. 0 0 1</span></a>
<a class="sourceLine" id="cb10-41" title="41"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb10-42" title="42"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb10-43" title="43"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. 0 1 0</span></a>
<a class="sourceLine" id="cb10-44" title="44"><span class="co">#> 5 5 5 2-D Echocardiogram 1 0 0</span></a>
<a class="sourceLine" id="cb10-45" title="45"><span class="co">#> complaint consult doppler echocardiogram laparoscopic gastric bypass white female</span></a>
<a class="sourceLine" id="cb10-46" title="46"><span class="co">#> 1 1 0 0 0 0 1</span></a>
<a class="sourceLine" id="cb10-47" title="47"><span class="co">#> 2 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-48" title="48"><span class="co">#> 3 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb10-49" title="49"><span class="co">#> 4 0 0 1 0 0 0</span></a>
<a class="sourceLine" id="cb10-50" title="50"><span class="co">#> 5 0 0 0 1 0 0</span></a></code></pre></div>
<h3 id="we-can-also-re-use-the-output-file-we-had-created-earlier-and-pipe-this-directly-into-bind_clinspacy">We can also re-use the output file we had created earlier and pipe this directly into bind_clinspacy().</h3>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb11-1" title="1">clinspacy_output_file</a>
<a class="sourceLine" id="cb11-2" title="2"><span class="co">#> [1] "C:\\Users\\kdpsingh\\AppData\\Local\\clinspacy\\clinspacy/output.csv"</span></a>
<a class="sourceLine" id="cb11-3" title="3"></a>
<a class="sourceLine" id="cb11-4" title="4">clinspacy_output_file <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb11-5" title="5"><span class="st"> </span><span class="kw">bind_clinspacy</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>])</a>
<a class="sourceLine" id="cb11-6" title="6"><span class="co">#> clinspacy_id note_id description 2-d 2-d m-mode allergy</span></a>
<a class="sourceLine" id="cb11-7" title="7"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. 0 0 1</span></a>
<a class="sourceLine" id="cb11-8" title="8"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb11-9" title="9"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb11-10" title="10"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. 0 1 0</span></a>
<a class="sourceLine" id="cb11-11" title="11"><span class="co">#> 5 5 5 2-D Echocardiogram 1 0 0</span></a>
<a class="sourceLine" id="cb11-12" title="12"><span class="co">#> complaint consult doppler echocardiogram laparoscopic gastric bypass white female</span></a>
<a class="sourceLine" id="cb11-13" title="13"><span class="co">#> 1 1 0 0 0 0 1</span></a>
<a class="sourceLine" id="cb11-14" title="14"><span class="co">#> 2 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-15" title="15"><span class="co">#> 3 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-16" title="16"><span class="co">#> 4 0 0 1 0 0 0</span></a>
<a class="sourceLine" id="cb11-17" title="17"><span class="co">#> 5 0 0 0 1 0 0</span></a>
<a class="sourceLine" id="cb11-18" title="18"></a>
<a class="sourceLine" id="cb11-19" title="19">clinspacy_output_file <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb11-20" title="20"><span class="st"> </span><span class="kw">bind_clinspacy</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>],</a>
<a class="sourceLine" id="cb11-21" title="21"> <span class="dt">cs_col =</span> <span class="st">'entity'</span>)</a>
<a class="sourceLine" id="cb11-22" title="22"><span class="co">#> clinspacy_id note_id description 2-D 2-D M-Mode Consult Doppler</span></a>
<a class="sourceLine" id="cb11-23" title="23"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. 0 0 0 0</span></a>
<a class="sourceLine" id="cb11-24" title="24"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-25" title="25"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-26" title="26"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. 0 1 0 1</span></a>
<a class="sourceLine" id="cb11-27" title="27"><span class="co">#> 5 5 5 2-D Echocardiogram 1 0 0 0</span></a>
<a class="sourceLine" id="cb11-28" title="28"><span class="co">#> Echocardiogram allergies complaint laparoscopic gastric bypass white female</span></a>
<a class="sourceLine" id="cb11-29" title="29"><span class="co">#> 1 0 1 1 0 1</span></a>
<a class="sourceLine" id="cb11-30" title="30"><span class="co">#> 2 0 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-31" title="31"><span class="co">#> 3 0 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-32" title="32"><span class="co">#> 4 0 0 0 0 0</span></a>
<a class="sourceLine" id="cb11-33" title="33"><span class="co">#> 5 1 0 0 0 0</span></a>
<a class="sourceLine" id="cb11-34" title="34"></a>
<a class="sourceLine" id="cb11-35" title="35">clinspacy_output_file <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb11-36" title="36"><span class="st"> </span><span class="kw">bind_clinspacy</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>],</a>
<a class="sourceLine" id="cb11-37" title="37"> <span class="dt">subset =</span> <span class="st">'is_uncertain == FALSE & is_negated == FALSE'</span>)</a>
<a class="sourceLine" id="cb11-38" title="38"><span class="co">#> clinspacy_id note_id description 2-d 2-d m-mode allergy</span></a>
<a class="sourceLine" id="cb11-39" title="39"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. 0 0 1</span></a>
<a class="sourceLine" id="cb11-40" title="40"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb11-41" title="41"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. 0 0 0</span></a>
<a class="sourceLine" id="cb11-42" title="42"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. 0 1 0</span></a>
<a class="sourceLine" id="cb11-43" title="43"><span class="co">#> 5 5 5 2-D Echocardiogram 1 0 0</span></a>
<a class="sourceLine" id="cb11-44" title="44"><span class="co">#> complaint consult doppler echocardiogram laparoscopic gastric bypass white female</span></a>
<a class="sourceLine" id="cb11-45" title="45"><span class="co">#> 1 1 0 0 0 0 1</span></a>
<a class="sourceLine" id="cb11-46" title="46"><span class="co">#> 2 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-47" title="47"><span class="co">#> 3 0 1 0 0 1 0</span></a>
<a class="sourceLine" id="cb11-48" title="48"><span class="co">#> 4 0 0 1 0 0 0</span></a>
<a class="sourceLine" id="cb11-49" title="49"><span class="co">#> 5 0 0 0 1 0 0</span></a></code></pre></div>
<h2 id="binding-entity-embeddings-to-a-data-frame-without-the-umls-linker">Binding entity embeddings to a data frame (without the UMLS linker)</h2>
<p>With the UMLS linker disabled, 200-dimensional entity embeddings can be extracted from the scispacy Python package. For this to work, you must set <code>return_scispacy_embeddings</code> to <code>TRUE</code> when running <code>clinspacy()</code>. It’s also a good idea to write the output directly to file because the embeddings can be quite large.</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" title="1">clinspacy_output_file =<span class="st"> </span></a>
<a class="sourceLine" id="cb12-2" title="2"><span class="st"> </span>mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>] <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb12-3" title="3"><span class="st"> </span><span class="kw">clinspacy</span>(<span class="dt">df_col =</span> <span class="st">'description'</span>,</a>
<a class="sourceLine" id="cb12-4" title="4"> <span class="dt">return_scispacy_embeddings =</span> <span class="ot">TRUE</span>,</a>
<a class="sourceLine" id="cb12-5" title="5"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>,</a>
<a class="sourceLine" id="cb12-6" title="6"> <span class="dt">output_file =</span> <span class="kw">file.path</span>(rappdirs<span class="op">::</span><span class="kw">user_data_dir</span>(<span class="st">'clinspacy'</span>),</a>
<a class="sourceLine" id="cb12-7" title="7"> <span class="st">'output.csv'</span>),</a>
<a class="sourceLine" id="cb12-8" title="8"> <span class="dt">overwrite =</span> <span class="ot">TRUE</span>)</a>
<a class="sourceLine" id="cb12-9" title="9"></a>
<a class="sourceLine" id="cb12-10" title="10">clinspacy_output_file <span class="op">%>%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb12-11" title="11"><span class="st"> </span><span class="kw">bind_clinspacy_embeddings</span>(mtsamples[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">2</span>])</a>
<a class="sourceLine" id="cb12-12" title="12"><span class="co">#> clinspacy_id note_id description emb_001 emb_002</span></a>
<a class="sourceLine" id="cb12-13" title="13"><span class="co">#> 1 1 1 A 23-year-old white female presents with complaint of allergies. -0.1959790 0.28813400</span></a>
<a class="sourceLine" id="cb12-14" title="14"><span class="co">#> 2 2 2 Consult for laparoscopic gastric bypass. -0.1115363 0.01725144</span></a>
<a class="sourceLine" id="cb12-15" title="15"><span class="co">#> 3 3 3 Consult for laparoscopic gastric bypass. -0.1115363 0.01725144</span></a>
<a class="sourceLine" id="cb12-16" title="16"><span class="co">#> 4 4 4 2-D M-Mode. Doppler. -0.3077586 0.25928350</span></a>
<a class="sourceLine" id="cb12-17" title="17"><span class="co">#> emb_003 emb_004 emb_005 emb_006 emb_007 emb_008 emb_009 emb_010 emb_011 emb_012</span></a>
<a class="sourceLine" id="cb12-18" title="18"><span class="co">#> 1 0.09685702 -0.20641684 -0.1554238 -0.01624470 0.027011001 0.05331314 -0.1006668 0.3682853 0.0581439 -0.29079599</span></a>
<a class="sourceLine" id="cb12-19" title="19"><span class="co">#> 2 -0.13519235 -0.05496463 0.1488807 -0.19577999 0.052658666 -0.10433200 -0.0763495 0.1199215 -0.1860092 0.05465447</span></a>
<a class="sourceLine" id="cb12-20" title="20"><span class="co">#> 3 -0.13519235 -0.05496463 0.1488807 -0.19577999 0.052658666 -0.10433200 -0.0763495 0.1199215 -0.1860092 0.05465447</span></a>
<a class="sourceLine" id="cb12-21" title="21"><span class="co">#> 4 -0.37220851 -0.06021732 0.0386426 -0.07756314 -0.002676249 0.22511028 0.3279995 -0.2274373 -0.1656060 -0.30020200</span></a>
<a class="sourceLine" id="cb12-22" title="22"><span class="co">#> emb_013 emb_014 emb_015 emb_016 emb_017 emb_018 emb_019 emb_020 emb_021 emb_022</span></a>
<a class="sourceLine" id="cb12-23" title="23"><span class="co">#> 1 0.1611375 -0.1118952 -0.03922822 0.06888010 -0.1862742 -0.1454458 0.04115367 0.049065500 0.39795328 0.05879098</span></a>
<a class="sourceLine" id="cb12-24" title="24"><span class="co">#> 2 0.1267057 -0.2041533 0.01984984 -0.01107489 0.1080266 0.1128684 0.23062316 -0.005933613 0.06126638 0.05048515</span></a>
<a class="sourceLine" id="cb12-25" title="25"><span class="co">#> 3 0.1267057 -0.2041533 0.01984984 -0.01107489 0.1080266 0.1128684 0.23062316 -0.005933613 0.06126638 0.05048515</span></a>
<a class="sourceLine" id="cb12-26" title="26"><span class="co">#> 4 0.5237787 -0.1472114 -0.02312062 -0.11272645 -0.3415540 -0.2255931 0.02385290 0.074861225 0.12910485 0.02176433</span></a>
<a class="sourceLine" id="cb12-27" title="27"><span class="co">#> emb_023 emb_024 emb_025 emb_026 emb_027 emb_028 emb_029 emb_030 emb_031 emb_032</span></a>
<a class="sourceLine" id="cb12-28" title="28"><span class="co">#> 1 0.05246135 -0.19981400 -0.03346085 0.1395520 0.01792375 -0.06969561 -0.04942485 0.06613978 0.08035761 -0.12418544</span></a>
<a class="sourceLine" id="cb12-29" title="29"><span class="co">#> 2 0.12351524 -0.02489970 -0.26744565 0.3418240 -0.12783451 0.38420413 -0.20168215 -0.06550949 0.26997083 -0.07201438</span></a>
<a class="sourceLine" id="cb12-30" title="30"><span class="co">#> 3 0.12351524 -0.02489970 -0.26744565 0.3418240 -0.12783451 0.38420413 -0.20168215 -0.06550949 0.26997083 -0.07201438</span></a>
<a class="sourceLine" id="cb12-31" title="31"><span class="co">#> 4 -0.21616454 0.08218845 0.33230226 0.2420833 0.08455360 0.22111987 -0.57962301 0.32054099 -0.26178523 -0.46501200</span></a>
<a class="sourceLine" id="cb12-32" title="32"><span class="co">#> emb_033 emb_034 emb_035 emb_036 emb_037 emb_038 emb_039 emb_040 emb_041</span></a>
<a class="sourceLine" id="cb12-33" title="33"><span class="co">#> 1 -0.11839510 0.04266573 -0.04319873 0.06394462 0.02425202 -0.2158322 -0.1064802 0.005398401 0.01459978</span></a>
<a class="sourceLine" id="cb12-34" title="34"><span class="co">#> 2 0.13039007 -0.13608095 0.10342984 0.03349850 -0.06359592 -0.2497478 -0.1312915 -0.068015995 0.12897950</span></a>
<a class="sourceLine" id="cb12-35" title="35"><span class="co">#> 3 0.13039007 -0.13608095 0.10342984 0.03349850 -0.06359592 -0.2497478 -0.1312915 -0.068015995 0.12897950</span></a>
<a class="sourceLine" id="cb12-36" title="36"><span class="co">#> 4 0.05091595 -0.22430425 -0.07319695 -0.19518739 -0.21279503 -0.1980325 -0.3900315 0.214830723 -0.03985715</span></a>
<a class="sourceLine" id="cb12-37" title="37"><span class="co">#> emb_042 emb_043 emb_044 emb_045 emb_046 emb_047 emb_048 emb_049 emb_050 emb_051</span></a>
<a class="sourceLine" id="cb12-38" title="38"><span class="co">#> 1 -0.03936125 -0.216860471 0.01146569 -0.01707370 -0.08789315 -0.48977432 0.11840488 -0.24063642 -0.23959090 0.1258371</span></a>
<a class="sourceLine" id="cb12-39" title="39"><span class="co">#> 2 0.20849532 -0.001854315 0.02034700 0.04105476 -0.26218344 0.05762917 -0.08367021 -0.01368977 0.02369371 0.1266086</span></a>
<a class="sourceLine" id="cb12-40" title="40"><span class="co">#> 3 0.20849532 -0.001854315 0.02034700 0.04105476 -0.26218344 0.05762917 -0.08367021 -0.01368977 0.02369371 0.1266086</span></a>
<a class="sourceLine" id="cb12-41" title="41"><span class="co">#> 4 0.32672650 -0.067201529 0.43131340 -0.10445137 -0.36873272 0.39958726 0.03923560 0.06519943 -0.12042060 0.1947917</span></a>
<a class="sourceLine" id="cb12-42" title="42"><span class="co">#> emb_052 emb_053 emb_054 emb_055 emb_056 emb_057 emb_058 emb_059 emb_060</span></a>
<a class="sourceLine" id="cb12-43" title="43"><span class="co">#> 1 -0.0001312072 -0.15632193 0.2063196 -0.02019964 -0.002069766 -0.14390510 -0.112056380 -0.12671516 -0.3076788</span></a>
<a class="sourceLine" id="cb12-44" title="44"><span class="co">#> 2 -0.1197809521 0.04324770 -0.2046735 -0.21317951 0.029707700 -0.04107177 -0.003977332 0.03327019 0.1377243</span></a>
<a class="sourceLine" id="cb12-45" title="45"><span class="co">#> 3 -0.1197809521 0.04324770 -0.2046735 -0.21317951 0.029707700 -0.04107177 -0.003977332 0.03327019 0.1377243</span></a>
<a class="sourceLine" id="cb12-46" title="46"><span class="co">#> 4 0.5587487221 0.02909975 -0.1112386 -0.29085600 0.051582206 0.03322158 -0.090760550 -0.01738100 0.4675597</span></a>
<a class="sourceLine" id="cb12-47" title="47"><span class="co">#> emb_061 emb_062 emb_063 emb_064 emb_065 emb_066 emb_067 emb_068 emb_069 emb_070</span></a>
<a class="sourceLine" id="cb12-48" title="48"><span class="co">#> 1 0.01722672 -0.04037631 0.14633203 0.072336150 0.04734538 0.2444712 0.005439494 0.07232769 0.1972760 0.007281476</span></a>
<a class="sourceLine" id="cb12-49" title="49"><span class="co">#> 2 0.18907296 -0.26335296 0.01884718 -0.009265006 -0.16859459 -0.2767420 0.048937336 -0.35522249 0.1164578 0.345116988</span></a>
<a class="sourceLine" id="cb12-50" title="50"><span class="co">#> 3 0.18907296 -0.26335296 0.01884718 -0.009265006 -0.16859459 -0.2767420 0.048937336 -0.35522249 0.1164578 0.345116988</span></a>
<a class="sourceLine" id="cb12-51" title="51"><span class="co">#> 4 -0.29520441 0.62886798 -0.14435785 0.002738898 -0.03027805 -0.4466182 0.080596073 0.29857932 0.2307856 0.032678135</span></a>
<a class="sourceLine" id="cb12-52" title="52"><span class="co">#> emb_071 emb_072 emb_073 emb_074 emb_075 emb_076 emb_077 emb_078 emb_079 emb_080</span></a>
<a class="sourceLine" id="cb12-53" title="53"><span class="co">#> 1 -0.03698583 -0.07433472 -0.0170116 0.15559705 -0.0142159 0.03095377 0.14973202 -0.07275485 -0.1265165 0.0756736</span></a>
<a class="sourceLine" id="cb12-54" title="54"><span class="co">#> 2 -0.03482347 -0.09575927 -0.1530600 -0.08885341 0.1138750 0.24408367 0.01405296 -0.00684475 -0.1356777 -0.1306460</span></a>
<a class="sourceLine" id="cb12-55" title="55"><span class="co">#> 3 -0.03482347 -0.09575927 -0.1530600 -0.08885341 0.1138750 0.24408367 0.01405296 -0.00684475 -0.1356777 -0.1306460</span></a>
<a class="sourceLine" id="cb12-56" title="56"><span class="co">#> 4 -0.02464749 -0.05315572 0.2278580 0.05121428 0.3368990 0.12042545 0.05976460 0.20906300 -0.3898960 -0.2403080</span></a>
<a class="sourceLine" id="cb12-57" title="57"><span class="co">#> emb_081 emb_082 emb_083 emb_084 emb_085 emb_086 emb_087 emb_088 emb_089 emb_090</span></a>
<a class="sourceLine" id="cb12-58" title="58"><span class="co">#> 1 -0.1064746 -0.04138183 0.1262948 -0.07008250 -0.0581785 -0.08323197 -0.1252120 0.10060352 -0.01839051 -0.24945817</span></a>
<a class="sourceLine" id="cb12-59" title="59"><span class="co">#> 2 0.2395754 -0.24276201 0.1975068 -0.03769429 -0.2019527 0.09356334 -0.2311737 0.01929579 -0.18456985 0.16967812</span></a>
<a class="sourceLine" id="cb12-60" title="60"><span class="co">#> 3 0.2395754 -0.24276201 0.1975068 -0.03769429 -0.2019527 0.09356334 -0.2311737 0.01929579 -0.18456985 0.16967812</span></a>
<a class="sourceLine" id="cb12-61" title="61"><span class="co">#> 4 -0.2094990 -0.43718034 -0.2580445 -0.36398449 -0.1863167 -0.38763523 0.1124806 -0.25680842 -0.21670937 -0.02249805</span></a>
<a class="sourceLine" id="cb12-62" title="62"><span class="co">#> emb_091 emb_092 emb_093 emb_094 emb_095 emb_096 emb_097 emb_098 emb_099</span></a>
<a class="sourceLine" id="cb12-63" title="63"><span class="co">#> 1 0.2108233 0.2314818 -0.07174893 0.03378552 0.002213914 0.22163883 0.30331765 0.009472401 -0.14205784</span></a>
<a class="sourceLine" id="cb12-64" title="64"><span class="co">#> 2 -0.3636869 -0.1134262 0.07241845 0.29899751 0.111884147 -0.04911397 0.05792167 -0.125230156 -0.27682150</span></a>
<a class="sourceLine" id="cb12-65" title="65"><span class="co">#> 3 -0.3636869 -0.1134262 0.07241845 0.29899751 0.111884147 -0.04911397 0.05792167 -0.125230156 -0.27682150</span></a>
<a class="sourceLine" id="cb12-66" title="66"><span class="co">#> 4 0.2278338 -0.1409704 0.17529125 -0.05521812 -0.186143875 0.54336450 0.13775243 -0.269951746 0.01101355</span></a>
<a class="sourceLine" id="cb12-67" title="67"><span class="co">#> emb_100 emb_101 emb_102 emb_103 emb_104 emb_105 emb_106 emb_107 emb_108 emb_109</span></a>
<a class="sourceLine" id="cb12-68" title="68"><span class="co">#> 1 0.12607630 -0.19062089 -0.08417289 -0.0868922 0.08520973 0.1095840322 0.0911104 -0.11639215 -0.1988509 -0.02318672</span></a>
<a class="sourceLine" id="cb12-69" title="69"><span class="co">#> 2 -0.03230023 0.09556636 -0.01811487 0.2020687 -0.28405397 -0.2379808277 0.0503400 0.07255385 -0.3391048 0.29906577</span></a>
<a class="sourceLine" id="cb12-70" title="70"><span class="co">#> 3 -0.03230023 0.09556636 -0.01811487 0.2020687 -0.28405397 -0.2379808277 0.0503400 0.07255385 -0.3391048 0.29906577</span></a>
<a class="sourceLine" id="cb12-71" title="71"><span class="co">#> 4 0.12618919 0.24217032 0.19674813 0.1094553 -0.02718710 -0.0006717525 0.1023474 0.30398776 0.0299391 0.38101604</span></a>
<a class="sourceLine" id="cb12-72" title="72"><span class="co">#> emb_110 emb_111 emb_112 emb_113 emb_114 emb_115 emb_116 emb_117 emb_118</span></a>
<a class="sourceLine" id="cb12-73" title="73"><span class="co">#> 1 -0.03355397 0.06281934 0.09064088 -0.1812218 -0.08294683 0.09746995 0.16949679 0.001256246 -0.09206300</span></a>
<a class="sourceLine" id="cb12-74" title="74"><span class="co">#> 2 -0.28191616 0.04745353 -0.04532966 -0.1529041 0.04579017 0.02364063 -0.31116034 0.160783665 -0.07702465</span></a>
<a class="sourceLine" id="cb12-75" title="75"><span class="co">#> 3 -0.28191616 0.04745353 -0.04532966 -0.1529041 0.04579017 0.02364063 -0.31116034 0.160783665 -0.07702465</span></a>
<a class="sourceLine" id="cb12-76" title="76"><span class="co">#> 4 -0.07525725 -0.19109026 -0.09757482 -0.3430861 0.07392349 -0.34514988 -0.05409198 0.021575954 0.24660901</span></a>
<a class="sourceLine" id="cb12-77" title="77"><span class="co">#> emb_119 emb_120 emb_121 emb_122 emb_123 emb_124 emb_125 emb_126 emb_127 emb_128</span></a>
<a class="sourceLine" id="cb12-78" title="78"><span class="co">#> 1 -0.27094193 0.1914412 0.10522338 0.01736773 -0.1658078 -0.24409867 -0.20621473 -0.35578349 0.19991713 -0.1075110</span></a>
<a class="sourceLine" id="cb12-79" title="79"><span class="co">#> 2 -0.02175729 -0.1156647 0.01362599 -0.20085029 0.3362202 -0.03874875 -0.02545092 0.21585878 -0.04820869 0.1341518</span></a>
<a class="sourceLine" id="cb12-80" title="80"><span class="co">#> 3 -0.02175729 -0.1156647 0.01362599 -0.20085029 0.3362202 -0.03874875 -0.02545092 0.21585878 -0.04820869 0.1341518</span></a>
<a class="sourceLine" id="cb12-81" title="81"><span class="co">#> 4 -0.25714830 -0.3096262 0.14711675 -0.09584628 -0.2465328 0.02228437 -0.05287175 0.04758008 0.13082074 -0.4366458</span></a>
<a class="sourceLine" id="cb12-82" title="82"><span class="co">#> emb_129 emb_130 emb_131 emb_132 emb_133 emb_134 emb_135 emb_136 emb_137 emb_138</span></a>
<a class="sourceLine" id="cb12-83" title="83"><span class="co">#> 1 0.050961102 0.08590268 -0.07344585 -0.11005830 0.2082962 -0.03440777 -0.15951183 0.04417117 -0.1002716 -0.07090355</span></a>
<a class="sourceLine" id="cb12-84" title="84"><span class="co">#> 2 0.084913827 0.21485816 -0.26201880 -0.04661880 0.1594945 0.24577541 -0.04687785 0.02120483 -0.2707188 -0.05038439</span></a>
<a class="sourceLine" id="cb12-85" title="85"><span class="co">#> 3 0.084913827 0.21485816 -0.26201880 -0.04661880 0.1594945 0.24577541 -0.04687785 0.02120483 -0.2707188 -0.05038439</span></a>
<a class="sourceLine" id="cb12-86" title="86"><span class="co">#> 4 0.002557264 0.30628723 -0.24981013 -0.01674807 -0.3169997 0.12056302 -0.09506032 -0.01222125 -0.4409042 0.23120450</span></a>
<a class="sourceLine" id="cb12-87" title="87"><span class="co">#> emb_139 emb_140 emb_141 emb_142 emb_143 emb_144 emb_145 emb_146 emb_147</span></a>
<a class="sourceLine" id="cb12-88" title="88"><span class="co">#> 1 -0.09013366 0.004567102 -0.04074124 -0.09970398 -0.07412403 0.08118367 0.04151318 0.01023637 -0.02712608</span></a>
<a class="sourceLine" id="cb12-89" title="89"><span class="co">#> 2 -0.21531074 -0.214246295 0.12730155 0.04358483 -0.04084410 0.08556246 0.37193301 -0.23297635 0.16786779</span></a>
<a class="sourceLine" id="cb12-90" title="90"><span class="co">#> 3 -0.21531074 -0.214246295 0.12730155 0.04358483 -0.04084410 0.08556246 0.37193301 -0.23297635 0.16786779</span></a>
<a class="sourceLine" id="cb12-91" title="91"><span class="co">#> 4 0.01691840 0.127434801 0.19368662 0.02984041 -0.14155845 -0.15326020 0.02936405 0.05187999 0.06006772</span></a>
<a class="sourceLine" id="cb12-92" title="92"><span class="co">#> emb_148 emb_149 emb_150 emb_151 emb_152 emb_153 emb_154 emb_155 emb_156 emb_157</span></a>
<a class="sourceLine" id="cb12-93" title="93"><span class="co">#> 1 0.1120797 0.07420963 0.2022959 -0.02539130 -0.1542052 0.09878749 0.11210436 0.190853971 -0.2355878 0.1032905</span></a>
<a class="sourceLine" id="cb12-94" title="94"><span class="co">#> 2 -0.1552295 0.13361997 0.4047717 -0.07385027 0.2168649 0.08279617 0.02853568 0.007983398 -0.2673024 -0.3518553</span></a>
<a class="sourceLine" id="cb12-95" title="95"><span class="co">#> 3 -0.1552295 0.13361997 0.4047717 -0.07385027 0.2168649 0.08279617 0.02853568 0.007983398 -0.2673024 -0.3518553</span></a>
<a class="sourceLine" id="cb12-96" title="96"><span class="co">#> 4 0.0758267 0.04905358 -0.0133047 0.25728051 0.2761333 -0.10433040 -0.02122432 0.066375951 -0.3625118 -0.2547615</span></a>
<a class="sourceLine" id="cb12-97" title="97"><span class="co">#> emb_158 emb_159 emb_160 emb_161 emb_162 emb_163 emb_164 emb_165 emb_166 emb_167</span></a>
<a class="sourceLine" id="cb12-98" title="98"><span class="co">#> 1 -0.21532827 0.09456767 -0.1445503 -0.33522494 0.15268593 -0.001686232 0.2152747 -0.10312133 0.1135696 -0.02624894</span></a>
<a class="sourceLine" id="cb12-99" title="99"><span class="co">#> 2 0.07097678 0.08358909 -0.1986835 -0.29901644 -0.01896982 -0.052200415 0.1262764 0.10607937 0.0321700 -0.25643115</span></a>
<a class="sourceLine" id="cb12-100" title="100"><span class="co">#> 3 0.07097678 0.08358909 -0.1986835 -0.29901644 -0.01896982 -0.052200415 0.1262764 0.10607937 0.0321700 -0.25643115</span></a>
<a class="sourceLine" id="cb12-101" title="101"><span class="co">#> 4 0.13501658 -0.28645951 -0.1917117 -0.01892012 -0.02507000 -0.031375002 -0.2519416 0.08888888 0.3796148 -0.25476800</span></a>
<a class="sourceLine" id="cb12-102" title="102"><span class="co">#> emb_168 emb_169 emb_170 emb_171 emb_172 emb_173 emb_174 emb_175 emb_176 emb_177</span></a>
<a class="sourceLine" id="cb12-103" title="103"><span class="co">#> 1 0.1098730 0.09047928 0.12684340 -0.0694985 -0.11949543 0.2164041 -0.29396720 -0.16588253 -0.1348005 -0.1148055</span></a>
<a class="sourceLine" id="cb12-104" title="104"><span class="co">#> 2 -0.1073976 0.26462262 0.03679075 -0.2173935 0.07656907 -0.1012526 -0.02410151 -0.02048860 -0.1179298 0.2362113</span></a>
<a class="sourceLine" id="cb12-105" title="105"><span class="co">#> 3 -0.1073976 0.26462262 0.03679075 -0.2173935 0.07656907 -0.1012526 -0.02410151 -0.02048860 -0.1179298 0.2362113</span></a>
<a class="sourceLine" id="cb12-106" title="106"><span class="co">#> 4 -0.1437821 -0.15589955 0.23368900 0.1311810 0.52442150 -0.0487657 0.25153150 0.02299049 -0.1953604 -0.1572996</span></a>
<a class="sourceLine" id="cb12-107" title="107"><span class="co">#> emb_178 emb_179 emb_180 emb_181 emb_182 emb_183 emb_184 emb_185 emb_186 emb_187</span></a>
<a class="sourceLine" id="cb12-108" title="108"><span class="co">#> 1 -0.08968537 0.05097483 0.09355133 0.008875800 0.1106400 -0.1088511 -0.02326688 0.17733055 -0.07351807 0.0222525</span></a>
<a class="sourceLine" id="cb12-109" title="109"><span class="co">#> 2 0.30876314 -0.22625668 0.07487945 0.008851715 -0.1024263 -0.2249113 -0.06455390 0.07631866 0.01623236 -0.1098196</span></a>
<a class="sourceLine" id="cb12-110" title="110"><span class="co">#> 3 0.30876314 -0.22625668 0.07487945 0.008851715 -0.1024263 -0.2249113 -0.06455390 0.07631866 0.01623236 -0.1098196</span></a>
<a class="sourceLine" id="cb12-111" title="111"><span class="co">#> 4 0.29195935 -0.05653973 -0.12341889 -0.312314242 -0.1885454 -0.2873893 -0.02149600 -0.16462975 0.14877875 0.2350687</span></a>
<a class="sourceLine" id="cb12-112" title="112"><span class="co">#> emb_188 emb_189 emb_190 emb_191 emb_192 emb_193 emb_194 emb_195 emb_196</span></a>
<a class="sourceLine" id="cb12-113" title="113"><span class="co">#> 1 -0.12066887 -0.179350998 0.01909462 0.13228424 0.024832169 0.05002003 -0.20531311 -0.00853500 0.0639337</span></a>
<a class="sourceLine" id="cb12-114" title="114"><span class="co">#> 2 -0.04689731 -0.033685058 0.16270872 -0.05825762 0.069446986 -0.05563271 -0.17479033 -0.13635058 0.1291080</span></a>
<a class="sourceLine" id="cb12-115" title="115"><span class="co">#> 3 -0.04689731 -0.033685058 0.16270872 -0.05825762 0.069446986 -0.05563271 -0.17479033 -0.13635058 0.1291080</span></a>
<a class="sourceLine" id="cb12-116" title="116"><span class="co">#> 4 0.36260483 0.004200405 0.20571376 0.09558415 -0.006550124 -0.30820300 0.01686265 -0.05414012 -0.1694009</span></a>
<a class="sourceLine" id="cb12-117" title="117"><span class="co">#> emb_197 emb_198 emb_199 emb_200</span></a>
<a class="sourceLine" id="cb12-118" title="118"><span class="co">#> 1 0.29886368 0.01618892 -0.08192083 -0.37027851</span></a>
<a class="sourceLine" id="cb12-119" title="119"><span class="co">#> 2 -0.09743453 -0.09941812 -0.05773153 -0.09702638</span></a>
<a class="sourceLine" id="cb12-120" title="120"><span class="co">#> 3 -0.09743453 -0.09941812 -0.05773153 -0.09702638</span></a>
<a class="sourceLine" id="cb12-121" title="121"><span class="co">#> 4 -0.13313706 -0.15822850 0.14830773 -0.34555282</span></a>
<a class="sourceLine" id="cb12-122" title="122"><span class="co">#> [ reached 'max' / getOption("max.print") -- omitted 1 rows ]</span></a></code></pre></div>
<h2 id="adding-the-umls-linker">Adding the UMLS linker</h2>
<p>The UMLS linker can be turned on (and off) even if <code>clinspacy_init()</code> has already been called. The first time you turn it on, it takes a while because the linker needs to be loaded into memory. On subsequent removal and addition, this occurs much more quickly because the linker is only removed/added to the pipeline and does not need to be reloaded into memory.</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb13-1" title="1"><span class="kw">clinspacy_init</span>(<span class="dt">use_linker =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<h2 id="named-entity-recognition-with-the-umls-linker">Named entity recognition (with the UMLS linker)</h2>
<p>By turning on the UMLS linker, you can restrict the results by semantic type. In general, restricting the result in <code>clinspacy()</code> is not a good idea because you can always subset the results later within <code>bind_clinspacy()</code> and <code>bind_clinspacy_embeddings()</code>.</p>
<div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" title="1"><span class="kw">clinspacy</span>(<span class="st">'This patient has diabetes and CKD stage 3 but no HTN.'</span>)</a>
<a class="sourceLine" id="cb14-2" title="2"><span class="co">#> | | | 0% | |==============================================================================================================| 100%</span></a>
<a class="sourceLine" id="cb14-3" title="3"><span class="co">#> clinspacy_id cui entity lemma semantic_type definition is_family</span></a>
<a class="sourceLine" id="cb14-4" title="4"><span class="co">#> 1 1 C0030705 patient patient Patient or Disabled Group Patients FALSE</span></a>
<a class="sourceLine" id="cb14-5" title="5"><span class="co">#> 2 1 C1550655 patient patient Body Substance Specimen Type - Patient FALSE</span></a>
<a class="sourceLine" id="cb14-6" title="6"><span class="co">#> 3 1 C1578483 patient patient Idea or Concept Report source - Patient FALSE</span></a>
<a class="sourceLine" id="cb14-7" title="7"><span class="co">#> 4 1 C1578484 patient patient Idea or Concept Relationship modifier - Patient FALSE</span></a>
<a class="sourceLine" id="cb14-8" title="8"><span class="co">#> 5 1 C1705908 patient patient Organism Veterinary Patient FALSE</span></a>
<a class="sourceLine" id="cb14-9" title="9"><span class="co">#> 6 1 C0011847 diabetes diabetes Disease or Syndrome Diabetes FALSE</span></a>
<a class="sourceLine" id="cb14-10" title="10"><span class="co">#> 7 1 C0011849 diabetes diabetes Disease or Syndrome Diabetes Mellitus FALSE</span></a>
<a class="sourceLine" id="cb14-11" title="11"><span class="co">#> 8 1 C2316787 CKD stage 3 ckd stage 3 Disease or Syndrome Chronic kidney disease stage 3 FALSE</span></a>
<a class="sourceLine" id="cb14-12" title="12"><span class="co">#> 9 1 C0020538 HTN htn Disease or Syndrome Hypertensive disease FALSE</span></a>
<a class="sourceLine" id="cb14-13" title="13"><span class="co">#> is_historical is_hypothetical is_negated is_uncertain section_category</span></a>
<a class="sourceLine" id="cb14-14" title="14"><span class="co">#> 1 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-15" title="15"><span class="co">#> 2 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-16" title="16"><span class="co">#> 3 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-17" title="17"><span class="co">#> 4 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-18" title="18"><span class="co">#> 5 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-19" title="19"><span class="co">#> 6 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-20" title="20"><span class="co">#> 7 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-21" title="21"><span class="co">#> 8 FALSE FALSE FALSE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-22" title="22"><span class="co">#> 9 FALSE FALSE TRUE FALSE <NA></span></a>
<a class="sourceLine" id="cb14-23" title="23"></a>
<a class="sourceLine" id="cb14-24" title="24"><span class="kw">clinspacy</span>(<span class="st">'This patient with diabetes is taking omeprazole, aspirin, and lisinopril 10 mg but is not taking albuterol anymore as his asthma has resolved.'</span>,</a>
<a class="sourceLine" id="cb14-25" title="25"> <span class="dt">semantic_types =</span> <span class="st">'Pharmacologic Substance'</span>)</a>
<a class="sourceLine" id="cb14-26" title="26"><span class="co">#> | | | 0% | |==============================================================================================================| 100%</span></a>
<a class="sourceLine" id="cb14-27" title="27"><span class="co">#> clinspacy_id cui entity lemma semantic_type definition is_family is_historical</span></a>
<a class="sourceLine" id="cb14-28" title="28"><span class="co">#> 1 1 C0028978 omeprazole omeprazole Pharmacologic Substance Omeprazole FALSE FALSE</span></a>
<a class="sourceLine" id="cb14-29" title="29"><span class="co">#> 2 1 C0004057 aspirin aspirin Pharmacologic Substance Aspirin FALSE FALSE</span></a>
<a class="sourceLine" id="cb14-30" title="30"><span class="co">#> 3 1 C0065374 lisinopril lisinopril Pharmacologic Substance Lisinopril FALSE FALSE</span></a>
<a class="sourceLine" id="cb14-31" title="31"><span class="co">#> 4 1 C0001927 albuterol albuterol Pharmacologic Substance Albuterol FALSE FALSE</span></a>