Questions tagged [matching]

For questions related to pattern matching, using character sequences or tree structures. In contrast to pattern recognition, the match described here usually has to be exact.

2735 questions
0
votes
0 answers

Finding the correct Accuracy value of a matching algorithm

I am currently writing a thesis about a problem in which my algorithm matches nodes between two sets. I am having difficulties defining the proper formal description for the following situation: Set A has c nodes, Set B has also c nodes Each node…
0
votes
0 answers

Gale-Shapely with a twist

I've constructed an algorithm similar to G-S, but for uneven amounts of men and women. The only change to the algorithm is the while statement: While there is a single man and a single woman... (This is to make sure the case when men are more than…
Jack
  • 1
0
votes
1 answer

How to fill all the NA rows with the information of the most recent row that is not NA

Hi I have the following data: test=data.frame(Instrument=c(1,1,1,1,1),Code=c(278865100,NA,NA,278865101,NA),Date=c(2009,2010,2011,2012,2013)) I'd like to fill the first two NA rows with 278865100, and fill the last NA with 278865101. Basically, my…
Jane
  • 91
  • 4
0
votes
2 answers

Match evething inside PHP comment block using RegExr

I'm struggling to mach everything inside a PHP comment block using RegExr. i.e. /** * MATCH EVETHING HERE */ So basically, I want to match everything starting straight after /** and ending straight before */. Can someone please provide me with…
Taha
  • 381
  • 1
  • 5
  • 12
0
votes
0 answers

Matchthem package for ATE

To apply the average treatment effect, I employ the matchthem package. Although the dataset includes numeric and chatacteristic variables with too many NAs. Due to this, neither of mice or amelia is possible to apply. My questions are: 1- How to…
David
  • 1
  • 2
0
votes
1 answer

Partial Case-Insensitive String Search in R

I have a spotify$gens column where it contains all the descriptions of genres of each album. For example: head(spotify$gens) gives gens = c("Jazz Fusion", "Latin Rock, Progressive Rock", "Progressive Rock", "Blues Rock, Electric Blues", "Electric…
Melody
  • 11
  • 3
0
votes
1 answer

How to check which words from a list are contained in a string?

I was looking to collect each word from a list that is included in a string in python. I found some solutions but so far i get: data = "Today I gave my dog some carrots to eat in the car" tweet = data.lower() #convert to…
appletree3
  • 23
  • 3
0
votes
1 answer

Search through two dataframes in R to match values from one column to the other

That title might be confusing so it might be easier to show what I'm trying to do. This is what the first data frame looks like: city code population dallas NA 18 chicago NA 24 new york NA 13 dallas NA 90 And the second data frame…
0
votes
0 answers

Powershell - How to replace a line of text that contains words -like "xyz*"

I have a pipe line already constructed and retrieving my expected results. I want to now replace a whole line if a certain match is found then export the whole lot to a text file, with changes if it were required, or without changes if wasn't…
0
votes
1 answer

Oracle SQL - matching different rows by multiple fields

I am trying to solve the matching of different customers, from different entities. Using only SQL select and "with" syntax, no PL/SQL. Below is a simple example. There are three customers, who are each 3 different individuals, but are recorded…
atoman
  • 3
  • 2
0
votes
1 answer

How to (efficiently) retrieve the value of a column in a different row based on matching IDs?

I'm trying to do what I did in the example below, but on a large scale so Ideally the solution is as efficient as possible. Thanks in advance! ID1 <- c("a", "d", "c", "d") ID2 <- c("d", "e", "f", "g") df <- data.frame(ID1, ID2) df ID1 ID2 1 a…
D_Jakob
  • 1
  • 1
0
votes
1 answer

fuzzy matching of nested data (ex: individuals \in families \in groups)

I am trying to match groups across two datasets, D1,D2. Each dataset represents the groupings at time t=1 and t=2. Assume that the data have 3 nested levels: i: individuals have characteristics: X,Y,Z f: families are made of individuals g: groups…
LucasMation
  • 2,408
  • 2
  • 22
  • 45
0
votes
1 answer

match any number of consecutive words following a backslash

I'm trying to match a TeX command, i.e. a backslash followed by a word (in a desired list) using regex, but with any number of them. For example, if the list I want is test, other, list, then the sequences \test, \other, and \list should be matched,…
btshepard
  • 131
  • 5
0
votes
1 answer

How can I match data from two excel sheets?

Have a question about matching data. I have two excel files one in the extract of the database which is updated once a while and doesn't hold all records because it is not linked to the source application where information is stored. the other…
Robel
  • 1
0
votes
2 answers

What would be the regex pattern for the following?

I have multiple regex strings in…
edox741
  • 43
  • 6