# count_occurrences

From minMSE v0.1.1
by Sebastian Schneider

##### Count of Equal Treatment Vectors

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).

- Keywords
- treatment, optim, Assignment, MSE

##### 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.

##### Examples

```
# NOT RUN {
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))
# }
```

*Documentation reproduced from package minMSE, version 0.1.1, License: GNU General Public License*

### Community examples

Looks like there are no examples yet.