similar to: Union/Intersect two continuous sets

Displaying 20 results from an estimated 7000 matches similar to: "Union/Intersect two continuous sets"

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
2010 Mar 18
1
Intersect, Union of date/time ranges
I have 2 sets of data which defines the start and end of date/time periods. I want to be able to obtain the following: 1) The intersect of those 2 sets of date/time ranges i.e. return start/end date/time ranges where both sets overlap 2) The union of those 2 sets of date/time ranges i.e. return the start/end date/time ranges which are in 1 or both sets Is there anything that is currently able
2007 Mar 29
0
(PR#9589) 'union' does not handle factors while 'intersect'
This is not a bug, nor is the subject line true: both do accept factors but what they do with factors is undocumented. From the help (not 'man') page Performs *set* union, intersection, (asymmetric!) difference, equality and membership on two vectors. ^^^^^^^ so it is not said to work on factors. I disagree that what intersect() for
2006 Apr 19
1
about "intersection set" and "union set"
Hello sir: group1:1,2,3,4 group2:1,3,4,5 group3:2,4,8,9 .. ... group1000:9,3,8,2 I wanna get the "intersection set" and "union set". I've tried command "setdiff"and "union",but only two groups is permited.How can I deal with multi groups to find the "intersection set" and "union set"? Thanks a lot! My best
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
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
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
2006 Jan 11
1
complex matrix manipulation question
I've done stuff like this before but it's been a while and I'm stuck. Suppose I have a matrix with one column x and another column y and both are numeric and let the row index of the matrix be i Starting at index i ( i would equal on the first iteration ) when the cumulative sum of x_i+1 - x_i is greater than W = some constant, I want to mark that spot in the row, call it i^* and
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
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
2011 Feb 22
2
How to find points of intersection between harmonic function and a line
Hi, Sorry for the very short explanation about the problem of intersection. I have a wave function monitored from the heart beat in a particular interval of times.?Apart?fom that, there is?a line with positive slope (e.g: y = x+2) which lies across the wave and intersect on a number of points. My problem is i have no exact equation for?such a?complex harmonic wave produced by the heart
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
2009 Apr 15
6
Intersection of two sets of intervals
Hi, Algorithm question: I have two sets of "intervals", where an interval is an ordered pair [a,b] of two numbers. Is there an efficient way in R to generate the intersection of two lists of same? For concreteness: I'm representing a set of intervals with a data.frame: > list1 = as.data.frame(list(open=c(1,5), close=c(2,10))) > list1 open close 1 1 2 2 5
2009 Oct 08
2
intersection of 2 density curves
Hi, I would like to find out the coordinates of the intersection points of 2 density curves. I did a search but i didn't get any significant results. I really hope some of you have some ideas. here it is an example: set.seed(123) x1 <- rnorm(100, 1, 1) x2 <- rnorm(100, 0, 1) d1 <- density(x1) d2 <- density(x2) plot(d1, col = 2) lines(d2, col = 4) Now i would like to know
2011 Jul 06
3
finding the intersection of two vectors
Hi, Suppose I have two vectors, not necessarily the same length (in fact, they usually are different lengths): y.1 that has increasing values between 0 and 1; y.2 that has decreasing values between 1.0 and 0. You can picture these as being supply (= y.1) and demand (= y.2) curves from economics. I typically plot these vectors on the same graph against a common x variable, which happens to
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
2012 Jun 26
3
Intersection
Hello. I have a problem with 2 dataframes. There are 2 columns - "value" and "dates". These dataframes have different dimension. Some dates coincide. And I need to intersect them by dates and have on output two dataframes with identical columns "dates" and new dimension . "value" have to recieve in compliance with dates. Regards, Aleksander. [[alternative
2008 Oct 22
3
coalesce columns within a data frame
Dear all, I searched the mail archives and the R site and found no guidance (tried "merge", "cbind" and terms like "coalesce" with no success). There surely is a way to coalesce (like in SQL) columns in a dataframe, right? For example, I would like to go from a dataframe with two columns to one with only one as follows: From Name.x Name.y nx1 ny1 nx2 NA
2008 Jun 21
1
converting an R function into VBA
Hi everyone, I want to convert an R function into VBA for calculating the eigenvectors and eigenvalues of a matrix using the "Power Method". The function is: PowerMethod <- function(x, tolerance) {     my.mat <- var(x[,-1], na.method="available")     matSize <- dim(my.mat)[1]     eigenVec <- matrix(NA, nrow=matSize, ncol=matSize)     eigenVal <- rep(NA,