Error: anyDuplicated(self$user.df$region) == 0 is not TRUE
<p>I am self-teaching R to me and at the moment I am having a look on Choropleths in R. For this I am using the packages 'choroplethr' and 'choroplethrAdmin1'.</p>

<p>After plotting all the examples from the instruction of these packages I wanted to plot a map of Germany's administrative 1 levels with random values. So I tried to to use the <code>admin_1choropleth</code> command. The help functions says that the command needs a dataset with two specific columns:</p>

<ul>
<li>one called 'regions' which includes regions with the same spelling as they are in the 'admin1.regions'-dataset provided by the package </li>
<li>a second which is called 'value' to match the including values to the regions</li>
</ul>

<p>For example this code produces a map of Japans Population per km² using the dataset:'df_japan_census' which contains a column called 'value' and one called 'region' </p>

<pre><code>admin1_choropleth("japan",
              df_japan_census,
              "Japan Population",
              "per km²")
</code></pre>

<p>So for plotting an example map of Germany I just used the 'admin1.regions'-dataset (because it includes the regions needed) and added a column 'value' 
to it. Then I tried to plot it. This is how the code is looking:</p>

<pre><code>admin1.regions$value&lt;-3:4401 #the numbers are just placeholders
admin1_choropleth("germany",admin1.regions)
</code></pre>

<p>But now I am getting this Error:</p>

<blockquote>
  <p>Error: anyDuplicated(self$user.df$region) == 0 is not TRUE</p>
</blockquote>

<p>This is my first questions on stackoverflow and I am neither a natural English speaker or a programmer, so I hope you can understand my problem. </p>

<p>If you are having any questions do not hesitate to ask me. </p>

<p>Best,
Marcel</p>

<p>P.S.: To make it easier for you, this should be all you need to reproduce the Error. </p>

<pre><code>install.packages("choroplethr")
library(choroplethr)
install.packages("choroplethrAdmin1")
install.packages("ggplot2")
library(choroplethrAdmin1)
library(ggplot2)

admin1.regions$value&lt;-3:4401
admin1_choropleth("germany",admin1.regions)
</code></pre>