* Prof Brian Ripley evc...@fgngf.bk.np.hx [2012-10-08 06:37:07 +0100]:
On 08/10/2012 02:57, Peter Ehlers wrote:
On 2012-10-07 14:44, Sam Steingold wrote:
* Peter Ehlers ruy...@hpnytnel.pn [2012-10-07 10:03:42 -0700]:
On 2012-10-07 08:34, Sam Steingold wrote:
I know it does not look very
I know it does not look very good - using the same column names to mean
different things in different data frames, but here you go:
--8---cut here---start-8---
x - data.frame(a=c(1,2,3),b=c(4,5,6))
y - data.frame(b=c(1,2),a=c(a,b))
On 2012-10-07 08:34, Sam Steingold wrote:
I know it does not look very good - using the same column names to mean
different things in different data frames, but here you go:
--8---cut here---start-8---
x - data.frame(a=c(1,2,3),b=c(4,5,6))
y -
Cc:
Sent: Sunday, October 7, 2012 11:34 AM
Subject: [R] a merge() problem
I know it does not look very good - using the same column names to mean
different things in different data frames, but here you go:
--8---cut here---start-8---
x - data.frame(a=c(1,2,3),b
- Original Message -
From: Sam Steingold s...@gnu.org
To: r-help@r-project.org
Cc:
Sent: Sunday, October 7, 2012 11:34 AM
Subject: [R] a merge() problem
I know it does not look very good - using the same column names to mean
different things in different data frames, but here you go
* Peter Ehlers ruy...@hpnytnel.pn [2012-10-07 10:03:42 -0700]:
On 2012-10-07 08:34, Sam Steingold wrote:
I know it does not look very good - using the same column names to mean
different things in different data frames, but here you go:
--8---cut
On 2012-10-07 14:44, Sam Steingold wrote:
* Peter Ehlers ruy...@hpnytnel.pn [2012-10-07 10:03:42 -0700]:
On 2012-10-07 08:34, Sam Steingold wrote:
I know it does not look very good - using the same column names to mean
different things in different data frames, but here you go:
On 08/10/2012 02:57, Peter Ehlers wrote:
On 2012-10-07 14:44, Sam Steingold wrote:
* Peter Ehlers ruy...@hpnytnel.pn [2012-10-07 10:03:42 -0700]:
On 2012-10-07 08:34, Sam Steingold wrote:
I know it does not look very good - using the same column names to mean
different things in different
Dear r-help contributors,
I have two questions:
first:
I have a matrix A and a vector B.
I want to make a new matrix C, which is made of the rows of A having a value
included in B.
Second:
I have two matrixes A and B, of different dimensions.
B has unique values in column 2 and A has not
Hi again,
Your second problem can be solved with the merge function. Look at the
help file with ?merge.
Best of luck,
Luc
Juan Pablo Fededa wrote:
Merci a lot!!
On Tue, Apr 14, 2009 at 10:32 PM, Luc Villandre
villa...@dms.umontreal.ca mailto:villa...@dms.umontreal.ca wrote:
Hi
Hi Juan,
Your first question can be answered easily.
bin.matrix = matrix(A %in% B,nrow(A),ncol(A)) ;
bin.vector = rowSums(bin.matrix) 0 ;
C = A[bin.vector,] ;
This should do the trick.
Cheers,
Luc
Juan Pablo Fededa wrote:
Dear r-help contributors,
I have two questions:
first:
I have a
11 matches
Mail list logo