Hi All, I'm new with R; this is a basic question. I was given a matrix I of (nrow, ncol), I would like to create another matrix A with some data in the matrix I, say [1,4] (row 1, column 4) to [271,19000] (row 271, column 19000). How do I do this? Please help. Thank you very much. --mc [[alternative HTML version deleted]]
Try this: A <- I[1:271, 4:19000] On 13/01/2008, My Coyne <mcoyne at boninc.com> wrote:> Hi All, > > I'm new with R; this is a basic question. I was given a matrix I of (nrow, > ncol), I would like to create another matrix A with some data in the matrix > I, say [1,4] (row 1, column 4) to [271,19000] (row 271, column 19000). How > do I do this? Please help. Thank you very much. > > > > --mc > > > > > > > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
mymatrix <- oldmatrix[1:271,4:19000] --- My Coyne <mcoyne at boninc.com> wrote:> Hi All, > > I'm new with R; this is a basic question. I was > given a matrix I of (nrow, > ncol), I would like to create another matrix A with > some data in the matrix > I, say [1,4] (row 1, column 4) to [271,19000] (row > 271, column 19000). How > do I do this? Please help. Thank you very much. > > > > --mc > > > > > > > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, > reproducible code. >
Maybe Matching Threads
- In chisq.test(x) : Chi-squared approximation may be incorrect
- Rgraphviz and R 2.5.1 entry point Rf_allocString could not be located
- Could not install aroma.affymetrix
- For Loop performance
- How to handle Which on two matrices that do not have same number of rows