Searches a data frame for a row that is identical to the provided row and returns its index.

find_identical_row_index(row, dataframe)

Arguments

row

A data frame row or vector to search for

dataframe

The data frame to search within

Value

An integer representing the index of the first identical row found, or NA if no identical row exists in the data frame

Details

This function iterates through each row of the provided data frame and compares it with the target row using the all.equal function. The comparison ignores attributes to focus on the content of the data.

The function is particularly useful for finding specific mutations or cells in larger data frames when the exact row index is not known but the content is.

See also