Re: [R] subarray

From: jim holtman <jholtman_at_gmail.com>
Date: Tue, 17 Jun 2008 22:24:20 -0400

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?

______________________________________________
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.
Received on Wed 18 Jun 2008 - 03:05:05 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 18 Jun 2008 - 03:31:01 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive