[R] subarray

jim holtman jholtman at gmail.com
Wed Jun 18 04:24:20 CEST 2008


If you are trying to subset the matrix, the correct format is:

Y <- dat[, 46:63]

You probably need to reread the introduction to R to understand how
indexing works.

On Tue, Jun 17, 2008 at 10:01 PM, Paul Adams <pma3622 at yahoo.com> wrote:
> Hello everyone,
> I am trying to subset a matrix with the following code:
> dat<-read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt",header=T,row.names=1)
> file.show(file="C:\\Documents and Settings\\Owner\\My Documents\\Yeast\\Yeast.txt")
> Z.matrix<-as.matrix(dat)
> Y<-array(dat,dim(,[46:63])
> but I keep getting the error message: error in dim element 1 is empty
> I am trying to subset the columns 46-63
> Any help would be appreciated
> Paul
>
>
>
>
>        [[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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?



More information about the R-help mailing list