diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..097b1ee --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,77 @@ +title: visibly! +title-img: logo.png + +authors: + Michael Clark: + href: https://m-clark.github.io + html: Michael Clark + +template: + params: + highlight: pygments + #bootswatch: sandstone + templates_path: inst/pkgdown + +highlight: pygments + + +home: + links: + - text: Docs on Stats, R, and more + href: http://m-clark.github.io + +reference: + - title: "Dealing with color" + desc: > + Functions for getting and creating palettes. + contents: + - create_palette + - palettes + - colorgorical + - col2lab + + - title: "Themes" + desc: > + Clean themes. + contents: + - theme_trueMinimal + - theme_plotly + - theme_blank + + - title: "Plotting model results" + desc: > + Functions for plotting fixed and random effect coefficients and more. + contents: + - plot_coefficients + - plot_coefficients.brmsfit + - plot_coefficients.lm + - plot_coefficients.merMod + +figures: + dev: png + dpi: 96 + dev.args: [] + fig.ext: png + fig.width: 7.2916667 + fig.height: ~ + fig.retina: 2 + fig.asp: 1.618 + +navbar: + title: "whatever bc pkgdown will ignore it" + type: ~ + left: + - text: "Reference" + href: "reference/index.html" + - text: "News" + href: "news/index.html" + - text: Articles + menu: + - text: Introduction to visibly + href: articles/intro.html + right: + - icon: fa-github-alt + href: https://github.com/m-clark + - icon: fa-empire + href: https://m-clark.github.io + diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html new file mode 100644 index 0000000..5bb3aba --- /dev/null +++ b/docs/LICENSE-text.html @@ -0,0 +1,139 @@ + + + + + + + + +License • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
YEAR: 2018
+COPYRIGHT HOLDER: Michael Clark
+
+ +
+ +
+ + + +
+ + + + + + diff --git a/docs/articles/index.html b/docs/articles/index.html new file mode 100644 index 0000000..0e09b34 --- /dev/null +++ b/docs/articles/index.html @@ -0,0 +1,141 @@ + + + + + + + + +Articles • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+

All vignettes

+

+ + +
+
+
+ + +
+ + + + + + diff --git a/docs/articles/intro.html b/docs/articles/intro.html new file mode 100644 index 0000000..c5eed58 --- /dev/null +++ b/docs/articles/intro.html @@ -0,0 +1,293 @@ + + + + + + + +An Introduction to Visibly • visibly! + + + + + + + + + + +
+
+ + + +
+
+ + + + +
+

+Palettes & Themes

+

One can get started by creating a palette. This uses the colortools package to provide evenly spaced colors.

+
library(visibly)
+create_palette('papayawhip', plot = TRUE)
+

+
$papayawhip
+[1] "papayawhip"
+
+$complementary
+[1] "#FFEFD5" "#D5E5FF"
+
+$analogous
+[1] "#FFEFD5" "#FAFFD5" "#FFDAD5"
+
+$split_complentary
+[1] "#FFEFD5" "#D5FAFF" "#DAD5FF"
+
+$triadic
+[1] "#FFEFD5" "#D5FFEF" "#EFD5FF"
+
+$square
+[1] "#FFEFD5" "#D5FFDA" "#D5E5FF" "#FFD5FA"
+
+$tetradic
+[1] "#FFEFD5" "#E5FFD5" "#D5E5FF" "#EFD5FF"
+

Here is a palette based on the blue in the R logo.

+ +

The palette creator can create some decent categorical distinctions without too much fuss. The following also demonstrates one of the themes, which has no grid/gray, and de-bolds the black font while leaving text clear; even the fainter version will pass web standards for contrast against a white background. As shown, you can still fiddle with the theme beyond that.

+
pal = create_palette('#ff5500', 
+                     name = 'orange_you_glad_you_have_this_color')
+library(ggplot2)
+
+ggplot(mtcars, aes(x=wt, y=mpg)) +
+  geom_point(aes(color=factor(cyl)), size=10, alpha=.5) +
+  scale_color_manual(values = pal$triadic) +
+  theme_trueMinimal()
+

+
library(dplyr)
+mtcars %>% 
+  mutate(cyl = factor(cyl)) %>% 
+  tidyext::num_by(wt, cyl) %>% 
+  ggplot(aes(x=cyl, y=Mean)) +
+  geom_col(aes(fill=cyl), width=.5, alpha=.85) +
+  scale_fill_manual(values = palettes$Rblue$triadic) +
+  theme_trueMinimal() +
+  theme(legend.key.size = unit(.015, 'npc'),
+        axis.title.y = element_text(size=20, hjust=-.05))
+

+

Another way to create palettes is with a function that works with colorgorical. It connects to that website to create colors based on things like whether they perceptually go together aesthetically, whether they are more or less perceptually distinct, or even if their name is unique.

+ +

+ +

+

To get a starting palette from an R or hexadecimal value, try col2lab.

+ +

However, if you want palettes that are colorblind-safe, print-safe etc., especially for continuous scales, you should use packages like viridis and scico.

+
+
+

+Plotting model results

+

I have some visualizations for plotting uncertainty intervals for fixed and random effects of mixed models. These require the scico package, as well as lme4 and brms which are used to do the mixed models in the first place.

+
+

+lm and glm

+

I don’t really use them aside for demonstration, but in this case the lm and glm objects served as a baseline.

+ +

+

Change the palette, order and more.

+ +

+
+

+Data only

+

You may want to do your own visualization, or go beyond the default settings. Rather than providing a couple dozen arguments for you to tweak, just so you can still feel like you can’t get it just quite right. Here’s the data, do with it what you will!

+ +
+
+
+

+Mixed models

+

I do a lot of mixed models, which is my main reason for providing this functionality, so I’ve started to create some ways to plot the results of the separate fixed and random effects. We’ll use lme4.

+
library(lme4)
+fit_mer = lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
+plot_coefficients(fit_mer)
+

+

And now the random effects. Fewer options can be found here, but this is intentional as you’d want them ordered and the fixed effect style would make things messy whenever there are many random effects, which is often the case. With multiple random effects, a list of ggplot objects is returned.

+
plot_coefficients(fit_mer, ranef = TRUE, which_ranef = 'Subject')
+$`(Intercept)`
+

+

+$Days
+

+

Now for a different palette. Again, these only apply to fixed effects visualizations, due to the number of categories typically seen with random effects and how the visualization is created.

+ +

+

You can use patchwork to put them into one graph.

+
plots = plot_coefficients(fit_mer, ranef = TRUE, which_ranef = 'Subject')
+
+library(patchwork)
+
+plots[[1]] + plots[[2]]
+

+
+

+brms

+

I like brms quite a bit and use it a lot. It served as the motivation for these coefficient plots, as did bayesplot, and tidyposterior.

+ +

+

And now the random effects.

+
plot_coefficients(fit1, ranef = TRUE, which_ranef = 'patient') +
+  theme(axis.text.x = element_text(angle = -90))
+

+
+
+
+
+ + + +
+ + + +
+ + + + + diff --git a/docs/articles/intro_files/figure-html/colorgorical-1.png b/docs/articles/intro_files/figure-html/colorgorical-1.png new file mode 100644 index 0000000..62cb1ff Binary files /dev/null and b/docs/articles/intro_files/figure-html/colorgorical-1.png differ diff --git a/docs/articles/intro_files/figure-html/colorgorical2-1.png b/docs/articles/intro_files/figure-html/colorgorical2-1.png new file mode 100644 index 0000000..b62d558 Binary files /dev/null and b/docs/articles/intro_files/figure-html/colorgorical2-1.png differ diff --git a/docs/articles/intro_files/figure-html/example-1.png b/docs/articles/intro_files/figure-html/example-1.png new file mode 100644 index 0000000..7b74b69 Binary files /dev/null and b/docs/articles/intro_files/figure-html/example-1.png differ diff --git a/docs/articles/intro_files/figure-html/fe1-1.png b/docs/articles/intro_files/figure-html/fe1-1.png new file mode 100644 index 0000000..3f20397 Binary files /dev/null and b/docs/articles/intro_files/figure-html/fe1-1.png differ diff --git a/docs/articles/intro_files/figure-html/fe2-1.png b/docs/articles/intro_files/figure-html/fe2-1.png new file mode 100644 index 0000000..8ec1804 Binary files /dev/null and b/docs/articles/intro_files/figure-html/fe2-1.png differ diff --git a/docs/articles/intro_files/figure-html/fe_brms1_vis-1.png b/docs/articles/intro_files/figure-html/fe_brms1_vis-1.png new file mode 100644 index 0000000..d71fb8f Binary files /dev/null and b/docs/articles/intro_files/figure-html/fe_brms1_vis-1.png differ diff --git a/docs/articles/intro_files/figure-html/lm0-1.png b/docs/articles/intro_files/figure-html/lm0-1.png new file mode 100644 index 0000000..fccfe73 Binary files /dev/null and b/docs/articles/intro_files/figure-html/lm0-1.png differ diff --git a/docs/articles/intro_files/figure-html/lm1-1.png b/docs/articles/intro_files/figure-html/lm1-1.png new file mode 100644 index 0000000..942df35 Binary files /dev/null and b/docs/articles/intro_files/figure-html/lm1-1.png differ diff --git a/docs/articles/intro_files/figure-html/re1-1.png b/docs/articles/intro_files/figure-html/re1-1.png new file mode 100644 index 0000000..4e41d19 Binary files /dev/null and b/docs/articles/intro_files/figure-html/re1-1.png differ diff --git a/docs/articles/intro_files/figure-html/re1-2.png b/docs/articles/intro_files/figure-html/re1-2.png new file mode 100644 index 0000000..1138ba9 Binary files /dev/null and b/docs/articles/intro_files/figure-html/re1-2.png differ diff --git a/docs/articles/intro_files/figure-html/re_brms1-1.png b/docs/articles/intro_files/figure-html/re_brms1-1.png new file mode 100644 index 0000000..1be6afc Binary files /dev/null and b/docs/articles/intro_files/figure-html/re_brms1-1.png differ diff --git a/docs/articles/intro_files/figure-html/re_patchwork-1.png b/docs/articles/intro_files/figure-html/re_patchwork-1.png new file mode 100644 index 0000000..3d9cb63 Binary files /dev/null and b/docs/articles/intro_files/figure-html/re_patchwork-1.png differ diff --git a/docs/articles/intro_files/figure-html/use1-1.png b/docs/articles/intro_files/figure-html/use1-1.png new file mode 100644 index 0000000..d2babab Binary files /dev/null and b/docs/articles/intro_files/figure-html/use1-1.png differ diff --git a/docs/articles/intro_files/figure-html/use2-1.png b/docs/articles/intro_files/figure-html/use2-1.png new file mode 100644 index 0000000..003d53a Binary files /dev/null and b/docs/articles/intro_files/figure-html/use2-1.png differ diff --git a/docs/authors.html b/docs/authors.html new file mode 100644 index 0000000..f134710 --- /dev/null +++ b/docs/authors.html @@ -0,0 +1,142 @@ + + + + + + + + +Authors • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + + +
+ +
+ + + +
+ + + + + + diff --git a/docs/docsearch.css b/docs/docsearch.css new file mode 100644 index 0000000..c524034 --- /dev/null +++ b/docs/docsearch.css @@ -0,0 +1,145 @@ +/* Docsearch -------------------------------------------------------------- */ +/* + Source: https://github.com/algolia/docsearch/ + License: MIT +*/ + +.algolia-autocomplete { + display: block; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1 +} + +.algolia-autocomplete .ds-dropdown-menu { + width: 100%; + min-width: none; + max-width: none; + padding: .75rem 0; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, .1); + box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); +} + +@media (min-width:768px) { + .algolia-autocomplete .ds-dropdown-menu { + width: 175% + } +} + +.algolia-autocomplete .ds-dropdown-menu::before { + display: none +} + +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { + padding: 0; + background-color: rgb(255,255,255); + border: 0; + max-height: 80vh; +} + +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { + margin-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion { + padding: 0; + overflow: visible +} + +.algolia-autocomplete .algolia-docsearch-suggestion--category-header { + padding: .125rem 1rem; + margin-top: 0; + font-size: 1.3em; + font-weight: 500; + color: #00008B; + border-bottom: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { + float: none; + padding-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { + float: none; + width: auto; + padding: 0; + text-align: left +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content { + float: none; + width: auto; + padding: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content::before { + display: none +} + +.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { + padding-top: .75rem; + margin-top: .75rem; + border-top: 1px solid rgba(0, 0, 0, .1) +} + +.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { + display: block; + padding: .1rem 1rem; + margin-bottom: 0.1; + font-size: 1.0em; + font-weight: 400 + /* display: none */ +} + +.algolia-autocomplete .algolia-docsearch-suggestion--title { + display: block; + padding: .25rem 1rem; + margin-bottom: 0; + font-size: 0.9em; + font-weight: 400 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--text { + padding: 0 1rem .5rem; + margin-top: -.25rem; + font-size: 0.8em; + font-weight: 400; + line-height: 1.25 +} + +.algolia-autocomplete .algolia-docsearch-footer { + float: none; + width: auto; + height: auto; + padding: .75rem 1rem 0; + font-size: .95rem; + line-height: 1; + color: #767676; + background-color: rgb(255, 255, 255); + border-top: 1px solid rgba(0, 0, 0, .1) +} + +.algolia-autocomplete .algolia-docsearch-footer--logo { + display: inline; + overflow: visible; + color: inherit; + text-indent: 0; + background: 0 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--highlight { + color: #FF8C00; + background: rgba(232, 189, 54, 0.1) +} + + +.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { + box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) +} + +.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { + background-color: rgba(192, 192, 192, .15) +} diff --git a/docs/extra.css b/docs/extra.css new file mode 100644 index 0000000..45a2d9a --- /dev/null +++ b/docs/extra.css @@ -0,0 +1,537 @@ +@import url("https://fonts.googleapis.com/css?family=Roboto|Roboto:300|Roboto+Mono|Roboto+Condensed|Open+Sans|Stalemate"); +@import url("pygment_highlights.css"); + + +/* latin-ext */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin-ext */ +@font-face { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Cond Light'), local('OpenSans-CondensedLight'), url(https://fonts.gstatic.com/s/opensanscondensed/v10/gk5FxslNkTTHtojXrkp-xC8hAQ4ocbp44gFQt8tMfcH3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Cond Light'), local('OpenSans-CondensedLight'), url(https://fonts.gstatic.com/s/opensanscondensed/v10/gk5FxslNkTTHtojXrkp-xBEur64QvLD-0IbiAdTUNXE.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* latin-ext */ +@font-face { + font-family: 'Libre Baskerville'; + font-style: normal; + font-weight: 400; + src: local('Libre Baskerville'), + local('LibreBaskerville-Regular'), + url(https://fonts.gstatic.com/s/librebaskerville/v4/pR0sBQVcY0JZc_ciXjFsKwHlCYWexZJCPRz1QQ0uKVU.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + + +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url('https://fonts.googleapis.com/css?family=Roboto') format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 300; + src: local('Roboto'), local('Roboto-Regular'), url('https://fonts.googleapis.com/css?family=Roboto:300') format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-family: 'Questrial'; + font-style: normal; + font-weight: 400; + src: local('Questrial'), local('Questrial-Regular'), url('https://fonts.googleapis.com/css?family=Questrial') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + + + +/* Sticky footer */ + +/** + * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ + * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css + * + * .Site -> body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + + + +body { + font-family: Roboto, 'Libre Baskerville', sans-serif; + font-size: 15px; + font-weight: 300; + line-height: 1.5; + color: #404040; /* #404040*/ + position: relative; + background: #FFFFF8; +} + + +p { + font-family: Roboto, 'Helvetica Neue', 'Libre Baskerville', sans-serif; + font-size: 15px; + line-height: 1.5; + font-weight: 300; + color: #404040; + margin: 30px 0; +} + +/* link effects */ +p a { + color: #03b3ff; + background-image: linear-gradient(180deg,transparent 90%, #FF4F03 0); + background-size: 0 100%; + background-repeat: no-repeat; + text-decoration: none; + -webkit-transition: background-size .4s ease; + -moz-transition: background-size .4s ease; + -ms-transition: background-size .4s ease; + -o-transition: background-size .4s ease; + transition: background-size .4s ease; + border-bottom: 0px solid; +} + +p a:hover { + text-decoration: none; + background-size: 100% 100%; + cursor: pointer; +} + +p a:hover, +p a:focus { + color: #03b3ff; /*keep para links with no change*/ +} + + +h1 { + font-family: 'Open Sans Condensed'; + font-weight: 200; + font-size: 175%; + color: #ff5500; + margin-top: 4rem; + margin-bottom: 1.5rem; + line-height: 1; +} + +h2 { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 400; + font-size: 150%; + color: #ff5500; + margin-top: 2.1rem; + margin-bottom: 1.2rem; + line-height: 1; +} + +h3 { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 400; + font-size: 125%; + color: #ff5500; + opacity: .9; + margin-top: 2rem; + margin-bottom: 1.2rem; + line-height: 1; +} + +h4 { + font-family: 'Open Sans Condensed'; + font-variant: normal; + font-weight: 400; + font-size: 110%; + color: #ff5500; + opacity: .9; + margin-top: 1.9rem; + margin-bottom: 1.2rem; + line-height: 1; +} + + + +blockquote { + color: #808080; + font-style: italic; +} + +hr.small { + max-width: 100px; + margin: 15px auto; + border-width: 4px; + border-color: inherit; + border-radius: 3px; +} + +li::before { + /*content: "• "; Currently can't separate li::before from other 'before', nor can get to the style for this button specifically. This works but adds another button, and for a lot of nonlist objects as well + color: #ff5500; /* color of list button https://stackoverflow.com/questions/5306640/how-to-set-bullet-colors-in-ul-li-html-lists-via-css-without-using-any-images-or*/ +} + + +pre, code { + font-family: 'Roboto Mono', Monaco, Menlo, Consolas, monospace; + +} + + + + +/* --- Sidebar --- */ + +#sidebar { + /*margin-top: 30px;*/ + padding-top: 1%; +} + +/* --- Navbar --- */ + +.navbar { + background: #d9edf7; /*#f2f2c7 #F5F5F5*/ + border-bottom: 1px solid #EAEAEA; + font-family: 'Helvetica Neue', Helvetica, 'Open Sans', Arial, sans-serif; + /* width: 70%; + padding-left: 15%; */ /*maybe change later*/ +} + +.navbar-link { + color: #ff5500; +} + + +.navbar-inverse .navbar-link:hover { + color: #fff; +} + +.navbar .nav li a { + text-transform: uppercase; + font-size: 12px; + letter-spacing: 1px; +} + + + +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:focus, +.navbar-inverse .navbar-nav > .active > a:hover { + color: #404040; + background-color: inherit; +} + +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:focus, +.navbar-inverse .navbar-nav > .open > a:hover { + color: #404040; + background-color: inherit; +} + +.navbar .navbar-nav > .active > a, +.navbar .navbar-nav > .active > a:focus, +.navbar .navbar-nav > .active > a:hover { + color: #404040; + background-color: inherit; +} + +.navbar .navbar-nav > .open > a, +.navbar .navbar-nav > .open > a:focus, +.navbar .navbar-nav > .open > a:hover { + color: #404040; + background-color: inherit; +} + +/* navbar-brand is the package name/home link */ +.navbar .navbar-brand, +.navbar .nav li a { + font-weight: 500; + color: #404040; +} + +.navbar-brand .navbar-link { + color: #ff5500; + background-image: linear-gradient(180deg,transparent 90%, #FF4F03 0); + background-size: 0 100%; + background-repeat: no-repeat; + text-decoration: none; + -webkit-transition: background-size .4s ease; + -moz-transition: background-size .4s ease; + -ms-transition: background-size .4s ease; + -o-transition: background-size .4s ease; + transition: background-size .4s ease; + border-bottom: 0px solid; +} + +.navbar-brand .navbar-link:hover { + text-decoration: none; + background-size: 100% 100%; + cursor: pointer; +} + +.navbar-brand .navbar-link:hover, +.navbar-brand .navbar-link:focus { + color: #03b3ff; /*keep para links with no change*/ +} + + + +.navbar:hover, +.navbar:focus , +.navbar .nav li a:hover, +.navbar .nav li a:focus { + color: #0085a1; +} + +@media only screen and (min-width: 768px) { + .navbar { + padding: 20px 0; + -webkit-transition: background .5s ease-in-out,padding .5s ease-in-out; + -moz-transition: background .5s ease-in-out,padding .5s ease-in-out; + transition: background .5s ease-in-out,padding .5s ease-in-out; + } + + .navbar.top-nav-short { + padding: 0; + } +} + +.navbar .avatar-container { + opacity: 1; + position: absolute; + -webkit-transition: opacity 0.5s ease-in-out; + -moz-transition: opacity 0.5s ease-in-out; + transition: opacity 0.5s ease-in-out; + left: 50%; + width: 50px; + margin-top: -25px; +} +.navbar .avatar-container .avatar-img-border { + width: 100%; + border-radius: 50%; + margin-left: -50%; + display: inline-block; + box-shadow: 0 0 8px rgba(0, 0, 0, .8); + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .8); + -moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8); +} +.navbar .avatar-container .avatar-img { + width: 100%; + border-radius: 50%; + display: block; +} + +.navbar.top-nav-short .avatar-container{ + opacity: 0; +} + +.navbar.top-nav-expanded .avatar-container { + display: none; +} + +@media only screen and (min-width: 768px) { + .navbar .avatar-container { + width: 100px; + margin-top: -50px; + } + + .navbar .avatar-container .avatar-img-border { + width: 100%; + box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + -moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + } + + .navbar .avatar-container .avatar-img { + width: 100%; + } +} + +/* Multi-level navigation links */ +.navbar .nav .navlinks-container { + position: relative; +} +.navbar .nav .navlinks-parent:after { + content: " \25BC"; +} +.navbar .nav .navlinks-children { + width: 100%; + display: none; + word-break: break-word; +} +.navbar .nav .navlinks-container .navlinks-children a { + display: block; + padding: 10px; + padding-left: 30px; + background: #f5f5f5; + text-decoration: none !important; + border-width: 0 1px 1px 1px; + font-weight: normal; +} +@media only screen and (max-width: 767px) { + .navbar .nav .navlinks-container.show-children { + background: #eee; + } + .navbar .nav .navlinks-container.show-children .navlinks-children { + display: block; + } +} +@media only screen and (min-width: 768px) { + .navbar .nav .navlinks-container:hover { + background: #eee; + } + .navbar .nav .navlinks-container:hover .navlinks-children { + display: block; + } + .navbar .nav .navlinks-children { + position: absolute; + text-align: center; + } + .navbar .nav .navlinks-container .navlinks-children a { + padding-left: 10px; + border: 1px solid #eaeaea; + border-width: 0 1px 1px; + } +} + +.nav-pills > li.active > a, +.nav-pills > li.active > a:focus, +.nav-pills > li.active > a:hover{ + width: 80%; + color: #404040; + font-size: 100%; + background-color: #d9edf7; +} + +.nav-pills > li > a { + border-radius: 4px; + font-size: 100%; + width: 80%; +} + + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:focus, +.dropdown-menu > .active > a:hover { + background-color: transparent; +} + + + + +/* --- Footer --- */ + +footer { + padding: 5px; + background: #FFFFF8; + border-top: 1px #EAEAEA solid; + margin-top: 25px; + font-size: 14px; + width: 100%; +} + +footer a { + color: #404040; +} + +footer .list-inline { + margin: 0; + padding: 0; +} + +footer .copyright { + font-family: Open Sans; + text-align: center; + /* margin-bottom: 0; */ +} +footer .pkgdown { + font-family: Open Sans; + text-align: center; + /* margin-bottom: 0; */ +} +footer .theme-by { + text-align: center; + margin: 10px 0 0; +} + +@media only screen and (min-width: 768px) { + footer { + padding: 10px 0; + } + footer .footer-links { + font-size: 12px; + } + footer .copyright { + font-size: 12px; + } +} + + +/* Misc */ + +.emph { + color: #E32D00 ; /*#ff5500 #D14300*/ + font-weight: 500; +} + +/* pack func and objclass colors initially come from hcl(seq(90,360, length.out=4), c=80, l=80); redone for contrast*/ +.pack { + color: #990071; /*#AC9CFF #e41a1c*/ + font-weight: 500; +} + +.func { + color: #007020; /*#00CBB6; #984ea3; can just use `` instead*/ + font-weight: 600; +} + +.objclass { + color: #947100; /*#AAB400 #4daf4a; #FFC5D0*/ + font-weight: 500; +} + +/* until they get syntax highlighting */ +/* function */ +.kw { + color: #007020; +} + +/* logical NA */ +.ot { + color: #337ab7; +} + +/* char/string */ +.ch, .st { + color: #aa5500; +} + +/* float, other */ +.fl, .dv { + color: #23527c; +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..d1bd660 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,269 @@ + + + + + + + +Functions and palettes related to visual enhancement • visibly! + + + + + + + + + + +
+
+ + + +
+
+ + + + + +
+ +

+

Visibly is a handful of functions I use for color palettes, themes, etc. in R. Inside you will find:

+ +
+

+Installation

+

The development version then install directly from GitHub:

+ +

Visibly is currently in its very early stages, so more may be added soon. For some additional palettes for those fond of another time, you might be interested in NineteenEightyR.

+
+
+

+Examples

+

Create a palette. This requires the colortools package to create equally spaced colors.

+ +

Plot it to get a feel for things.

+
create_palette('#ff5500', plot = T)
+

+
$`#ff5500`
+[1] "#ff5500"
+
+$complementary
+[1] "#FF5500" "#00AAFF"
+
+$analogous
+[1] "#FF5500" "#FFD500" "#FF002B"
+
+$split_complentary
+[1] "#FF5500" "#00FFD4" "#002BFF"
+
+$triadic
+[1] "#FF5500" "#00FF55" "#5500FF"
+
+$square
+[1] "#FF5500" "#2AFF00" "#00AAFF" "#D500FF"
+
+$tetradic
+[1] "#FF5500" "#AAFF00" "#00AAFF" "#5500FF"
+

There are some other options to express.

+ +

+
$orange_you_glad_you_have_this_color
+[1] "#FF550080"
+
+$complementary
+[1] "#FF550080" "#00AAFF80"
+
+$analogous
+[1] "#FF550080" "#FFD50080" "#FF002B80"
+
+$split_complentary
+[1] "#FF550080" "#00FFD480" "#002BFF80"
+
+$triadic
+[1] "#FF550080" "#00FF5580" "#5500FF80"
+
+$square
+[1] "#FF550080" "#2AFF0080" "#00AAFF80" "#D500FF80"
+
+$tetradic
+[1] "#FF550080" "#AAFF0080" "#00AAFF80" "#5500FF80"
+

One of the built-in palettes is based on R’s blue. Others are based on Stan’s red, plotly’s base colors, and the red-blue palette from RColorBrewer.

+ +

One can create some colors from colorgorical.

+ +

Pretty, and pretty easy, coefficient plots.

+ +

+
+
+
+ + + +
+ + + +
+ + + + + diff --git a/docs/jquery.sticky-kit.min.js b/docs/jquery.sticky-kit.min.js new file mode 100644 index 0000000..1c16271 --- /dev/null +++ b/docs/jquery.sticky-kit.min.js @@ -0,0 +1,11 @@ +/* Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | */ +/* + Source: https://github.com/leafo/sticky-kit + License: MIT +*/ +(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k)); +if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("
"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q, +u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),eb&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}), +a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize", +y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n + + + + + diff --git a/docs/news/index.html b/docs/news/index.html new file mode 100644 index 0000000..e48440f --- /dev/null +++ b/docs/news/index.html @@ -0,0 +1,167 @@ + + + + + + + + +Changelog • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+

+visibly 0.2.0

+
    +
  • Package website.
  • +
+
+
+

+visibly 0.1.5

+
    +
  • Add coefficient plots.
  • +
+
+
+

+visibly 0.1.0

+
    +
  • Initial start of package.
  • +
+
+
+ + + +
+ + +
+ + + + + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css new file mode 100644 index 0000000..c5ab586 --- /dev/null +++ b/docs/pkgdown.css @@ -0,0 +1,227 @@ +/* Sticky footer */ + +/** + * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ + * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css + * + * .Site -> body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + +html, body { + height: 100%; +} + +body > .container { + display: flex; + height: 100%; + flex-direction: column; + + padding-top: 60px; +} + +body > .container .row { + flex: 1 0 auto; +} + +footer { + margin-top: 45px; + padding: 35px 0 36px; + border-top: 1px solid #e5e5e5; + color: #666; + display: flex; + flex-shrink: 0; +} +footer p { + margin-bottom: 0; +} +footer div { + flex: 1; +} +footer .pkgdown { + text-align: right; +} +footer p { + margin-bottom: 0; +} + +img.icon { + float: right; +} + +img { + max-width: 100%; +} + +/* Typographic tweaking ---------------------------------*/ + +.contents h1.page-header { + margin-top: calc(-60px + 1em); +} + +/* Section anchors ---------------------------------*/ + +a.anchor { + margin-left: -30px; + display:inline-block; + width: 30px; + height: 30px; + visibility: hidden; + + background-image: url(./link.svg); + background-repeat: no-repeat; + background-size: 20px 20px; + background-position: center center; +} + +.hasAnchor:hover a.anchor { + visibility: visible; +} + +@media (max-width: 767px) { + .hasAnchor:hover a.anchor { + visibility: hidden; + } +} + + +/* Fixes for fixed navbar --------------------------*/ + +.contents h1, .contents h2, .contents h3, .contents h4 { + padding-top: 60px; + margin-top: -40px; +} + +/* Static header placement on mobile devices */ +@media (max-width: 767px) { + .navbar-fixed-top { + position: absolute; + } + .navbar { + padding: 0; + } +} + + +/* Sidebar --------------------------*/ + +#sidebar { + margin-top: 30px; +} +#sidebar h2 { + font-size: 1.5em; + margin-top: 1em; +} + +#sidebar h2:first-child { + margin-top: 0; +} + +#sidebar .list-unstyled li { + margin-bottom: 0.5em; +} + +.orcid { + height: 16px; + vertical-align: middle; +} + +/* Reference index & topics ----------------------------------------------- */ + +.ref-index th {font-weight: normal;} + +.ref-index td {vertical-align: top;} +.ref-index .alias {width: 40%;} +.ref-index .title {width: 60%;} + +.ref-index .alias {width: 40%;} +.ref-index .title {width: 60%;} + +.ref-arguments th {text-align: right; padding-right: 10px;} +.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments .name {width: 20%;} +.ref-arguments .desc {width: 80%;} + +/* Nice scrolling for wide elements --------------------------------------- */ + +table { + display: block; + overflow: auto; +} + +/* Syntax highlighting ---------------------------------------------------- */ + +pre { + word-wrap: normal; + word-break: normal; + border: 1px solid #eee; +} + +pre, code { + background-color: #f8f8f8; + color: #333; +} + +pre code { + overflow: auto; + word-wrap: normal; + white-space: pre; +} + +pre .img { + margin: 5px 0; +} + +pre .img img { + background-color: #fff; + display: block; + height: auto; +} + +code a, pre a { + color: #375f84; +} + +a.sourceLine:hover { + text-decoration: none; +} + +.fl {color: #1514b5;} +.fu {color: #000000;} /* function */ +.ch,.st {color: #036a07;} /* string */ +.kw {color: #264D66;} /* keyword */ +.co {color: #888888;} /* comment */ + +.message { color: black; font-weight: bolder;} +.error { color: orange; font-weight: bolder;} +.warning { color: #6A0366; font-weight: bolder;} + +/* Clipboard --------------------------*/ + +.hasCopyButton { + position: relative; +} + +.btn-copy-ex { + position: absolute; + right: 0; + top: 0; + visibility: hidden; +} + +.hasCopyButton:hover button.btn-copy-ex { + visibility: visible; +} + +/* mark.js ----------------------------*/ + +mark { + background-color: rgba(255, 255, 51, 0.5); + border-bottom: 2px solid rgba(255, 153, 51, 0.3); + padding: 1px; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js new file mode 100644 index 0000000..16d5750 --- /dev/null +++ b/docs/pkgdown.js @@ -0,0 +1,174 @@ +$(function() { + + $("#sidebar") + .stick_in_parent({offset_top: 40}) + .on('sticky_kit:bottom', function(e) { + $(this).parent().css('position', 'static'); + }) + .on('sticky_kit:unbottom', function(e) { + $(this).parent().css('position', 'relative'); + }); + + $('body').scrollspy({ + target: '#sidebar', + offset: 60 + }); + + $('[data-toggle="tooltip"]').tooltip(); + + var cur_path = paths(location.pathname); + $("#navbar ul li a").each(function(index, value) { + if (value.text == "Home") + return; + if (value.getAttribute("href") === "#") + return; + + var path = paths(value.pathname); + if (is_prefix(cur_path, path)) { + // Add class to parent
  • , and enclosing
  • if in dropdown + var menu_anchor = $(value); + menu_anchor.parent().addClass("active"); + menu_anchor.closest("li.dropdown").addClass("active"); + } + }); +}); + +$(document).ready(function() { + // do keyword highlighting + /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ + var mark = function() { + + var referrer = document.URL ; + var paramKey = "q" ; + + if (referrer.indexOf("?") !== -1) { + var qs = referrer.substr(referrer.indexOf('?') + 1); + var qs_noanchor = qs.split('#')[0]; + var qsa = qs_noanchor.split('&'); + var keyword = ""; + + for (var i = 0; i < qsa.length; i++) { + var currentParam = qsa[i].split('='); + + if (currentParam.length !== 2) { + continue; + } + + if (currentParam[0] == paramKey) { + keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); + } + } + + if (keyword !== "") { + $(".contents").unmark({ + done: function() { + $(".contents").mark(keyword); + } + }); + } + } + }; + + mark(); +}); + +function paths(pathname) { + var pieces = pathname.split("/"); + pieces.shift(); // always starts with / + + var end = pieces[pieces.length - 1]; + if (end === "index.html" || end === "") + pieces.pop(); + return(pieces); +} + +function is_prefix(needle, haystack) { + if (needle.length > haystack.lengh) + return(false); + + // Special case for length-0 haystack, since for loop won't run + if (haystack.length === 0) { + return(needle.length === 0); + } + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(false); + } + + return(true); +} + +/* Clipboard --------------------------*/ + +function changeTooltipMessage(element, msg) { + var tooltipOriginalTitle=element.getAttribute('data-original-title'); + element.setAttribute('data-original-title', msg); + $(element).tooltip('show'); + element.setAttribute('data-original-title', tooltipOriginalTitle); +} + +if(Clipboard.isSupported()) { + $(document).ready(function() { + var copyButton = ""; + + $(".examples").addClass("hasCopyButton"); + + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); + + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); + + // Initialize clipboard: + var clipboardBtnCopies = new Clipboard('[data-clipboard-copy]', { + text: function(trigger) { + return trigger.parentNode.textContent; + } + }); + + clipboardBtnCopies.on('success', function(e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); + + clipboardBtnCopies.on('error', function() { + changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + }); + }); +} + +/* Search term highlighting ------------------------------*/ + +function matchedWords(hit) { + var words = []; + + var hierarchy = hit._highlightResult.hierarchy; + // loop to fetch from lvl0, lvl1, etc. + for (var idx in hierarchy) { + words = words.concat(hierarchy[idx].matchedWords); + } + + var content = hit._highlightResult.content; + if (content) { + words = words.concat(content.matchedWords); + } + + // return unique words + var words_uniq = [...new Set(words)]; + return words_uniq; +} + +function updateHitURL(hit) { + + var words = matchedWords(hit); + var url = ""; + + if (hit.anchor) { + url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; + } else { + url = hit.url + '?q=' + escape(words.join(" ")); + } + + return url; +} diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml new file mode 100644 index 0000000..2b4f1c5 --- /dev/null +++ b/docs/pkgdown.yml @@ -0,0 +1,6 @@ +pandoc: 2.2.1 +pkgdown: 1.0.0 +pkgdown_sha: ~ +articles: + intro: intro.html + diff --git a/docs/reference/col2lab.html b/docs/reference/col2lab.html new file mode 100644 index 0000000..6b40c5b --- /dev/null +++ b/docs/reference/col2lab.html @@ -0,0 +1,192 @@ + + + + + + + + +Convert color to lab — col2lab • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    Converts an R color

    + +
    + +
    col2lab(color)
    + +

    Arguments

    + + + + + + +
    color

    An R color or a hexadecimal string of the form "#rrggbb"

    + +

    Value

    + +

    A matrix of LAB values useful for colorgorical starting points.

    + +

    Details

    + +

    See the help for convertColor.

    + +

    See also

    + + + + +

    Examples

    +
    library(visibly) +col2lab('red')
    #> L a.x b +#> [1,] 53.48418 80.01027 67.38407
    x = list('red', 'white', 'blue') +col2lab(x)
    #> L a.x b +#> [1,] 53.48418 80.01027 67.38407 +#> [2,] 100.00000 0.00000 0.00000 +#> [3,] 32.24075 78.82042 -107.93632
    +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/colorgorical.html b/docs/reference/colorgorical.html new file mode 100644 index 0000000..7508f68 --- /dev/null +++ b/docs/reference/colorgorical.html @@ -0,0 +1,286 @@ + + + + + + + + +Create a colorgorical palette — colorgorical • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    An interface for creating palettes from + colorgorical.

    + +
    + +
    colorgorical(n = 10, perceptualDifference = 0, nameDifference = 0,
    +  nameUniqueness = 0, pairPreference = 0, hueFilters = list(),
    +  lightnessRange = c("25", "85"), startPalette = list(), output = "HEX")
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    n

    Number of color values to return.

    perceptualDifference

    Value from 0 to 1. See details.

    nameDifference

    Value from 0 to 1. See details.

    nameUniqueness

    Value from 0 to 1. See details.

    pairPreference

    Value from 0 to 1. See details.

    hueFilters

    Must be given as an element of a list. See details.

    lightnessRange

    See details.

    startPalette

    A starting point for the color as a vector of 3 CIE Lab +values. Must be given as an element of a list. See details.

    output

    Character string. Output may be given as LAB, sRGB, or HEX +values. If 'LAB' or 'sRGB', a matrix of those values where each row +represents a color. If 'HEX', the default, a character vector of hex values +is returned.

    + +

    Value

    + +

    A character vector of color values in hex form.

    + +

    Details

    + +

    This function accesses the colorgorical website to create a color + palette. It requires two other packages to work: httr and + jsonlite, and if you want a hex value, colorspace.

    +

    The following are relevant parts from the descriptions at the website.

    +

    Perceptual Distance: Increasing Perceptual Distance favors palette + colors that are more easily discriminable to the human eye. To accurately + model human color acuity, this is performed using CIEDE2000 in CIE Lab + color space.

    +

    Name Difference: Increasing Name Difference favors palette colors + that share few common names. This is similar to perceptual distance, but + can lead to different results in certain areas of color space. This happens + when there are many different names for perceptually close colors (e.g., + red and pink are perceptually close but named differently). Colorgorical + calculates this using Heer and Stone's Name Difference function, which is + built on top of the XKCD color-name survey.

    +

    Pair Preference: Increasing Pair Preference favors palette colors + that are, on average, predicted to be more aesthetically preferable + together. Typically these colors are similar in hue, have different + lightness, and are cooler colors (blues and greens). Pair Preference is + based off of Schloss and Palmer's research on color preference.

    +

    Name Uniqueness: Increasing Name Uniqueness favors palette colors + that are uniquely named. Some colors like red are readily named and are + favored, whereas other colors are less obviously named and are ignored. + Like, Name Difference, Name Uniqueness is based on Heer and Stone's + color-name research.

    +

    Select hue filter: You can limit which colors are selected by either + dragging over the wheel to select a hue range, or by entering the angles + manually (e.g., select only reds). You can also make multiple selections + after one another to select many different hue ranges (e.g., select both + greens and purples).

    +

    Select lightness range: You can change whether Colorgorical samples + lighter or darker colors.

    +

    Add starting colors: You can guarantee that certain colors are in + your palette. Note, as near as I can tell, it is only guaranteed if you + have already created a palette at the website and start with one of the + generated colors. Otherwise, it appears to pick something close to the + starting point(s) given the settings. See the example.

    +

    NOTE: Because JSON is being used behind the scenes, for hueFilters + and startPalette, the values must be given as a list.

    +

    For example:

    +

    hueFilters = list(c(90, 180))

    +

    startPalette = list(c(59, 62, 70))

    +

    The R code is based on the gist by Kamil Slowikowski found here: +link.

    + +

    References

    + +

    The colorgorical website.

    +

    Original Python source code +at GitHub.

    + + +

    Examples

    +
    # NOT RUN {
    +library(visibly)
    +colorgorical(n=12, pairPreference = 1, startPalette = list(c(10, -60, 45)))
    +
    +# go from hex to lab to use single starting point, but see note about
    +starting colors
    +col = t(col2rgb(palettes$Rblue$Rblue))
    +col = convertColor(col, from = "sRGB", to = "Lab", scale.in = 255)[1,]
    +testcol = colorgorical(n=12, pairPreference = 1, startPalette = list(col))
    +testcol = c(palettes$Rblue$Rblue, testcol)
    +ggplot2::qplot(x=factor(testcol, levels = testcol),
    +               y=1:12,
    +               color=I(testcol),
    +               size=I(10))
    +# }
    +
    +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/create_palette.html b/docs/reference/create_palette.html new file mode 100644 index 0000000..1579066 --- /dev/null +++ b/docs/reference/create_palette.html @@ -0,0 +1,247 @@ + + + + + + + + +Create a color palette — create_palette • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    Uses colortools package (and possibly scales) to easily create a + color palette based on a initial input color.

    + +
    + +
    create_palette(colorhex, name = NULL, toHCL = FALSE, plot = FALSE,
    +  alpha = 1)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + +
    colorhex

    Hexadecimal value of color or an R color name.

    name

    optional name of color

    toHCL

    Convert colors to hcl. Defaults to FALSE.

    plot

    Plot the results. Defaults to FALSE.

    alpha

    Transparency. Takes values from 0 to 1. Default is 1.

    + +

    Value

    + +

    A list of colors

    + +

    Details

    + +

    Will return complementary, analogous/adjacent, split complementary, + triadic, square and tetradic color values relative to the initial color. + Note that if you want sequential, qualitative, diverging etc., other + packages like + RColorBrewer, + colorspace, and + colortools will + do that for you.

    + + +

    Examples

    +
    library(visibly) +create_palette(colorhex = '#ff5500', name='orange')
    #> $orange +#> [1] "#ff5500" +#> +#> $complementary +#> [1] "#FF5500" "#00AAFF" +#> +#> $analogous +#> [1] "#FF5500" "#FFD500" "#FF002B" +#> +#> $split_complentary +#> [1] "#FF5500" "#00FFD4" "#002BFF" +#> +#> $triadic +#> [1] "#FF5500" "#00FF55" "#5500FF" +#> +#> $square +#> [1] "#FF5500" "#2AFF00" "#00AAFF" "#D500FF" +#> +#> $tetradic +#> [1] "#FF5500" "#AAFF00" "#00AAFF" "#5500FF" +#>
    create_palette(colorhex = '#ff5500', name='orange', alpha=.5)
    #> $orange +#> [1] "#FF550080" +#> +#> $complementary +#> [1] "#FF550080" "#00AAFF80" +#> +#> $analogous +#> [1] "#FF550080" "#FFD50080" "#FF002B80" +#> +#> $split_complentary +#> [1] "#FF550080" "#00FFD480" "#002BFF80" +#> +#> $triadic +#> [1] "#FF550080" "#00FF5580" "#5500FF80" +#> +#> $square +#> [1] "#FF550080" "#2AFF0080" "#00AAFF80" "#D500FF80" +#> +#> $tetradic +#> [1] "#FF550080" "#AAFF0080" "#00AAFF80" "#5500FF80" +#>
    +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/figures/README-example4-1.png b/docs/reference/figures/README-example4-1.png new file mode 100644 index 0000000..f04e8b9 Binary files /dev/null and b/docs/reference/figures/README-example4-1.png differ diff --git a/docs/reference/figures/README-fe0-1.png b/docs/reference/figures/README-fe0-1.png new file mode 100644 index 0000000..217c80f Binary files /dev/null and b/docs/reference/figures/README-fe0-1.png differ diff --git a/docs/reference/figures/README-fe1-1.png b/docs/reference/figures/README-fe1-1.png new file mode 100644 index 0000000..fe9ceb5 Binary files /dev/null and b/docs/reference/figures/README-fe1-1.png differ diff --git a/docs/reference/figures/README-fe_brms1_vis-1.png b/docs/reference/figures/README-fe_brms1_vis-1.png new file mode 100644 index 0000000..722f202 Binary files /dev/null and b/docs/reference/figures/README-fe_brms1_vis-1.png differ diff --git a/docs/reference/figures/README-lm0-1.png b/docs/reference/figures/README-lm0-1.png new file mode 100644 index 0000000..fccfe73 Binary files /dev/null and b/docs/reference/figures/README-lm0-1.png differ diff --git a/docs/reference/figures/README-lm0-1.svg b/docs/reference/figures/README-lm0-1.svg new file mode 100644 index 0000000..fccfe73 Binary files /dev/null and b/docs/reference/figures/README-lm0-1.svg differ diff --git a/docs/reference/figures/README-plot-1.png b/docs/reference/figures/README-plot-1.png new file mode 100644 index 0000000..f4d946d Binary files /dev/null and b/docs/reference/figures/README-plot-1.png differ diff --git a/docs/reference/figures/README-plot-1.svg b/docs/reference/figures/README-plot-1.svg new file mode 100644 index 0000000..ee91762 Binary files /dev/null and b/docs/reference/figures/README-plot-1.svg differ diff --git a/docs/reference/figures/README-plot2-1.png b/docs/reference/figures/README-plot2-1.png new file mode 100644 index 0000000..f4d946d Binary files /dev/null and b/docs/reference/figures/README-plot2-1.png differ diff --git a/docs/reference/figures/README-plot2-1.svg b/docs/reference/figures/README-plot2-1.svg new file mode 100644 index 0000000..ee91762 Binary files /dev/null and b/docs/reference/figures/README-plot2-1.svg differ diff --git a/docs/reference/figures/README-plot2-2.png b/docs/reference/figures/README-plot2-2.png new file mode 100644 index 0000000..2651f0a Binary files /dev/null and b/docs/reference/figures/README-plot2-2.png differ diff --git a/docs/reference/figures/README-plot2-2.svg b/docs/reference/figures/README-plot2-2.svg new file mode 100644 index 0000000..44b201d Binary files /dev/null and b/docs/reference/figures/README-plot2-2.svg differ diff --git a/docs/reference/figures/README-re1-1.png b/docs/reference/figures/README-re1-1.png new file mode 100644 index 0000000..202ce57 Binary files /dev/null and b/docs/reference/figures/README-re1-1.png differ diff --git a/docs/reference/figures/README-re1-2.png b/docs/reference/figures/README-re1-2.png new file mode 100644 index 0000000..c1cd39b Binary files /dev/null and b/docs/reference/figures/README-re1-2.png differ diff --git a/docs/reference/figures/README-re2-1.png b/docs/reference/figures/README-re2-1.png new file mode 100644 index 0000000..19356f3 Binary files /dev/null and b/docs/reference/figures/README-re2-1.png differ diff --git a/docs/reference/figures/README-re_brms1_vis-1.png b/docs/reference/figures/README-re_brms1_vis-1.png new file mode 100644 index 0000000..0ff9535 Binary files /dev/null and b/docs/reference/figures/README-re_brms1_vis-1.png differ diff --git a/docs/reference/figures/README-re_patchwork-1.png b/docs/reference/figures/README-re_patchwork-1.png new file mode 100644 index 0000000..0f329e4 Binary files /dev/null and b/docs/reference/figures/README-re_patchwork-1.png differ diff --git a/docs/reference/figures/README-use1-1.png b/docs/reference/figures/README-use1-1.png new file mode 100644 index 0000000..38c4801 Binary files /dev/null and b/docs/reference/figures/README-use1-1.png differ diff --git a/docs/reference/figures/README-use1-2.png b/docs/reference/figures/README-use1-2.png new file mode 100644 index 0000000..24d34ba Binary files /dev/null and b/docs/reference/figures/README-use1-2.png differ diff --git a/docs/reference/figures/README-use1-3.png b/docs/reference/figures/README-use1-3.png new file mode 100644 index 0000000..63bd309 Binary files /dev/null and b/docs/reference/figures/README-use1-3.png differ diff --git a/docs/reference/figures/README-use2-1.png b/docs/reference/figures/README-use2-1.png new file mode 100644 index 0000000..460420b Binary files /dev/null and b/docs/reference/figures/README-use2-1.png differ diff --git a/docs/reference/figures/bob_happy.jpg b/docs/reference/figures/bob_happy.jpg new file mode 100644 index 0000000..b3082a8 Binary files /dev/null and b/docs/reference/figures/bob_happy.jpg differ diff --git a/docs/reference/figures/lh_hex.png b/docs/reference/figures/lh_hex.png new file mode 100644 index 0000000..9cfa2c9 Binary files /dev/null and b/docs/reference/figures/lh_hex.png differ diff --git a/docs/reference/figures/stan_logo.png b/docs/reference/figures/stan_logo.png new file mode 100644 index 0000000..3fa976a Binary files /dev/null and b/docs/reference/figures/stan_logo.png differ diff --git a/docs/reference/figures/visibly_hex.png b/docs/reference/figures/visibly_hex.png new file mode 100644 index 0000000..db23a56 Binary files /dev/null and b/docs/reference/figures/visibly_hex.png differ diff --git a/docs/reference/index.html b/docs/reference/index.html new file mode 100644 index 0000000..69543e9 --- /dev/null +++ b/docs/reference/index.html @@ -0,0 +1,229 @@ + + + + + + + + +Function reference • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    Dealing with color

    +

    Functions for getting and creating palettes.

    +
    +

    create_palette()

    +

    Create a color palette

    +

    palettes

    +

    Commonly used palettes

    +

    colorgorical()

    +

    Create a colorgorical palette

    +

    col2lab()

    +

    Convert color to lab

    +

    Themes

    +

    Clean themes.

    +
    +

    theme_trueMinimal() theme_plotly() theme_blank()

    +

    Clean visualization themes

    +

    Plotting model results

    +

    Functions for plotting fixed and random effect coefficients and more.

    +
    +

    plot_coefficients()

    +

    Plot coefficients

    +

    plot_coefficients(<brmsfit>)

    +

    Plot fixed or random effects coefficients for brmsfit objects.

    +

    plot_coefficients(<lm>) plot_coefficients(<glm>)

    +

    Plot coefficients for standard linear models.

    +

    plot_coefficients(<merMod>)

    +

    Plot fixed or random effects coefficients for merMod objects.

    +
    + + +
    + + +
    + + + + + + diff --git a/docs/reference/palettes.html b/docs/reference/palettes.html new file mode 100644 index 0000000..34d0c6a --- /dev/null +++ b/docs/reference/palettes.html @@ -0,0 +1,187 @@ + + + + + + + + +Commonly used palettes — palettes • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    A list of commonly used palettes with some base color and including +complementary, monochromatic, analogous, split_complementary, triadic, +tetradic. Otherwise, just ones I use e.g. colorbrewer, plotly or others of +interest.

    + +
    + +
    palettes
    + +

    Format

    + +

    (Possibly) named vectors/lists of colors

    +

    - orange : #ff5500

    +

    - stanred: #b2001d

    +

    - RdBu_11: RdBu palette from colorbrewer for sequence of 11

    +

    - Rblue: #1f65b7

    +

    - Latvian Red: #9E1B34

    +

    - Tyrian Purple: #3c6602

    +

    - Tyrian Purple2: #990024 A more web friendly version

    +

    - Plotly: plotly's default colorscale, because decent documentation is next +to impossible for those folks. +...

    + +

    Source

    + +

    For example the colortools and colorspace packages, http://paletton.com/, https://www.sessions.edu/color-calculator/, https://colorbrewer.org

    + +

    References

    + +

    https://stackoverflow.com/questions/40673490/how-to-get-plotly-js-default-colors-list

    + + +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/plot_coefficients-1.png b/docs/reference/plot_coefficients-1.png new file mode 100644 index 0000000..1d50669 Binary files /dev/null and b/docs/reference/plot_coefficients-1.png differ diff --git a/docs/reference/plot_coefficients.brmsfit.html b/docs/reference/plot_coefficients.brmsfit.html new file mode 100644 index 0000000..f54b6d3 --- /dev/null +++ b/docs/reference/plot_coefficients.brmsfit.html @@ -0,0 +1,223 @@ + + + + + + + + +Plot fixed or random effects coefficients for brmsfit objects. — plot_coefficients.brmsfit • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    Plot fixed or random effects coefficients for brmsfit objects.

    + +
    + +
    # S3 method for brmsfit
    +plot_coefficients(model, order = "decreasing",
    +  sd_multi = 2, keep_intercept = FALSE, palette = "bilbao",
    +  ref_line = 0, trans = NULL, plot = TRUE, ranef = FALSE,
    +  which_ranef = NULL, ...)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    model

    The model that is the point of this function. For example, lm, glm, gam, lme4, brms.

    order

    The order of the plots- "increasing", "decreasing", or a numeric +vector giving the order. The default is NULL, i.e. the default ordering. Not applied to random effects.

    sd_multi

    The multiplier that determines the width of the interval. Default is 2.

    keep_intercept

    Default is FALSE. Intercepts are typically on a very +different scale than covariate effects.

    palette

    A scico palette. Default is 'bilbao'.

    ref_line

    A reference line. Default is zero.

    trans

    A transformation function to be applied to the coefficients +(e.g. exponentiation).

    plot

    Default is TRUE, but sometimes you just want the data.

    ranef

    If applicable, whether to plot random effects instead of fixed effects.

    which_ranef

    If plotting random effects, which one to plot.

    ...

    Other arguments applied for specific methods.

    + +

    Value

    + +

    A ggplot of the coefficients and their interval estimates. Or the + data that would be used to create the plot.

    + + +

    Examples

    +
    # placeholder + +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/plot_coefficients.html b/docs/reference/plot_coefficients.html new file mode 100644 index 0000000..108860b --- /dev/null +++ b/docs/reference/plot_coefficients.html @@ -0,0 +1,221 @@ + + + + + + + + +Plot coefficients — plot_coefficients • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    A basic plot of coefficients with their uncertainty interval.

    + +
    + +
    plot_coefficients(model, order = "decreasing", sd_multi = 2,
    +  keep_intercept = FALSE, palette = "bilbao", ref_line = 0,
    +  trans = NULL, plot = TRUE, ranef = FALSE, which_ranef = NULL, ...)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    model

    The model that is the point of this function. For example, lm, glm, gam, lme4, brms.

    order

    The order of the plots- "increasing", "decreasing", or a numeric +vector giving the order. The default is NULL, i.e. the default ordering. Not applied to random effects.

    sd_multi

    The multiplier that determines the width of the interval. Default is 2.

    keep_intercept

    Default is FALSE. Intercepts are typically on a very +different scale than covariate effects.

    palette

    A scico palette. Default is 'bilbao'.

    ref_line

    A reference line. Default is zero.

    trans

    A transformation function to be applied to the coefficients +(e.g. exponentiation).

    plot

    Default is TRUE, but sometimes you just want the data.

    ranef

    If applicable, whether to plot random effects instead of fixed effects.

    which_ranef

    If plotting random effects, which one to plot.

    ...

    Other arguments applied for specific methods.

    + +

    Value

    + +

    A ggplot of the coefficients and their interval estimates. Or the + data that would be used to create the plot.

    + + +

    Examples

    +
    mod = lm(mpg ~ ., mtcars) +plot_coefficients(mod, order = 'increasing')
    +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/plot_coefficients.lm-1.png b/docs/reference/plot_coefficients.lm-1.png new file mode 100644 index 0000000..1d50669 Binary files /dev/null and b/docs/reference/plot_coefficients.lm-1.png differ diff --git a/docs/reference/plot_coefficients.lm.html b/docs/reference/plot_coefficients.lm.html new file mode 100644 index 0000000..614c5dd --- /dev/null +++ b/docs/reference/plot_coefficients.lm.html @@ -0,0 +1,227 @@ + + + + + + + + +Plot coefficients for standard linear models. — plot_coefficients.lm • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    A basic plot of coefficients with their uncertainty interval for + lm and glm objects.

    + +
    + +
    # S3 method for lm
    +plot_coefficients(model, order = "decreasing", sd_multi = 2,
    +  keep_intercept = FALSE, palette = "bilbao", ref_line = 0,
    +  trans = NULL, plot = TRUE, ...)
    +
    +# S3 method for glm
    +plot_coefficients(model, order = "decreasing", sd_multi = 2,
    +  keep_intercept = FALSE, palette = "bilbao", ref_line = 0,
    +  trans = NULL, plot = TRUE, ...)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    model

    The lm or glm model

    order

    The order of the plots- "increasing", "decreasing", or a numeric +vector giving the order. The default is NULL, i.e. the default ordering. Not applied to random effects.

    sd_multi

    The multiplier that determines the width of the interval. Default is 2.

    keep_intercept

    Default is FALSE. Intercepts are typically on a very +different scale than covariate effects.

    palette

    A scico palette. Default is 'bilbao'.

    ref_line

    A reference line. Default is zero.

    trans

    A transformation function to be applied to the coefficients +(e.g. exponentiation).

    plot

    Default is TRUE, but sometimes you just want the data.

    ...

    Other arguments applied for specific methods.

    + +

    Value

    + +

    A ggplot of the coefficients and their interval estimates. Or the + data that would be used to create the plot.

    + +

    Details

    + +

    This is more or less a function that serves as the basis for other models I actually use.

    + + +

    Examples

    +
    mod = lm(mpg ~ ., mtcars) +plot_coefficients(mod, order = 'increasing')
    +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/plot_coefficients.merMod-1.png b/docs/reference/plot_coefficients.merMod-1.png new file mode 100644 index 0000000..3634e3f Binary files /dev/null and b/docs/reference/plot_coefficients.merMod-1.png differ diff --git a/docs/reference/plot_coefficients.merMod-2.png b/docs/reference/plot_coefficients.merMod-2.png new file mode 100644 index 0000000..47a5f70 Binary files /dev/null and b/docs/reference/plot_coefficients.merMod-2.png differ diff --git a/docs/reference/plot_coefficients.merMod.html b/docs/reference/plot_coefficients.merMod.html new file mode 100644 index 0000000..585b60c --- /dev/null +++ b/docs/reference/plot_coefficients.merMod.html @@ -0,0 +1,237 @@ + + + + + + + + +Plot fixed or random effects coefficients for merMod objects. — plot_coefficients.merMod • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    Plot fixed or random effects coefficients for merMod objects.

    + +
    + +
    # S3 method for merMod
    +plot_coefficients(model, order = "decreasing",
    +  sd_multi = 2, keep_intercept = FALSE, palette = "bilbao",
    +  ref_line = 0, trans = NULL, plot = TRUE, ranef = FALSE,
    +  which_ranef = NULL, ...)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    model

    The model that is the point of this function. For example, lm, glm, gam, lme4, brms.

    order

    The order of the plots- "increasing", "decreasing", or a numeric +vector giving the order. The default is NULL, i.e. the default ordering. Not applied to random effects.

    sd_multi

    The multiplier that determines the width of the interval. Default is 2.

    keep_intercept

    Default is FALSE. Intercepts are typically on a very +different scale than covariate effects.

    palette

    A scico palette. Default is 'bilbao'.

    ref_line

    A reference line. Default is zero.

    trans

    A transformation function to be applied to the coefficients +(e.g. exponentiation).

    plot

    Default is TRUE, but sometimes you just want the data.

    ranef

    If applicable, whether to plot random effects instead of fixed effects.

    which_ranef

    If plotting random effects, which one to plot.

    ...

    Other arguments applied for specific methods.

    + +

    Value

    + +

    A ggplot of the coefficients and their interval estimates. Or the + data that would be used to create the plot.

    + +

    Details

    + +

    This plots the fixed or random effects of lme4 objects. For more + information on the fixed effects, see plot_coefficients.It + requires the lme4 package. The plot for random effects is + basically the dotplot demonstrated at ?lme4::ranef, but instead uses + ggplot2 so you would have a little easier time working with + it to do with as you wish (for multiple random effects, a list of ggplot + objects can be returned). Many of the options for fixed effects are + removed, as they either don't make much sense or for practical reasons.

    + + +

    Examples

    +
    library(lme4) +fit_mer = lmer(Reaction ~ Days + (Days|Subject), sleepstudy) +plot_coefficients(fit_mer, ranef = TRUE, which_ranef = 'Subject')
    #> $`(Intercept)`
    #> +#> $Days
    #>
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/plot_coefs.html b/docs/reference/plot_coefs.html new file mode 100644 index 0000000..9e8abec --- /dev/null +++ b/docs/reference/plot_coefs.html @@ -0,0 +1,185 @@ + + + + + + + + +Plot coefficients with uncertainty — plot_coefs • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    This isn't really meant to be directly called, but is instead + internally used by the plot_coefficients function.

    + +
    + +
    plot_coefs(model_input, palette, ref_line, trans)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + +
    model_input

    Processed model effects

    palette

    A scico palette. Default is 'bilbao'.

    ref_line

    A reference line. Default is zero.

    trans

    A transformation function to be applied to the coefficients +(e.g. exponentiation).

    + +

    Value

    + +

    A ggplot of the coefficients with their corresponding uncertainty + bars.

    + + +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/plot_fixefs.html b/docs/reference/plot_fixefs.html new file mode 100644 index 0000000..c9296c3 --- /dev/null +++ b/docs/reference/plot_fixefs.html @@ -0,0 +1,227 @@ + + + + + + + + +Plot coefficients with uncertainty — plot_fixefs • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    This isn't really meant to be directly called, but is instead + internally used by the plot_coefficients function.

    + +
    + +
    plot_fixefs(model, order = "decreasing", sd_multi = 2,
    +  keep_intercept = FALSE, palette = "bilbao", ref_line = 0,
    +  trans = NULL, plot = TRUE, ...)
    +
    +# S3 method for brmsfit
    +plot_fixefs(model, order, sd_multi, keep_intercept, palette,
    +  ref_line, trans, plot, ...)
    +
    +# S3 method for merMod
    +plot_fixefs(model, order, sd_multi, keep_intercept, palette,
    +  ref_line, trans, plot, ...)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    model

    The model that is the point of this function. For example, lm, glm, gam, lme4, brms.

    order

    The order of the plots- "increasing", "decreasing", or a numeric +vector giving the order. The default is NULL, i.e. the default ordering. Not applied to random effects.

    sd_multi

    The multiplier that determines the width of the interval. Default is 2.

    keep_intercept

    Default is FALSE. Intercepts are typically on a very +different scale than covariate effects.

    palette

    A scico palette. Default is 'bilbao'.

    ref_line

    A reference line. Default is zero.

    trans

    A transformation function to be applied to the coefficients +(e.g. exponentiation).

    plot

    Default is TRUE, but sometimes you just want the data.

    ...

    Other arguments applied for specific methods.

    + +

    Value

    + +

    a ggplot2 object or the effect estimates

    + +

    See also

    + +

    plot_coefficients

    + + +

    Examples

    +
    #placeholder +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/plot_ranefs.html b/docs/reference/plot_ranefs.html new file mode 100644 index 0000000..0c01829 --- /dev/null +++ b/docs/reference/plot_ranefs.html @@ -0,0 +1,224 @@ + + + + + + + + +Plot coefficients with uncertainty — plot_ranefs • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    This isn't really meant to be directly called, but is instead + internally used by the plot_coefficients function.

    + +
    + +
    plot_ranefs(model, sd_multi = 2, ref_line = 0, trans = NULL,
    +  plot = TRUE, which_ranef = NULL, ...)
    +
    +# S3 method for brmsfit
    +plot_ranefs(model, sd_multi, ref_line, trans, plot,
    +  which_ranef, ...)
    +
    +# S3 method for merMod
    +plot_ranefs(model, sd_multi, ref_line, trans, plot,
    +  which_ranef, ...)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    model

    The brmsfit or lme4 model

    sd_multi

    The sd multiplier

    ref_line

    The reference line

    trans

    A transformation to be applied to the coefficient. Currently unused.

    plot

    Whether to plot or just provide the data.

    which_ranef

    Which random effect to plot

    ...

    Other options passed to specific methods. Currently unused.

    + +

    Value

    + +

    a ggplot2 object or the effect estimates

    + +

    Methods (by class)

    + +
      +
    • brmsfit:

    • +
    • merMod:

    • +
    + +

    See also

    + +

    plot_coefficients

    + + +

    Examples

    +
    #placeholder +
    +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/reexports.html b/docs/reference/reexports.html new file mode 100644 index 0000000..8f2c417 --- /dev/null +++ b/docs/reference/reexports.html @@ -0,0 +1,168 @@ + + + + + + + + +Objects exported from other packages — reexports • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    These objects are imported from other packages. Follow the links +below to see their documentation.

    +
    +
    dplyr

    vars

    + +
    ggplot2

    aes

    + +
    purrr

    map

    +
    + +
    + + + +
    + +
    + + +
    + + + + + + diff --git a/docs/reference/theme_trueMinimal-1.png b/docs/reference/theme_trueMinimal-1.png new file mode 100644 index 0000000..443e13c Binary files /dev/null and b/docs/reference/theme_trueMinimal-1.png differ diff --git a/docs/reference/theme_trueMinimal.html b/docs/reference/theme_trueMinimal.html new file mode 100644 index 0000000..fdfd3fe --- /dev/null +++ b/docs/reference/theme_trueMinimal.html @@ -0,0 +1,220 @@ + + + + + + + + +Clean visualization themes — theme_trueMinimal • visibly! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    + +
    +
    + + +
    + +

    Clean up plots from their defaults.

    + +
    + +
    theme_trueMinimal()
    +
    +theme_plotly(vis, MB = FALSE)
    +
    +theme_blank(vis, MB = FALSE)
    + +

    Arguments

    + + + + + + + + + + +
    vis

    A visualization created by ggplot2 or +plotly.

    MB

    For plotly, an option to display the mode bar. Defaults to FALSE.

    + +

    Details

    + +

    From a gray background, to unnecessary gridlines, to by-default + reference lines, some of the more popular visualization packages come out + 75 + remove unnecessary gridlines, 'de-bold' the blacks, etc.

    +

    - **ggplot2**: theme_trueMinimal This function takes a ggplot object + and removes the gray background, gridlines and adds opacity to the default + black axes and labels, allowing the pattern of the visual to be expressed + in unimpeded fashion.

    +

    - **plotly**: theme_plotly, theme_blank removes reference + lines at zero, and some of its 'modebar' is unnecessary. Otherwise little + is changed at this point, except for theme_blank, which is like theme_void + for ggplot.

    + +

    Note

    + +

    You may continue to override any aspect of these themes. For example with +ggplot2, you would just add a theme afterward just like you would any other +plot.

    + + +

    Examples

    +
    library(visibly) +library(ggplot2) + +data(mtcars) + +ggplot(aes(wt, mpg), data=mtcars) + + geom_point() + + labs(title='Plot') + + theme_trueMinimal()
    +library(plotly) +mtcars %>% + plot_ly(x=~wt, y=~mpg, mode='markers') %>% + theme_plotly()
    #> No trace type specified: +#> Based on info supplied, a 'scatter' trace seems appropriate. +#> Read more about this trace type -> https://plot.ly/r/reference/#scatter
    +mtcars %>% + plot_ly(x=~wt, y=~mpg, mode='markers') %>% + theme_blank()
    #> No trace type specified: +#> Based on info supplied, a 'scatter' trace seems appropriate. +#> Read more about this trace type -> https://plot.ly/r/reference/#scatter
    +
    + +
    + + +
    + + + + + + diff --git a/man/figures/README-fe0-1.png b/man/figures/README-fe0-1.png index 4e93e3d..217c80f 100644 Binary files a/man/figures/README-fe0-1.png and b/man/figures/README-fe0-1.png differ diff --git a/man/figures/README-fe0-1.svg b/man/figures/README-fe0-1.svg deleted file mode 100644 index 88353f4..0000000 --- a/man/figures/README-fe0-1.svg +++ /dev/null @@ -1,40076 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -am -qsec -drat -gear -vs -disp -hp -cyl -carb -wt - - - - - - - - - - - - - - --8 --4 -0 -4 -Coefficient - diff --git a/man/figures/README-lm0-1.svg b/man/figures/README-lm0-1.svg index 54b3c17..fccfe73 100644 Binary files a/man/figures/README-lm0-1.svg and b/man/figures/README-lm0-1.svg differ diff --git a/man/figures/README-plot-1.svg b/man/figures/README-plot-1.svg index 08ee4d6..ee91762 100644 Binary files a/man/figures/README-plot-1.svg and b/man/figures/README-plot-1.svg differ diff --git a/man/figures/README-plot2-1.svg b/man/figures/README-plot2-1.svg index 08ee4d6..ee91762 100644 Binary files a/man/figures/README-plot2-1.svg and b/man/figures/README-plot2-1.svg differ diff --git a/man/figures/README-plot2-2.svg b/man/figures/README-plot2-2.svg index bcae43f..44b201d 100644 Binary files a/man/figures/README-plot2-2.svg and b/man/figures/README-plot2-2.svg differ diff --git a/man/figures/Rlogo.svg b/man/figures/Rlogo.svg deleted file mode 100644 index 097e83e..0000000 --- a/man/figures/Rlogo.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pkgdown/extra.css b/pkgdown/extra.css new file mode 100644 index 0000000..45a2d9a --- /dev/null +++ b/pkgdown/extra.css @@ -0,0 +1,537 @@ +@import url("https://fonts.googleapis.com/css?family=Roboto|Roboto:300|Roboto+Mono|Roboto+Condensed|Open+Sans|Stalemate"); +@import url("pygment_highlights.css"); + + +/* latin-ext */ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans'), local('OpenSans'), url(https://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin-ext */ +@font-face { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Cond Light'), local('OpenSans-CondensedLight'), url(https://fonts.gstatic.com/s/opensanscondensed/v10/gk5FxslNkTTHtojXrkp-xC8hAQ4ocbp44gFQt8tMfcH3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} +/* latin */ +@font-face { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Cond Light'), local('OpenSans-CondensedLight'), url(https://fonts.gstatic.com/s/opensanscondensed/v10/gk5FxslNkTTHtojXrkp-xBEur64QvLD-0IbiAdTUNXE.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} +/* latin-ext */ +@font-face { + font-family: 'Libre Baskerville'; + font-style: normal; + font-weight: 400; + src: local('Libre Baskerville'), + local('LibreBaskerville-Regular'), + url(https://fonts.gstatic.com/s/librebaskerville/v4/pR0sBQVcY0JZc_ciXjFsKwHlCYWexZJCPRz1QQ0uKVU.woff2) format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + + +/* latin-ext */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto'), local('Roboto-Regular'), url('https://fonts.googleapis.com/css?family=Roboto') format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 300; + src: local('Roboto'), local('Roboto-Regular'), url('https://fonts.googleapis.com/css?family=Roboto:300') format('woff2'); + unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-family: 'Questrial'; + font-style: normal; + font-weight: 400; + src: local('Questrial'), local('Questrial-Regular'), url('https://fonts.googleapis.com/css?family=Questrial') format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + + + +/* Sticky footer */ + +/** + * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ + * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css + * + * .Site -> body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + + + +body { + font-family: Roboto, 'Libre Baskerville', sans-serif; + font-size: 15px; + font-weight: 300; + line-height: 1.5; + color: #404040; /* #404040*/ + position: relative; + background: #FFFFF8; +} + + +p { + font-family: Roboto, 'Helvetica Neue', 'Libre Baskerville', sans-serif; + font-size: 15px; + line-height: 1.5; + font-weight: 300; + color: #404040; + margin: 30px 0; +} + +/* link effects */ +p a { + color: #03b3ff; + background-image: linear-gradient(180deg,transparent 90%, #FF4F03 0); + background-size: 0 100%; + background-repeat: no-repeat; + text-decoration: none; + -webkit-transition: background-size .4s ease; + -moz-transition: background-size .4s ease; + -ms-transition: background-size .4s ease; + -o-transition: background-size .4s ease; + transition: background-size .4s ease; + border-bottom: 0px solid; +} + +p a:hover { + text-decoration: none; + background-size: 100% 100%; + cursor: pointer; +} + +p a:hover, +p a:focus { + color: #03b3ff; /*keep para links with no change*/ +} + + +h1 { + font-family: 'Open Sans Condensed'; + font-weight: 200; + font-size: 175%; + color: #ff5500; + margin-top: 4rem; + margin-bottom: 1.5rem; + line-height: 1; +} + +h2 { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 400; + font-size: 150%; + color: #ff5500; + margin-top: 2.1rem; + margin-bottom: 1.2rem; + line-height: 1; +} + +h3 { + font-family: 'Open Sans Condensed'; + font-style: normal; + font-weight: 400; + font-size: 125%; + color: #ff5500; + opacity: .9; + margin-top: 2rem; + margin-bottom: 1.2rem; + line-height: 1; +} + +h4 { + font-family: 'Open Sans Condensed'; + font-variant: normal; + font-weight: 400; + font-size: 110%; + color: #ff5500; + opacity: .9; + margin-top: 1.9rem; + margin-bottom: 1.2rem; + line-height: 1; +} + + + +blockquote { + color: #808080; + font-style: italic; +} + +hr.small { + max-width: 100px; + margin: 15px auto; + border-width: 4px; + border-color: inherit; + border-radius: 3px; +} + +li::before { + /*content: "• "; Currently can't separate li::before from other 'before', nor can get to the style for this button specifically. This works but adds another button, and for a lot of nonlist objects as well + color: #ff5500; /* color of list button https://stackoverflow.com/questions/5306640/how-to-set-bullet-colors-in-ul-li-html-lists-via-css-without-using-any-images-or*/ +} + + +pre, code { + font-family: 'Roboto Mono', Monaco, Menlo, Consolas, monospace; + +} + + + + +/* --- Sidebar --- */ + +#sidebar { + /*margin-top: 30px;*/ + padding-top: 1%; +} + +/* --- Navbar --- */ + +.navbar { + background: #d9edf7; /*#f2f2c7 #F5F5F5*/ + border-bottom: 1px solid #EAEAEA; + font-family: 'Helvetica Neue', Helvetica, 'Open Sans', Arial, sans-serif; + /* width: 70%; + padding-left: 15%; */ /*maybe change later*/ +} + +.navbar-link { + color: #ff5500; +} + + +.navbar-inverse .navbar-link:hover { + color: #fff; +} + +.navbar .nav li a { + text-transform: uppercase; + font-size: 12px; + letter-spacing: 1px; +} + + + +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:focus, +.navbar-inverse .navbar-nav > .active > a:hover { + color: #404040; + background-color: inherit; +} + +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:focus, +.navbar-inverse .navbar-nav > .open > a:hover { + color: #404040; + background-color: inherit; +} + +.navbar .navbar-nav > .active > a, +.navbar .navbar-nav > .active > a:focus, +.navbar .navbar-nav > .active > a:hover { + color: #404040; + background-color: inherit; +} + +.navbar .navbar-nav > .open > a, +.navbar .navbar-nav > .open > a:focus, +.navbar .navbar-nav > .open > a:hover { + color: #404040; + background-color: inherit; +} + +/* navbar-brand is the package name/home link */ +.navbar .navbar-brand, +.navbar .nav li a { + font-weight: 500; + color: #404040; +} + +.navbar-brand .navbar-link { + color: #ff5500; + background-image: linear-gradient(180deg,transparent 90%, #FF4F03 0); + background-size: 0 100%; + background-repeat: no-repeat; + text-decoration: none; + -webkit-transition: background-size .4s ease; + -moz-transition: background-size .4s ease; + -ms-transition: background-size .4s ease; + -o-transition: background-size .4s ease; + transition: background-size .4s ease; + border-bottom: 0px solid; +} + +.navbar-brand .navbar-link:hover { + text-decoration: none; + background-size: 100% 100%; + cursor: pointer; +} + +.navbar-brand .navbar-link:hover, +.navbar-brand .navbar-link:focus { + color: #03b3ff; /*keep para links with no change*/ +} + + + +.navbar:hover, +.navbar:focus , +.navbar .nav li a:hover, +.navbar .nav li a:focus { + color: #0085a1; +} + +@media only screen and (min-width: 768px) { + .navbar { + padding: 20px 0; + -webkit-transition: background .5s ease-in-out,padding .5s ease-in-out; + -moz-transition: background .5s ease-in-out,padding .5s ease-in-out; + transition: background .5s ease-in-out,padding .5s ease-in-out; + } + + .navbar.top-nav-short { + padding: 0; + } +} + +.navbar .avatar-container { + opacity: 1; + position: absolute; + -webkit-transition: opacity 0.5s ease-in-out; + -moz-transition: opacity 0.5s ease-in-out; + transition: opacity 0.5s ease-in-out; + left: 50%; + width: 50px; + margin-top: -25px; +} +.navbar .avatar-container .avatar-img-border { + width: 100%; + border-radius: 50%; + margin-left: -50%; + display: inline-block; + box-shadow: 0 0 8px rgba(0, 0, 0, .8); + -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .8); + -moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8); +} +.navbar .avatar-container .avatar-img { + width: 100%; + border-radius: 50%; + display: block; +} + +.navbar.top-nav-short .avatar-container{ + opacity: 0; +} + +.navbar.top-nav-expanded .avatar-container { + display: none; +} + +@media only screen and (min-width: 768px) { + .navbar .avatar-container { + width: 100px; + margin-top: -50px; + } + + .navbar .avatar-container .avatar-img-border { + width: 100%; + box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + -webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + -moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8); + } + + .navbar .avatar-container .avatar-img { + width: 100%; + } +} + +/* Multi-level navigation links */ +.navbar .nav .navlinks-container { + position: relative; +} +.navbar .nav .navlinks-parent:after { + content: " \25BC"; +} +.navbar .nav .navlinks-children { + width: 100%; + display: none; + word-break: break-word; +} +.navbar .nav .navlinks-container .navlinks-children a { + display: block; + padding: 10px; + padding-left: 30px; + background: #f5f5f5; + text-decoration: none !important; + border-width: 0 1px 1px 1px; + font-weight: normal; +} +@media only screen and (max-width: 767px) { + .navbar .nav .navlinks-container.show-children { + background: #eee; + } + .navbar .nav .navlinks-container.show-children .navlinks-children { + display: block; + } +} +@media only screen and (min-width: 768px) { + .navbar .nav .navlinks-container:hover { + background: #eee; + } + .navbar .nav .navlinks-container:hover .navlinks-children { + display: block; + } + .navbar .nav .navlinks-children { + position: absolute; + text-align: center; + } + .navbar .nav .navlinks-container .navlinks-children a { + padding-left: 10px; + border: 1px solid #eaeaea; + border-width: 0 1px 1px; + } +} + +.nav-pills > li.active > a, +.nav-pills > li.active > a:focus, +.nav-pills > li.active > a:hover{ + width: 80%; + color: #404040; + font-size: 100%; + background-color: #d9edf7; +} + +.nav-pills > li > a { + border-radius: 4px; + font-size: 100%; + width: 80%; +} + + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:focus, +.dropdown-menu > .active > a:hover { + background-color: transparent; +} + + + + +/* --- Footer --- */ + +footer { + padding: 5px; + background: #FFFFF8; + border-top: 1px #EAEAEA solid; + margin-top: 25px; + font-size: 14px; + width: 100%; +} + +footer a { + color: #404040; +} + +footer .list-inline { + margin: 0; + padding: 0; +} + +footer .copyright { + font-family: Open Sans; + text-align: center; + /* margin-bottom: 0; */ +} +footer .pkgdown { + font-family: Open Sans; + text-align: center; + /* margin-bottom: 0; */ +} +footer .theme-by { + text-align: center; + margin: 10px 0 0; +} + +@media only screen and (min-width: 768px) { + footer { + padding: 10px 0; + } + footer .footer-links { + font-size: 12px; + } + footer .copyright { + font-size: 12px; + } +} + + +/* Misc */ + +.emph { + color: #E32D00 ; /*#ff5500 #D14300*/ + font-weight: 500; +} + +/* pack func and objclass colors initially come from hcl(seq(90,360, length.out=4), c=80, l=80); redone for contrast*/ +.pack { + color: #990071; /*#AC9CFF #e41a1c*/ + font-weight: 500; +} + +.func { + color: #007020; /*#00CBB6; #984ea3; can just use `` instead*/ + font-weight: 600; +} + +.objclass { + color: #947100; /*#AAB400 #4daf4a; #FFC5D0*/ + font-weight: 500; +} + +/* until they get syntax highlighting */ +/* function */ +.kw { + color: #007020; +} + +/* logical NA */ +.ot { + color: #337ab7; +} + +/* char/string */ +.ch, .st { + color: #aa5500; +} + +/* float, other */ +.fl, .dv { + color: #23527c; +} diff --git a/pkgdown/pygment_highlights.css b/pkgdown/pygment_highlights.css new file mode 100644 index 0000000..1c8b8ef --- /dev/null +++ b/pkgdown/pygment_highlights.css @@ -0,0 +1,66 @@ +.highlight { background: #ffffff; } +.highlight pre { background-color: #fff; font-size: 16px } +.highlight .c { color: #999988; font-style: italic } /* Comment */ +.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +.highlight .k { font-weight: bold } /* Keyword */ +.highlight .o { font-weight: bold } /* Operator */ +.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ +.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ +.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #aa0000 } /* Generic.Error */ +.highlight .gh { color: #999999 } /* Generic.Heading */ +.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ +.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #555555 } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ +.highlight .gt { color: #aa0000 } /* Generic.Traceback */ +.highlight .kc { font-weight: bold } /* Keyword.Constant */ +.highlight .kd { font-weight: bold } /* Keyword.Declaration */ +.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #009999 } /* Literal.Number */ +.highlight .s { color: #d14 } /* Literal.String */ +.highlight .na { color: #008080 } /* Name.Attribute */ +.highlight .nb { color: #0086B3 } /* Name.Builtin */ +.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ +.highlight .no { color: #008080 } /* Name.Constant */ +.highlight .ni { color: #800080 } /* Name.Entity */ +.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ +.highlight .nn { color: #555555 } /* Name.Namespace */ +.highlight .nt { color: #000080 } /* Name.Tag */ +.highlight .nv { color: #008080 } /* Name.Variable */ +.highlight .ow { font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #009999 } /* Literal.Number.Float */ +.highlight .mh { color: #009999 } /* Literal.Number.Hex */ +.highlight .mi { color: #009999 } /* Literal.Number.Integer */ +.highlight .mo { color: #009999 } /* Literal.Number.Oct */ +.highlight .sb { color: #d14 } /* Literal.String.Backtick */ +.highlight .sc { color: #d14 } /* Literal.String.Char */ +.highlight .sd { color: #d14 } /* Literal.String.Doc */ +.highlight .s2 { color: #d14 } /* Literal.String.Double */ +.highlight .se { color: #d14 } /* Literal.String.Escape */ +.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ +.highlight .si { color: #d14 } /* Literal.String.Interpol */ +.highlight .sx { color: #d14 } /* Literal.String.Other */ +.highlight .sr { color: #009926 } /* Literal.String.Regex */ +.highlight .s1 { color: #d14 } /* Literal.String.Single */ +.highlight .ss { color: #990073 } /* Literal.String.Symbol */ +.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #008080 } /* Name.Variable.Class */ +.highlight .vg { color: #008080 } /* Name.Variable.Global */ +.highlight .vi { color: #008080 } /* Name.Variable.Instance */ +.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ + +/* Make line numbers unselectable: excludes line numbers from copy-paste user ops */ +.highlight .lineno {color:rgba(0,0,0,0.3);padding: 0 10px;-webkit-user-select: none;-moz-user-select: none; -o-user-select: none;} +.lineno::-moz-selection {background-color: transparent;} /* Mozilla specific */ +.lineno::selection {background-color: transparent;} /* Other major browsers */ diff --git a/vignettes/intro.Rmd b/vignettes/intro.Rmd index cebc5d2..f15a48b 100644 --- a/vignettes/intro.Rmd +++ b/vignettes/intro.Rmd @@ -1,54 +1,199 @@ --- title: "An Introduction to Visibly" author: "Michael Clark" -date: "`r Sys.Date()`" -output: rmarkdown::html_vignette +date: `r Sys.Date()` +output: + html_vignette: + toc: true + toc_depth: 3 + df_print: kable vignette: > %\VignetteIndexEntry{Vignette Title} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- -```{r setup, include = FALSE} -knitr::opts_chunk$set( - collapse = TRUE, - comment = NA -) +```{r setup, include=FALSE, cache=FALSE} +knitr::opts_chunk$set(echo = T, message=F, warning=F, error=F, collapse = TRUE, + comment=NA, R.options=list(width=220), # code + dev.args=list(bg = 'transparent'), dev='png', # viz + fig.align='center', out.width='75%', fig.asp=.75, + cache.rebuild=F, cache=F) # cache ``` -## Examples -Create a palette. +## Palettes & Themes -```{r example} +One can get started by creating a palette. This uses the colortools package to provide evenly spaced colors. + +```{r example, echo=-(1:3)} +# bc r cmd build randomly decided margins were too large when they were okay +# before +par(mar=c(.5,.5,.5,.5)) library(visibly) -create_palette('papayawhip') +create_palette('papayawhip', plot = TRUE) ``` -A palette based on the blue in the R logo. +Here is a palette based on the blue in the R logo. ```{r example2} palettes$Rblue ``` -A clean theme ready for the web and allowing the pattern to be the focus rather than arbitrary precision the data doesn't support anyway. +The palette creator can create some decent categorical distinctions without too much fuss. The following also demonstrates one of the themes, which has no grid/gray, and de-bolds the black font while leaving text clear; even the fainter version will pass web standards for contrast against a white background. As shown, you can still fiddle with the theme beyond that. -```{r example3} +```{r use1} +pal = create_palette('#ff5500', + name = 'orange_you_glad_you_have_this_color') library(ggplot2) -ggplot(aes(x=wt, y=mpg, color=cyl), data=mtcars) + - geom_point() + + +ggplot(mtcars, aes(x=wt, y=mpg)) + + geom_point(aes(color=factor(cyl)), size=10, alpha=.5) + + scale_color_manual(values = pal$triadic) + theme_trueMinimal() ``` -For plotly too. - -```{r example4} -library(plotly) +```{r use2} +library(dplyr) mtcars %>% - plot_ly(x=~wt, y=~mpg, color=~cyl) %>% - add_markers() %>% - theme_plotly() + mutate(cyl = factor(cyl)) %>% + tidyext::num_by(wt, cyl) %>% + ggplot(aes(x=cyl, y=Mean)) + + geom_col(aes(fill=cyl), width=.5, alpha=.85) + + scale_fill_manual(values = palettes$Rblue$triadic) + + theme_trueMinimal() + + theme(legend.key.size = unit(.015, 'npc'), + axis.title.y = element_text(size=20, hjust=-.05)) +``` + + +Another way to create palettes is with a function that works with [colorgorical](http://vrl.cs.brown.edu/color). It connects to that website to create colors based on things like whether they perceptually go together aesthetically, whether they are more or less perceptually distinct, or even if their name is unique. + +```{r colorgorical, eval=2:4, echo=1} +colorgorical(n=6, pairPreference = 1, startPalette = list(c(10, -60, 45)), output = 'hex') +x = c("#002B00", "#95C857", "#334D37", "#4EF185", "#378811", "#7FE7D3") +print(x) +qplot(x=x, y=1:6, color=I(x), size=I(10)) +``` + +```{r colorgorical2, eval=2:4, echo=1} +colorgorical(n=10, perceptualDifference = .5, startPalette = list(c(10, -60, 45)), output = 'hex') +x = c("#002B00", "#D57381", "#77CE3F", "#DB0EAC", "#2FF52B", + "#6C208E", "#B1BF81", "#4115F9", "#518512", "#B662CA") +print(x) +qplot(x=x, y=1:10, color=I(x), size=I(10)) +``` + +To get a starting palette from an R or hexadecimal value, try col2lab. + +```{r col2lab} +col2lab('dodgerblue') +``` + + + +However, if you want palettes that are colorblind-safe, print-safe etc., especially for continuous scales, you should use packages like [viridis](https://github.com/sjmgarnier/viridis) and [scico](https://github.com/thomasp85/scico). + + + +## Plotting model results + +I have some visualizations for plotting uncertainty intervals for fixed and random effects of mixed models. These require the scico package, as well as lme4 and brms which are used to do the mixed models in the first place. + +### lm and glm + +I don't really use them aside for demonstration, but in this case the lm and glm objects served as a baseline. + +```{r lm0} +fit_lm = lm(mpg ~ ., mtcars) +plot_coefficients(fit_lm) +``` + +Change the palette, order and more. + +```{r lm1} +fit_lm = lm(mpg ~ ., mtcars) +plot_coefficients(fit_lm, + palette='oslo', + order = 'decreasing', + sd_multi = 1, + keep_intercept = TRUE, + ref_line = c(-1:1)) +``` + +#### Data only + +You may want to do your own visualization, or go beyond the default settings. Rather than providing a couple dozen arguments for you to tweak, just so you can still feel like you can't get it just quite right. Here's the data, do with it what you will! + +```{r data} +plot_coefficients(fit_lm, plot=FALSE) ``` + + +### Mixed models + +I do a lot of mixed models, which is my main reason for providing this functionality, so I've started to create some ways to plot the results of the separate fixed and random effects. We'll use lme4. + +```{r fe1} +library(lme4) +fit_mer = lmer(Reaction ~ Days + (Days|Subject), sleepstudy) +plot_coefficients(fit_mer) +``` + +And now the random effects. Fewer options can be found here, but this is intentional as you'd want them ordered and the fixed effect style would make things messy whenever there are many random effects, which is often the case. With multiple random effects, a list of ggplot objects is returned. + +```{r re1} +plot_coefficients(fit_mer, ranef = TRUE, which_ranef = 'Subject') +``` + +Now for a different palette. Again, these only apply to fixed effects visualizations, due to the number of categories typically seen with random effects and how the visualization is created. + +```{r fe2} +fit_mer2 = lmer(count ~ log_Age_c + log_Base4_c * Trt + + (1 | patient), + data = brms::epilepsy) +plot_coefficients(fit_mer2, + palette = 'lajolla') +``` + +You can use patchwork to put them into one graph. + +```{r re_patchwork} +plots = plot_coefficients(fit_mer, ranef = TRUE, which_ranef = 'Subject') + +library(patchwork) + +plots[[1]] + plots[[2]] +``` + + + + +#### brms + +I like brms quite a bit and use it a lot. It served as the motivation for these coefficient plots, as did bayesplot, and tidyposterior. + +```{r fe_brms1, eval=FALSE} +library(brms) +fit_brms = brm(count ~ log_Age_c + log_Base4_c * Trt + + (1 | patient) + (1 | obs), + data = epilepsy, + family = poisson) +plot_coefficients(fit_brms) +``` + +```{r fe_brms1_vis, echo=FALSE} +load('../tests/testthat/brms_res.RData') +plot_coefficients(fit1) +``` + +And now the random effects. + +```{r re_brms1} +plot_coefficients(fit1, ranef = TRUE, which_ranef = 'patient') + + theme(axis.text.x = element_text(angle = -90)) +``` +