You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/ec_languages.R
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@
18
18
#' \item{morning_greetings}{This variable contains values from the \href{https://lingconlab.ru/tald/005_morning_greetings.html}{"Morning Greetings" chapter} (Naccarato, Verhees 2021) from the Typological Atlas of the Languages of Daghestan. The languages of Daghestan can be classified into three groups according to whether they feature morning greetings including questions about the night’s rest (value `Did you wake up?`), based on the combination of concepts like “morning” and “good” (value `Good morning`), and both stratagies (value `Both`).}
19
19
#' \item{consonant_inventory_size}{This variable contains consonant inventory sizes based on \href{https://lingconlab.ru/tald/phonology.html}{"Phonology" chapter} (Moroz 2021) from the Typological Atlas of the Languages of Daghestan.}
20
20
#' }
21
+
#'
22
+
#' @references Moroz, George (2021). “On phonology of East Caucasian languages”. In: Typological Atlas of the Languages of Daghestan (TALD), v 2.0.0. Ed. by Michael Daniel, Konstantin Filatov, Timur Maisak, George Moroz, Timofey Mukhin, Chiara Naccarato and Samira Verhees. Moscow: Linguistic Convergence Laboratory, NRU HSE. DOI: 10.5281/zenodo.6807070. https://lingconlab.ru/tald.
23
+
#' @references Naccarato, Chiara and Samira Verhees (2021). “Morning greetings”. In: Typological Atlas of the Languages of Daghestan (TALD), v 2.0.0. Ed. by Michael Daniel, Konstantin Filatov, Timur Maisak, George Moroz, Timofey Mukhin, Chiara Naccarato and Samira Verhees. Moscow: Linguistic Convergence Laboratory, NRU HSE. DOI: 10.5281/zenodo.6807070. https://lingconlab.ru/tald.
Copy file name to clipboardExpand all lines: R/ec_tile_map.R
+47-30Lines changed: 47 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,23 @@
6
6
#' @param title_position Character vector of length 1, which specifies the title's position. Possible values are \code{left}, \code{center}, and \code{right}. Default value is \code{left}.
7
7
#' @param annotate_feature Logical variable that specifies, whether to add feature values on the tile. This especially make sense in case of numeric features. Default value is \code{FALSE}.
8
8
#' @param abbreviation Logical variable that specifies, whether use abbreviations for languages specified in the package. Default value is \code{TRUE}.
9
+
#' @param hide_languages Character variable that specifies, which languages should be removed from the template.
9
10
#'
10
11
#' @returns a `ggplot2` object
11
12
#' @export
12
13
#'
13
14
#' @examples
14
15
#' ec_tile_map()
16
+
#'
15
17
#' ec_tile_map(ec_languages,
16
18
#' feature_column = "morning_greetings",
17
19
#' title = "Morning greetings (Naccarato, Verhees 2021)")
18
20
#'
21
+
#' ec_tile_map(ec_languages,
22
+
#' feature_column = "consonant_inventory_size",
23
+
#' title = "Consonant inventory size (Moroz 2021)",
<li><ahref="#how-to-use-rcauctile" id="toc-how-to-use-rcauctile" class="nav-link" data-scroll-target="#how-to-use-rcauctile"><spanclass="header-section-number">3</span> How to use <code>RCaucTile</code></a></li>
89
-
<li><ahref="#changing-the-default-colors" id="toc-changing-the-default-colors" class="nav-link" data-scroll-target="#changing-the-default-colors"><spanclass="header-section-number">4</span> Changing the Default Colors</a></li>
<li><ahref="#changing-the-language-template" id="toc-changing-the-language-template" class="nav-link" data-scroll-target="#changing-the-language-template"><spanclass="header-section-number">6</span> Changing the language template</a></li>
<h2data-number="4" class="anchored" data-anchor-id="changing-the-default-colors"><spanclass="header-section-number">4</span> Changing the Default Colors</h2>
284
+
<h2data-number="4" class="anchored" data-anchor-id="changing-the-default-colors"><spanclass="header-section-number">4</span> Changing the default colors</h2>
284
285
<p>It is possible that the default colors provided by <code>ggplot2</code> are not suitable for your plots. So <code>ggplot2</code> provides several tools for changing them. The function <code>scale_fill_distiller()</code> will help to change the colors of numeric variables to one of the predefined palettes (<code>Blues</code>, <code>BuGn</code>, <code>BuPu</code>, <code>GnBu</code>, <code>Greens</code>, <code>Grey</code>, <code>Oranges</code>, <code>OrRd</code>, <code>PuBu</code>, <code>PuBuGn</code>, <code>PuRd</code>, <code>Purples</code>, <code>RdPus</code>, <code>Reds</code>, <code>YlGn</code>, <code>YlGnBu</code>, <code>YlOrBr</code>, <code>YlOrRd</code>). There is a <code>direction</code> argument that makes it possible to reverse the order of the colors in the palette.</p>
285
286
<divclass="cell">
286
287
<divclass="sourceCode cell-code" id="cb16"><preclass="sourceCode r code-with-copy"><codeclass="sourceCode r"><spanid="cb16-1"><ahref="#cb16-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">library</span>(ggplot2)</span>
<p>The default order of values in R is alphabetical. To impose a different order, you can use the <code>factor()</code> function. This function doesn’t change the values themselves, but it instructs R to treat an input vector as ordered. This can be important for features with a natural order. For example, the following demonstrates how to override the default alphabetical order using <code>factor()</code>.</p>
<h2data-number="6" class="anchored" data-anchor-id="changing-the-language-template"><spanclass="header-section-number">6</span> Changing the language template</h2>
402
+
<p>The East Caucasian language family exhibits significant dialectal differentiation. A unified genealogical classification of all idioms spoken in Daghestan does not exist. The default language inventory in <code>RCaucTile</code> is based on the genealogical classification from the Typological Atlas of the Languages of Daghestan (see <ahref="https://lingconlab.ru/tald/languages.html">the languages page</a>). Therefore, it is highly probable that some researchers may wish to modify the default inventory by removing or altering the names of existing units.</p>
403
+
<p>To remove specific languages from the template, list the desired languages in the <code>remove_languages</code> argument.</p>
404
+
<divclass="cell">
405
+
<divclass="sourceCode cell-code" id="cb25"><preclass="sourceCode r code-with-copy"><codeclass="sourceCode r"><spanid="cb25-1"><ahref="#cb25-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">ec_tile_map</span>(ec_languages,</span>
0 commit comments