Displaying 20 results from an estimated 3000 matches similar to: "Intersecting list vs rows in matrix"
2006 Feb 03
6
Go back to previous action
Hello all!
I have two views (list_1 and list_2) that show a list of users in two
different ways. In the views for these actions there is a link to edit a
specific user properties (edit_user). That works fine, except that when
I change the user I want to go back to the view that originated the
request and not to the default list (list_1).
Can anyone help me?
Best regards,
Hugo
--
Posted via
2010 Jun 13
4
Are any values in one list contained within a second list
Silly question, but, can I test to see if any value of list a is contained in
list b without doing a loop? A loop is easy enough, but wanted to see if
there was a cleaner way. By way of example:
List 1: a, b, c, d, e, f, g
List 2: z, y, x, w, v, u, b
Return true, since both lists contain b
List 1: a, b, c, d, e, f, g
List 2: z, y, x, w, v, u, t
Return false, since the lists have no mutual
2009 Oct 14
2
Getting indeices of intersecting elements.
Hi,
Is there a command to get the indices of intersecting elements of two
vectors as intersect() will give the elements and not its indices.
Thanks in advance.
Praveen Surendran
School of Medicine and Medical Sciences
University College Dublin
Belfield, Dublin 4
Ireland.
[[alternative HTML version deleted]]
2008 Feb 20
2
intersecting rows of a matrix
useR's,
First, I would like to say thanks to John Fox for providing this segment of
code to perform intersection for multiple sets:
intersection <- function(x, y, ...){
if (missing(...)) intersect(x, y)
else intersect(x, intersection(y, ...))
}
I want to execute this function on the rows of a matrix I have:
Ik.mat.test <- matrix(c(2,3,6,1,2,6,6,1,2),byrow=T,nrow=3)
> Ik.mat.test
2002 May 24
5
intersecting polygons and conversion from decimal degree to km
Dear all,
1. How can I compute the intersecting area between 2 polygons ?
2. I have polygons with coordinates in decimal degrees (i.e. 13 deg 30
min = 13.5 decimal degrees). I want to compute their area and get the
results in square meters or square kiometers. Can anyone give me a
conversion coefficient or a pointer where I can find this information
(sorry for this off topic question) ?
Thanks
2005 May 05
2
Intersection of more than two groups in one function?
Hi all,
As far as I can tell, the only canned way to do an intersect between two
vectors of ints is the intersect(vec1, vec2) function -- is there another
function I'm missing for intersecting more than two vectors??
TIA,
Ken
2006 Jun 16
6
Drag and Drop work in IE?
Please,
I''m build an drag and drop tree using scriptaculous and it is perfect in
FF but when I test in IE don''t work, I drag the element and when I free
the button the element don''t go to the place, stay in the mouse pointer...
What can do it happen? I''m using last version of scriptaculous.
Thank you,
Pedro
2002 Nov 19
5
plotting intersecting planes
Hi all
In two days, I am giving a small, informal workshop in our
Department about using R. Initially, it was just for statistician,
but surprisingly (to me anyhow) many mathematicians are also
coming who have a MATLAB background. They are coming at the
Workshop from a teaching perspective.
They are considering using R to avoid licensing issues with
MATLAB. One thing they were hoping me to
2005 Sep 21
3
ts.intersect bug?
This code gives an error:
a <- ts(1:10, start=0, freq=10)
b <- ts(1:10, start=1, freq=10)
ts.intersect(a,b)
This one works normally (and correctly):
a <- ts(1:10, start=0)
b <- ts(1:10, start=1)
ts.intersect(a,b)
Antonio, Fabio Di Narzo.
P.S. How to switch off italian error messages to post on r-help?
> version
_
platform i386-pc-mingw32
arch i386
os
2010 Oct 25
1
calculate area between intersecting polygons
Dear list:
I am trying to calculate the intersection area between two irregular
polygons (see example data below).
set.seed(1234)
theta <- seq(0, 2 * pi, length=(100))
poly1<- cbind(c(0 + 1 * cos(theta) + rnorm(100, sd=0.1)), c(0 + 2 *
sin(theta)))
poly2<- cbind(c(0 + 2 * cos(theta) ), c(-1 + 1.5 * sin(theta)+ rnorm(100,
sd=0.1)))
plot(x, y, type = "n", ,
2012 Mar 07
1
plot intersecting planes
Hi all,
I need to plot two intersecting planes in a graph. Using persp() function
(see code below) I am not able to add a second plane with good results.
I tried with par(new=TRUE) but the output was very poor.
I have found some previous discussions about this point but (apparently)
without a clear solution.
Any advice would be appreciated.
Simone Tenan
##################
library(popbio)
2010 Jun 29
3
merging/intersecting 2 data frames
Dear R People:
I have two data frames, a.df and b.df as seen here:
> a.df[1:10,]
DATE GENDER PATIENT_ID AGE SYNDROME
1 4/16/2009 F 23686 45 RASH ON BODY
2 4/16/2009 F 13840 35 CANT URINATE
3 4/16/2009 M 12895 30 BLURRED VISION
4 4/16/2009 M 18375 33 UNABLE TO VOID
5 4/16/2009 M 2237 44
2009 Mar 27
2
adding matrices with common column names
folks,
if i have three matrices, a, b, cc with some colnames in common, and i
want to create a matrix which consists of the common columns added up,
and the other columns tacked on, what's a good way to do it? i've got
the following roundabout code for two matrices, but if the number of
matrices increases, then i'm a bit stymied.
> a <- matrix(1:20,ncol=4); colnames(a) <-
2012 Feb 02
3
How to get intersection of multiple vectors?
v1<-c("a","b","c","d")
v2<-c("a","b","e")
v3<-c("a","f","g")
I want to get the intersection of v1,v2,v3,ie "a"
How can I do then?
What I know is only for 2 vectors via "intersect" function,but don't know how to deal with multiple vectors.
Many thanks
2009 Dec 02
3
documentation of intersect() on string vector and num vector and on duplicated elements
> intersect(c(1,3,2),c('1','3'))
[1] "1" "3"
Apparently, intersect() treats num as string. But this is not
documented in the help. Could somebody add it in the future version of
R?
Also according to the help, the argument should not have duplicated
elements. But I tried the following example, it seems that it doesn't
matter where there are duplicated
2008 May 28
1
Multiple Intersections
Hi all,
I don't know if this is the correct venue for this question, but I am sure
that someone will correct me if I am in the wrong list.
I have been searching throughout R for a function that can find the
intersection of multiple sets of "things". Say for instance, I have a list
of $n$ character vectors and would like to find the intersection of all $k$
subsets. I don't
2007 Apr 24
5
intersect more than two sets
Hi,
I searched the archives and did not find a good solution to that.
assume I have 10 sets and I want to have the common character elements of them.
how could i do that?
--
Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.
"Did you always know?"
"No, I did not. But I believed..."
---Matrix III
2013 Sep 01
1
Intersect 2 lists+bring extra columns
Hi everyone,
I am pretty new to R, so be patient.
I am trying to intersect 2 columns and in the rows that intersect, I want
information from the 3rd column to be brought with it. I think it will be
easier to explain with an example example.csv
<http://r.789695.n4.nabble.com/file/n4675136/example.csv> .
In my example, I have a reference list of fruit (first column), and my fruit
of
2011 Oct 25
1
question regarding intersect function
Hi
I have probably a very simple question but I'm going crazy trying to find
the solution.
I have two data.frames with headers and I'm doing an intersection between
them by names, such that the intersected data.frames are returned by:
df1[intersect(names (df1), names(df2))] and the same for df2
Now, I want to have all the opposite data that did not intersect. I tried to
do:
2010 May 20
1
intersect() without discarding duplicates?
Hi all,
The ?intersect entry kindly points out that it discards duplicate
entries. I'm looking, however, to get the intersection while KEEPING
duplicate entries, and there are no instructions on how to accomplish this
using intersect().
Does anybody have any idea how this might be done, or am I going to need to
program something from scratch (something like ordering the vectors and then