[Stacomir-commits] r448 - pkg/stacomir

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 30 15:11:13 CEST 2017


Author: briand
Date: 2017-08-30 15:11:13 +0200 (Wed, 30 Aug 2017)
New Revision: 448

Modified:
   pkg/stacomir/README.Rmd
   pkg/stacomir/README.md
Log:
changes to Rmd file

Modified: pkg/stacomir/README.Rmd
===================================================================
--- pkg/stacomir/README.Rmd	2017-08-30 12:24:27 UTC (rev 447)
+++ pkg/stacomir/README.Rmd	2017-08-30 13:11:13 UTC (rev 448)
@@ -1,10 +1,13 @@
 ---
+title: StacomiR
+author: Marion Legrand, Cédric Briand
 output: github_document
+toc: true
 ---  
 
 [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/stacomiR)](https://cran.r-project.org/package=stacomiR)
 
-```{r, echo = FALSE}
+```{r echo = FALSE}
 knitr::opts_chunk$set(
   collapse = TRUE,
   comment = "#>",
@@ -19,19 +22,14 @@
 
 ```
 
-stacomiR
-========================================================
 
-
-
-
 Installation
 -------------------------
 
 The package is available from CRAN, a development version is available from
 R-Forge.
 
-```{r eval=FALSE}
+```{r install, eval=FALSE}
 install.packages("stacomiR", repos="http://R-Forge.R-project.org")
 ```
 
@@ -40,354 +38,38 @@
 
 Launch the graphical interface
 
-```{r eval=FALSE}
+```{r example1, eval=FALSE}
 stacomi(gr_interface = TRUE, login_window = TRUE, database_expected = TRUE)
 ```
 
 The program can be launched to use from the command line
 
-```{r eval=FALSE}
+```{r example2, eval=FALSE}
 stacomi(gr_interface = TRUE, login_window = TRUE, database_expected = FALSE)
 ```
+Introduction
+---------------------------
+Link with open source database, 
+objective evaluation and sharing stock indicators for migratory fishes. 
+No R package
+JAVA + postgres + R
 
-Palettes
--------------------------
 
-The palette determines the colours of everything in a plot including the
-background, layers, gridlines, title text, axes lines, axes text and axes
-titles. The *swatch* is the the name given to the set of colours strictly used
-in styling the geoms/layer elements (e.g. the points in `geom_point()`, bars in
-`geom_bar()` etc.). At least six colours have been supplied in each palette's
-swatch. 
 
-There are a wide variety of themes in this package (and more on the way). Some
-of them serious business... others are delibrately stylish and might not be that
-good for use in proper publications. 
+Data structure
+-------------------    
+    
 
-### flat
+ Package structure
+--------------------
 
-[Base 16](https://github.com/chriskempson/base16)
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('flat', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### flat dark
-
-[Base 16](https://github.com/chriskempson/base16)
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('flat dark', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### camoflauge
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('camoflauge', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### chalk
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('chalk', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### copper
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('copper', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### dust
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('dust', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### earth
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('earth', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### fresh
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('fresh', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### grape
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('grape', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### grass
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('grass', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### greyscale
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('greyscale', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### light
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('light', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### lilac
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('lilac', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### pale
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('pale', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### sea
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('sea', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### sky
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('sky', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-### solarized
-
-```{r fig.width=10, fig.height=6, echo=FALSE}
-ggthemr('solarized', spacing = 0.5, type = 'inner')
-preview_theme()
-```
-
-Custom Palettes
+Working examples
 -------------------------
 
-`define_palette()` lets you make your own themes that can be passed to
-`ggthemr()` just like any of the palettes above. Here's an example of a
-(probably ugly) palette using random colours:
+###        Interface
 
-``` {r fig.width=5.5, fig.height=4.5}
-# Random colours that aren't white.
-set.seed(12345)
-random_colours <- sample(colors()[-c(1, 253, 361)], 10L)
+###        Command line
 
-ugly <- define_palette(
-  swatch = random_colours,
-  gradient = c(lower = random_colours[1L], upper = random_colours[2L])
-)
-
-ggthemr(ugly)
-
-example_plot + ggtitle(':(')
-
-```
-
-You can define all elements of a palette using `define_palette()` including
-colours for the background, text, axes lines, swatch and gradients. 
-
-
-Layouts
--------------------------
-
-The layout of a theme controls the appearance and position of the axes,
-gridlines and text. Some folk prefer both major and minor gridlines, others
-prefer none or something in between. 
-
-### Clean
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('grape', layout = 'clean', spacing = 0.5)
-preview_layout()
-```
-
-### Clear (default)
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('grape', layout = 'clear', spacing = 0.5)
-preview_layout()
-```
-
-### Minimal
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('grape', layout = 'minimal', spacing = 0.5)
-preview_layout()
-```
-
-### Plain
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('grape', layout = 'plain', spacing = 0.5)
-preview_layout()
-```
-
-### Scientific
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('grape', layout = 'scientific', spacing = 0.5)
-preview_layout()
-```
-
-Spacing
--------------------------
-
-Plot margins and space between axes titles and lines etc. is controlled with the
-*spacing* parameter. Lower values will make plots more compact, higher values
-will give them more padding. Compare the plots below where the spacing has been
-set to 0, 1 and 2 respectively.
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('earth', spacing = 0, type = 'outer')
-preview_layout()
-```
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('earth', spacing = 1, type = 'outer')
-preview_layout()
-```
-
-```{r fig.width=5.5, fig.height=3.5, echo=FALSE}
-ggthemr('earth', spacing = 2, type = 'outer')
-preview_layout()
-```
-
-Type
--------------------------
-
-The *type* parameter can be set to either *inner* or *outer*. When *inner*, the
-background colour of a plot will not extend past the plot area. *outer* will
-colour the entire plot and background. 
-
-```{r fig.width=5.5, fig.height=3.5, echo=TRUE}
-ggthemr('earth', type = 'inner')
-example_plot
-```
-
-```{r fig.width=5.5, fig.height=3.5, echo=TRUE}
-ggthemr('earth', type = 'outer')
-example_plot
-```
-
-
-Tweaking Themes
--------------------------
-
-Squinting at a chart? Low on printer ink? ggthemr includes some methods to tweak
-charts to make them lighter or darker. Here's a standard theme:
-
-```{r fig.width=7, fig.height=6, echo=TRUE}
-ggthemr('dust')
-example_plot
-```
-
-Maybe that plot comes out a bit pale looking when you print it. Here's how you
-can add a bit more contrast to the swatch:
-
-```{r fig.width=7, fig.height=6, echo=TRUE}
-darken_swatch(amount = 0.3)
-example_plot
-```
-
-The second parameter to `darken_swatch()` controls the degree to which the
-colours are made darker. Full list of methods with similar functionality:
-
-* `darken_swatch()` / `lighten_swatch()`: darker/lighter swatch colours.
-* `darken_gradient()` / `lighten_gradient()`: darker/lighter gradient colours.
-* `darken_palette()` / `lighten_palette()`: darker/lighter everything.
-
-I'll add methods to darken/lighten the axes lines and text soon too. 
-
-
-Plot Adjustments
--------------------------
-
-Most of the time you'll probably just want to set the theme and not worry about
-it. There may be times though where you'll want to make some small adjustment,
-or manually change what items appear as what colour in a plot.
-
-```{r fig.width=7, fig.height=6, echo=TRUE}
-ggthemr('dust')
-mpg_plot <- ggplot(mpg[mpg$drv != '4', ], aes(factor(cyl), cty, fill = drv)) + 
-  geom_boxplot() + labs(x = 'Cylinders', y = 'City MPG', fill = 'Drive Type') +
-  theme(legend.position = 'bottom')
-mpg_plot
-```
-
-
-For some reason you decide you want to change those colours. Front-wheel drive
-vehicles should be orange. Rear-wheelers should be that red colour. You could
-change the order of the levels of your fill variable, but you shouldn't have to
-do that. You just want to switch those colours but you have no idea what they
-are. `swatch()` will give you the colours in the currently active ggthemr
-palette. 
-
-```{r}
-swatch()
-```
-
-So you can manually swap the two colours around.
-
-```{r fig.width=7, fig.height=6, echo=TRUE}
-to_swap <- swatch()[2:3]
-mpg_plot + scale_fill_manual(values = rev(to_swap))
-```
-
-**Note:** the first colour in a swatch is a special one. It is reserved for
-outlining boxplots, text etc. So that's why the second and third colours were
-swapped.
-
-A note about theme setting
---------------------------
-ggthemr does three different things while setting a theme.
-
-1. It updates the default ggplot2 theme with the specified ggthemr theme by
-   using the `ggplot2::theme_set()` function.
-2. It modifies the aesthetic defaults for all geoms using the
-   `ggplot2::update_geom_defaults()` function.
-3. It creates functions for all the different scales in the global environment.
-
-In case, if you do not want to set the theme this way, use the
-`set_theme = FALSE` option while using the `ggthemr` function. An example of
-setting theme, geom aesthetic defaults and scales manually:
-```{r}
-ggthemr_reset()
-dust_theme <- ggthemr('dust', set_theme = FALSE)
-example_plot
-example_plot + dust_theme$theme
-example_plot + dust_theme$theme + dust_theme$scales$scale_fill_discrete()
-do.call(what = ggplot2::update_geom_defaults, args = dust_theme$geom_defaults$new$bar)
-ggplot(diamonds, aes(price)) + geom_histogram(binwidth = 850) + dust_theme$theme
-```
-
-
 License
 -------
-Released under GPL-3.
\ No newline at end of file
+Released under GPL-2.
\ No newline at end of file

Modified: pkg/stacomir/README.md
===================================================================
--- pkg/stacomir/README.md	2017-08-30 12:24:27 UTC (rev 447)
+++ pkg/stacomir/README.md	2017-08-30 13:11:13 UTC (rev 448)
@@ -1,5 +1,8 @@
 ---
+title: StacomiR
+author: Marion Legrand, Cédric Briand
 output: github_document
+toc: true
 ---  
 
 [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/stacomiR)](https://cran.r-project.org/package=stacomiR)
@@ -10,12 +13,7 @@
 
 
 
-stacomiR
-========================================================
 
-
-
-
 Installation
 -------------------------
 
@@ -43,371 +41,27 @@
 ```r
 stacomi(gr_interface = TRUE, login_window = TRUE, database_expected = FALSE)
 ```
+Introduction
+---------------------------
+Link with open source database, 
+objective evaluation and sharing stock indicators for migratory fishes. 
+No R package
+JAVA + postgres + R
 
-Palettes
--------------------------
+## Presentation
 
-The palette determines the colours of everything in a plot including the
-background, layers, gridlines, title text, axes lines, axes text and axes
-titles. The *swatch* is the the name given to the set of colours strictly used
-in styling the geoms/layer elements (e.g. the points in `geom_point()`, bars in
-`geom_bar()` etc.). At least six colours have been supplied in each palette's
-swatch. 
+### Data structure
+    
+    
 
-There are a wide variety of themes in this package (and more on the way). Some
-of them serious business... others are delibrately stylish and might not be that
-good for use in proper publications. 
+### Package structure
 
-### flat
+###    Working examples
 
-[Base 16](https://github.com/chriskempson/base16)
+####        Interface
 
+####        Command line
 
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### flat dark
-
-[Base 16](https://github.com/chriskempson/base16)
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### camoflauge
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### chalk
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### copper
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### dust
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### earth
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### fresh
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### grape
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### grass
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### greyscale
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### light
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### lilac
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### pale
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### sea
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### sky
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-### solarized
-
-
-```
-#> Error in preview_theme(): could not find function "preview_theme"
-```
-
-Custom Palettes
--------------------------
-
-`define_palette()` lets you make your own themes that can be passed to
-`ggthemr()` just like any of the palettes above. Here's an example of a
-(probably ugly) palette using random colours:
-
-
-```r
-# Random colours that aren't white.
-set.seed(12345)
-random_colours <- sample(colors()[-c(1, 253, 361)], 10L)
-
-ugly <- define_palette(
-  swatch = random_colours,
-  gradient = c(lower = random_colours[1L], upper = random_colours[2L])
-)
-
-ggthemr(ugly)
-
-example_plot + ggtitle(':(')
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-```
-
-You can define all elements of a palette using `define_palette()` including
-colours for the background, text, axes lines, swatch and gradients. 
-
-
-Layouts
--------------------------
-
-The layout of a theme controls the appearance and position of the axes,
-gridlines and text. Some folk prefer both major and minor gridlines, others
-prefer none or something in between. 
-
-### Clean
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-### Clear (default)
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-### Minimal
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-### Plain
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-### Scientific
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-Spacing
--------------------------
-
-Plot margins and space between axes titles and lines etc. is controlled with the
-*spacing* parameter. Lower values will make plots more compact, higher values
-will give them more padding. Compare the plots below where the spacing has been
-set to 0, 1 and 2 respectively.
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-
-```
-#> Error in preview_layout(): could not find function "preview_layout"
-```
-
-Type
--------------------------
-
-The *type* parameter can be set to either *inner* or *outer*. When *inner*, the
-background colour of a plot will not extend past the plot area. *outer* will
-colour the entire plot and background. 
-
-
-```r
-ggthemr('earth', type = 'inner')
-example_plot
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-```
-
-
-```r
-ggthemr('earth', type = 'outer')
-example_plot
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-```
-
-
-Tweaking Themes
--------------------------
-
-Squinting at a chart? Low on printer ink? ggthemr includes some methods to tweak
-charts to make them lighter or darker. Here's a standard theme:
-
-
-```r
-ggthemr('dust')
-example_plot
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-```
-
-Maybe that plot comes out a bit pale looking when you print it. Here's how you
-can add a bit more contrast to the swatch:
-
-
-```r
-darken_swatch(amount = 0.3)
-example_plot
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-```
-
-The second parameter to `darken_swatch()` controls the degree to which the
-colours are made darker. Full list of methods with similar functionality:
-
-* `darken_swatch()` / `lighten_swatch()`: darker/lighter swatch colours.
-* `darken_gradient()` / `lighten_gradient()`: darker/lighter gradient colours.
-* `darken_palette()` / `lighten_palette()`: darker/lighter everything.
-
-I'll add methods to darken/lighten the axes lines and text soon too. 
-
-
-Plot Adjustments
--------------------------
-
-Most of the time you'll probably just want to set the theme and not worry about
-it. There may be times though where you'll want to make some small adjustment,
-or manually change what items appear as what colour in a plot.
-
-
-```r
-ggthemr('dust')
-mpg_plot <- ggplot(mpg[mpg$drv != '4', ], aes(factor(cyl), cty, fill = drv)) + 
-  geom_boxplot() + labs(x = 'Cylinders', y = 'City MPG', fill = 'Drive Type') +
-  theme(legend.position = 'bottom')
-mpg_plot
-```
-
-![plot of chunk unnamed-chunk-36](man/figures/README-unnamed-chunk-36-1.png)
-
-
-For some reason you decide you want to change those colours. Front-wheel drive
-vehicles should be orange. Rear-wheelers should be that red colour. You could
-change the order of the levels of your fill variable, but you shouldn't have to
-do that. You just want to switch those colours but you have no idea what they
-are. `swatch()` will give you the colours in the currently active ggthemr
-palette. 
-
-
-```r
-swatch()
-#> [1] "#555555" "#db735c" "#EFA86E" "#9A8A76" "#F3C57B" "#7A6752" "#2A91A2"
-#> [8] "#87F28A" "#6EDCEF"
-#> attr(,"class")
-#> [1] "ggthemr_swatch"
-```
-
-So you can manually swap the two colours around.
-
-
-```r
-to_swap <- swatch()[2:3]
-mpg_plot + scale_fill_manual(values = rev(to_swap))
-```
-
-![plot of chunk unnamed-chunk-38](man/figures/README-unnamed-chunk-38-1.png)
-
-**Note:** the first colour in a swatch is a special one. It is reserved for
-outlining boxplots, text etc. So that's why the second and third colours were
-swapped.
-
-A note about theme setting
---------------------------
-ggthemr does three different things while setting a theme.
-
-1. It updates the default ggplot2 theme with the specified ggthemr theme by
-   using the `ggplot2::theme_set()` function.
-2. It modifies the aesthetic defaults for all geoms using the
-   `ggplot2::update_geom_defaults()` function.
-3. It creates functions for all the different scales in the global environment.
-
-In case, if you do not want to set the theme this way, use the
-`set_theme = FALSE` option while using the `ggthemr` function. An example of
-setting theme, geom aesthetic defaults and scales manually:
-
-```r
-ggthemr_reset()
-dust_theme <- ggthemr('dust', set_theme = FALSE)
-example_plot
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-example_plot + dust_theme$theme
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-example_plot + dust_theme$theme + dust_theme$scales$scale_fill_discrete()
-#> Error in eval(expr, envir, enclos): object 'example_plot' not found
-do.call(what = ggplot2::update_geom_defaults, args = dust_theme$geom_defaults$new$bar)
-ggplot(diamonds, aes(price)) + geom_histogram(binwidth = 850) + dust_theme$theme
-```
-
-![plot of chunk unnamed-chunk-39](man/figures/README-unnamed-chunk-39-1.png)
-
-
 License
 -------
-Released under GPL-3.
+Released under GPL-2.



More information about the Stacomir-commits mailing list