Was this page helpful?

When I enter RSS$scan.mat in the console window, I just get a summary message. How do I see the raw numbers?

From $1

    Table of contents
    No headers

    Here's how to manipulate the extmats:

    • convert to a regular R matrix using empty brackets:

    x <- RSS$scan.mat[]   ## x receives a copy of the whole scan as a normal R matrix

    • show some of the data by indexing, which converts to a normal R matrix and prints the result:

    RSS$scan.mat[1:10, 15:20]  ## prints samples 1 through 10 of pulses 15 through 20

    • modify some of the data by indexed assignment:

    RSS$scan.mat [300:350,] <- 252     ## paint a white ring into the raw data buffer
    gui.update.plot.window()           ## scan convert the new raw data and display it

    • get the dimensions of the data using the dim() function, just as for an R matrix:


    • extract scores for a blip by matrix indexing:

    blip.sample <- c(100, 100, 101, 101, 102, 102, 102, 103)   ## radial coordinates of samples in blipblip.pulse  <- c(222, 223, 223, 224, 225, 226, 227, 227)                  ## angular coordinates of samples in blip
    blip.data <- RSS$score.mat[cbind(blip.sample, blip.pulse)] ## cbind creates an indexing matrix

    So blip.data now holds the raw data for (sample 100, pulse 222), (sample 100, pulse 223), sample(101, pulse 223) and so on.

    Was this page helpful?
    Tags: (Edit tags)
    • No tags
    Comments (0)

    Powered by MindTouch Core