Description Usage Arguments Details Value Examples
For a given window (dataframe of observations where rows are observations), evaluate whether all observations in the window share the same values for specified columns.
1 | FindHomogeneousWindows(inputted.data, names.of.columns.to.look.at)
|
inputted.data |
A dataframe. |
names.of.columns.to.look.at |
A vector of strings with each string being the name of a column in the datafarame to look at. |
Given a dataframe, look at the values in each of the specified column and sees if there is only one level in the specified column. If there is only one level, then this means rows share the same value for that column. Do this for all specified columns and return true if each column only contains one value. If all observations share the same value for the specified columns, then the window is considered a homogeneous window.
Boolean (true/false) indicating if window is homogeneous.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | col.one <- c(1, 2, 3, 4, 5)
col.two <- c("a", "a", "a", "a", "a")
col.three <- c(1, 1, 1, 1, 1)
single.window.data <- data.frame(col.one, col.two, col.three)
#Example of inhomogeneous window if looking at col.one and col.two because
#col.one does not only have a single unique value.
result <- FindHomogeneousWindows(single.window.data , c("col.one", "col.two"))
result
#Example of homogeneous window if looking at col.two and col.three because
#col.two and col.three both only have a single unique value.
result <- FindHomogeneousWindows(single.window.data , c("col.two", "col.three"))
result
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.