count_occurrences {minMSE} | R Documentation |
Count of Equal Treatment Vectors
Description
Checks if the treatment vector given as argument already exists in the dataframe, i.e., has been produced by one or more earlier iteration(s).
Usage
count_occurrences(df_treatments, curr_treatment)
Arguments
df_treatments |
dataframe containing all the discovered treatment vectors. |
curr_treatment |
treatment vector to be investigated. |
Value
Returns the number of treatment assignment vectors which are equal to the one being investigated.
Author(s)
Sebastian Schneider sschneider@coll.mpg.de; sebastian@sebastianschneider.eu, Giulia Baldini giulia.baldini@uni-bonn.de
Examples
df_treatments <- data.frame(c(0, 2, 0, 1, 1, 0, 2, 1, 1, 0),
c(0, 2, 0, 1, 2, 0, 1, 2, 1, 0),
c(0, 2, 1, 1, 2, 0, 0, 2, 0, 0))
colnames(df_treatments) <- c("treatment_iter_1", "treatment_iter_2", "treatment_iter_3")
count_occurrences(df_treatments,
c(0, 2, 1, 1, 2, 0, 0, 2, 0, 0))
[Package minMSE version 0.5.1 Index]