plate_matrix: plate layout matrix from well IDs

Description Usage Arguments Value Examples

View source: R/plate_matrix.R

Description

Given a dataframe of alpha-numeric well IDs e.g ("A01"), and values, this function will produce a matrix in the form of a plate layout.

Usage

1
plate_matrix(data, well, plate = 96)

Arguments

data

vector of data to be placed in matrix

well

vector of alphanumeric well IDs. e.g ("A01")

plate

number of wells in plate (6, 12, 24, 48, 96 or 384, 1536)

Value

matrix

Examples

1
2
3
4
5
6
7
a <- 1:96
wells <- num_to_well(1:96)
plate_matrix(data = a, well = wells)

x <- rnorm(384)
wells <- num_to_well(1:384, plate = 384)
plate_matrix(data = x, well = wells, plate = 384)

Example output

     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[1,]    1    2    3    4    5    6    7    8    9    10    11    12
[2,]   13   14   15   16   17   18   19   20   21    22    23    24
[3,]   25   26   27   28   29   30   31   32   33    34    35    36
[4,]   37   38   39   40   41   42   43   44   45    46    47    48
[5,]   49   50   51   52   53   54   55   56   57    58    59    60
[6,]   61   62   63   64   65   66   67   68   69    70    71    72
[7,]   73   74   75   76   77   78   79   80   81    82    83    84
[8,]   85   86   87   88   89   90   91   92   93    94    95    96
             [,1]        [,2]       [,3]       [,4]         [,5]        [,6]
 [1,] -0.43001549 -2.07406662 -0.6788003  0.4714550 -0.993298325 -0.04494689
 [2,]  0.41478483  1.31481994  1.4937985  0.6838612  1.115843913 -0.70393984
 [3,] -0.67463693  0.79076277  1.4544824  0.3966128  0.737822654 -0.22884658
 [4,] -0.24864613 -0.33015878  0.8999992  0.3903796  0.053849813  0.02938511
 [5,]  0.52975319  0.81082895 -0.3130085  1.1544473  0.017179737  0.60355567
 [6,] -0.69255942  1.53641450  1.1184442 -0.2646075 -1.560260748 -1.05498399
 [7,]  1.65065485  0.19749979 -1.6494074  0.8975131  2.163425139  1.16061562
 [8,] -1.41958090  1.05130776 -2.7299826 -2.0411289 -0.008988688  0.07814735
 [9,] -0.69364644 -1.05015886 -1.5759213  0.1539821 -0.062549670 -0.95128451
[10,] -0.84332480 -1.04039493 -1.1454768 -0.9835307 -0.921721629 -0.07409760
[11,]  1.33436290 -0.32828285 -0.6944637 -1.0658337 -0.540176373 -0.76009678
[12,] -0.04644476  0.89853647  0.9347341  0.7930496 -1.296244520  0.63148192
[13,] -1.06176358 -0.52340926 -0.1516147  0.6681078  0.539760920  1.44025887
[14,]  1.07393572 -0.05720674  1.2005924  1.7557699 -0.323868629  0.96019564
[15,]  0.01242104 -0.95496332  0.4080274 -0.8542984  0.880042711 -1.53286348
[16,]  1.36402865  0.09533200 -0.1378094 -1.1702077 -1.011375258  0.42614819
              [,7]       [,8]        [,9]       [,10]       [,11]       [,12]
 [1,] -0.677625724  1.3551411 -0.16581837 -0.46080037  0.25642621 -0.84491016
 [2,]  0.414909932 -0.4863893  1.81912628 -0.65915065  0.02233700 -0.30729580
 [3,]  2.307332524 -0.4997450 -1.12479618  1.26849462  1.80703396 -0.23130945
 [4,]  0.842596820 -0.2995183  0.52037965 -0.90636301  1.52932624 -0.60441168
 [5,]  0.895545194  1.2707304  1.81441914  0.61169964  1.05893168  1.78435402
 [6,]  1.129762635 -0.9672783  0.95832510  1.89905750  0.27471913 -0.46545410
 [7,] -1.258511783  0.1290916 -2.12757811 -0.34221827 -0.73251602 -1.38103361
 [8,]  0.295818512 -1.7763866  0.18627927  0.80246829  0.12329500  1.52775240
 [9,]  0.916068162  2.5069000 -1.96647597 -1.82191770 -0.34569779 -2.14710733
[10,]  0.003214472 -0.5926803  0.70265699  2.79698095 -0.45049866  0.16836954
[11,] -1.107996448 -2.5835483 -0.05335469 -0.02381676  0.18096516 -0.31751549
[12,]  0.041217305 -0.0817777 -0.25463743 -1.14706686  1.25438898  1.81921755
[13,] -0.210776730 -0.7749957 -0.82168075 -0.33425161  1.38545889  0.83920205
[14,]  0.478532019  0.9043620 -1.57420222 -0.38726150  0.05979205 -0.05955576
[15,]  2.258055598 -0.1441539 -0.13309127  0.35747428 -1.37671144 -0.16339894
[16,] -1.050125307 -1.7693043  1.02624324  0.18879827 -0.95012751  0.41378326
             [,13]        [,14]       [,15]      [,16]        [,17]       [,18]
 [1,] -0.595414118 -0.295747601 -1.20204696  0.9926392 -0.774850829  0.32107345
 [2,] -0.455674001  3.326823889  0.09547371 -2.1096118 -0.968877998  0.32661100
 [3,] -0.004801579  0.411944495  0.45558638  2.1870258 -1.660911263 -0.24354758
 [4,]  1.545501131  0.060414446  0.04661517  0.3791782  0.928428992  0.12444407
 [5,] -0.115659656  0.930716743  0.19449010  2.0975858 -0.098389515  1.42796952
 [6,] -0.156839975 -2.269419224 -0.31603764  2.1865055 -0.218896043 -0.16803407
 [7,]  0.153973366 -0.614813891  0.32726518  0.8469747  0.522154786 -0.09588664
 [8,]  1.834560326  0.229531025 -0.03465016  0.4017719  0.782206897  0.64014700
 [9,] -0.221102064 -0.344843227 -0.84346726  0.6471924 -0.454121234  0.18679481
[10,]  0.310103933  0.501514957  1.33687275  0.8745548  0.064408811  0.02961669
[11,] -0.711973974 -0.373916843 -1.32726740 -0.3646853  0.271439921 -1.08068057
[12,]  0.557337507 -0.919546271 -1.99869711  1.8425340 -0.005645515 -0.30670195
[13,] -0.152768096 -0.822654713 -0.64798787 -0.3602038 -1.107954553 -0.30088851
[14,] -1.212147702  1.794546547 -1.27105486  0.7008057  2.394283377 -0.88178728
[15,] -0.229739224 -1.586213639  1.10501157  1.8607463  0.053238422  1.25193061
[16,]  0.209382529 -0.002628564  1.38499557  0.5869463  0.433495338  0.09308481
           [,19]       [,20]      [,21]       [,22]      [,23]      [,24]
 [1,] -0.7624761 -0.05731834 -0.5691730  0.73064998 -0.8124654  0.6251310
 [2,]  1.2566437 -2.21034932  1.3583004 -1.03788514  0.8619937  1.5125355
 [3,]  1.1688503 -0.81213099  0.4764287 -0.05350652  1.4339252 -2.1605183
 [4,]  1.4155293 -1.10561225  2.0337966 -1.32019059  2.5779992  0.2519307
 [5,] -0.9699856 -0.12031624 -0.2508060  0.37637554  0.4794555 -1.5509365
 [6,] -2.3238586 -0.75400472 -0.6620278 -0.33055240  1.8832661  0.3705869
 [7,] -2.5737476  0.81375945  0.7872657  1.94073721 -0.6122319  0.3313321
 [8,] -0.2318451  0.96723491 -0.3280679  0.81785435  0.2248968 -0.8789112
 [9,] -0.5120908 -0.41622697  0.2877379  1.01890348 -1.8250831  1.5713147
[10,] -0.5053310 -0.72172398  0.1385351 -1.72980371 -0.8378361  0.8412396
[11,] -0.5616346  0.05546505  0.5613102 -0.17647540  0.7926953  0.5288976
[12,]  1.3497048 -1.17836924  0.3708587  0.22118056 -1.0788532  0.1203362
[13,]  0.8135299 -0.72981275 -0.4107100  0.47002180 -1.0628420 -0.3687687
[14,]  0.6790961  2.03341529  0.5594224  0.27388566 -0.6520086  1.5407778
[15,] -1.7864719  0.66151162 -0.4829148  1.07651617 -0.2553167  1.5693927
[16,] -0.0298003  1.84750242  1.1567110  1.54646878 -1.0279510  0.7874104

platetools documentation built on June 3, 2021, 5:06 p.m.