Re: [R] subset of rows from matrix

From: jim holtman <jholtman_at_gmail.com>
Date: Sat 29 Jul 2006 - 03:34:01 EST

actually the other way around:

x<-subset(largematrix, largematrix$rownames %in% rownames$names )

On 7/28/06, jim holtman <jholtman@gmail.com> wrote:
>
> try:
>
> x<-subset(largematrix, rownames$names %in% largematrix$rownames)
>
>
>
> On 7/28/06, Wade Wall <wade.wall@gmail.com> wrote:
> >
> > Hi all,
> >
> > I have a dataframe of rownames that I would like to extract from a
> > larger matrix to form a new matrix. I have tried to use subset, in
> > this manner
> >
> > x<-subset(largematrix, rownames$names=largematrix$rownames)
> >
> > where largematrix is the larger matrix and rownames$names is the
> > dataframe with the row names of the rows I want to extract from the
> > larger matrix.
> >
> > Of course, I get error messages. Any suggestions how I should proceed?
> >
> > Thanks
> >
> > Wade
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html<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?
>

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

What is the problem you are trying to solve?

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch 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 Sat Jul 29 03:40:54 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 29 Jul 2006 - 04:17:23 EST.

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