Description Usage Arguments Value Examples
Subsetting operator for rMSIproc peak matrices.
1 2 |
x |
rMSIproc peak matrix object. |
pixels |
the selected rows to retain in the peak matrix. This argument can be an integer, a boolean or a character. |
columns |
an integer vector with the peak matrix columns to retain. |
rMSIproc peak matrix object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #For the following example we will load an rMSIproc peak matrix in the pks variable:
pks <- rMSIproc::LoadPeakMatrix("/path/to/my/peak/matrix.zip")
#Subsetting a peak marix by pixel ID's:
pks1_100 <- pks[1:100, ]
#Subsetting a peak matrix using a boolean expression:
clus <- kmeans(pks$intensity/pks$normalizations$TIC, centers = 5) #perform a kmeans clustering with the whole peak matrix (TIC normalized)
clus2SubImg <- pks[clus$cluster==2, ] #Creat a subdataset with only pixels belonging to cluster 2
#Subsetting a peak matrix using image names:
pks_brain1 <- pks["Brain_img1", ]
#Subsetting to a specific column range:
pks_massrange <- pks[, 10:50]
#Subsetting by columns and rows:
pks_brain1 <- pks["Brain_img1", 10:50]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.