From 629613cda495606a1f431e118ca12090de0e026a Mon Sep 17 00:00:00 2001 From: pvictor Date: Wed, 27 Nov 2019 09:50:34 +0100 Subject: [PATCH] prepare for cran --- .Rbuildignore | 1 + DESCRIPTION | 2 +- R/add_flows.R | 6 +++--- R/add_minicharts.R | 6 +++--- R/data-doc.R | 6 +++--- cran-comments.md | 11 +++++++++++ man/addFlows.Rd | 8 ++++---- man/addMinicharts.Rd | 6 +++--- man/d3.schemeCategory10.Rd | 2 +- man/eco2mix.Rd | 4 ++-- vignettes/introduction.Rmd | 4 ++-- 11 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 cran-comments.md diff --git a/.Rbuildignore b/.Rbuildignore index f1157ee..52559a0 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -5,3 +5,4 @@ shiny-demo javascript ^codecov\.yml$ +^cran-comments\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index fc1fd3c..1b9714b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,7 +7,7 @@ Authors@R: c( family = "Bachelier", role = c("aut", "cre"), email = "veronique.bachelier@rte-france.com"), - person("Jalal-Edine", "ZAWAM", email = "jalal-edine.zawam@rte-france.com", role = "aut"), + person("Jalal-Edine", "ZAWAM", role = "aut"), person("Benoit", "Thieurmel", email = "benoit.thieurmel@datastorm.fr", role = "aut"), person("Francois", "Guillem", role = "aut"), person("RTE", role = "cph") diff --git a/R/add_flows.R b/R/add_flows.R index 36e99ac..4f09956 100644 --- a/R/add_flows.R +++ b/R/add_flows.R @@ -6,9 +6,9 @@ #' direction of the flow. #' #' @param lng0 Longitude of the origin of the flow. -#' @param lat0 Lattitude of the origin of the flow. +#' @param lat0 Latitude of the origin of the flow. #' @param lng1 Longitude of the destination of the flow. -#' @param lat1 Lattitude of the destination of the flow. +#' @param lat1 Latitude of the destination of the flow. #' @param color Color of the flow. #' @param flow Value of the flow between the origin and the destination. If #' argument \code{dir} is not set, negative values are interpreted as flows @@ -33,7 +33,7 @@ #' leaflet() %>% addTiles() %>% #' addFlows(0, 0, 1, 1, flow = 10) #' -#' # Electric exchanges between France and neighbouring countries +#' # Electric exchanges between France and neighboring countries #' data("eco2mixBalance") #' bal <- eco2mixBalance #' leaflet() %>% addTiles() %>% diff --git a/R/add_minicharts.R b/R/add_minicharts.R index 68e7608..8deab38 100644 --- a/R/add_minicharts.R +++ b/R/add_minicharts.R @@ -8,7 +8,7 @@ #' #' @param map A leaflet map object created with \code{\link[leaflet]{leaflet}}. #' @param lng Longitude where to place the charts. -#' @param lat Lattitude where to place the charts. +#' @param lat Latitude where to place the charts. #' @param chartdata A numeric matrix with number of rows equal to the number of #' elements in \code{lng} or \code{lat} and number of column equal to the #' number of variables to represent. If parameter \code{time} is set, the @@ -47,7 +47,7 @@ #' @param transitionTime Duration in milliseconds of the transitions when a #' property of a chart is updated. #' @param popup Options that control popup generation. -#' @param layerId An ID variable. It is mandatoy when one wants to update some +#' @param layerId An ID variable. It is mandatory when one wants to update some #' chart with \code{updateMinicharts}. #' @param legend If TRUE and if data has column names, then a legend is #' automatically added to the map. @@ -59,7 +59,7 @@ #' shown when the map is created. It is used only when argument \code{time} is #' set. #' @param onChange (For power users who know javascript) A character string -#' containing javascript code that is exexuted each time a chart is updated. +#' containing javascript code that is executed each time a chart is updated. #' See the details section to understand why and how to use this parameter. #' #' @details diff --git a/R/data-doc.R b/R/data-doc.R index 822fdea..7f66ff5 100644 --- a/R/data-doc.R +++ b/R/data-doc.R @@ -6,7 +6,7 @@ #' january 2013 to february 2017. #' #' In addition to the total production, the table contains one column for each -#' type of production. The table also contains the lattitude and longitude of +#' type of production. The table also contains the latitude and longitude of #' the center of the regions. #' #' \code{eco2mixBalance} is an extract of \code{eco2mix} that contains only @@ -14,7 +14,7 @@ #' to represent flows on a map. #' #' @docType data -#' @author Francois Guillem \email{francois.guillem@rte-france.com} +#' @author Francois Guillem #' @references \url{http://www.rte-france.com/fr/eco2mix/eco2mix} #' @keywords datasets "eco2mix" @@ -29,7 +29,7 @@ #' A character vector containing ten colors. These colors are used as the default #' color palette #' @docType data -#' @author Francois Guillem \email{francois.guillem@rte-france.com} +#' @author Francois Guillem #' @references \url{https://github.com/d3/d3-scale} #' @keywords datasets "d3.schemeCategory10" diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..3191c77 --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,11 @@ +## Test environments +* local OS X install, R 3.6.1 +* ubuntu 14.04 (on travis-ci), R 3.6.1 +* win-builder (devel and release) + +## R CMD check results + +0 errors | 0 warnings | 1 note + +* There's a new maintainer to the package. Thank you! + diff --git a/man/addFlows.Rd b/man/addFlows.Rd index 5704a82..379a646 100644 --- a/man/addFlows.Rd +++ b/man/addFlows.Rd @@ -52,11 +52,11 @@ clearFlows(map) \item{lng0}{Longitude of the origin of the flow.} -\item{lat0}{Lattitude of the origin of the flow.} +\item{lat0}{Latitude of the origin of the flow.} \item{lng1}{Longitude of the destination of the flow.} -\item{lat1}{Lattitude of the destination of the flow.} +\item{lat1}{Latitude of the destination of the flow.} \item{color}{Color of the flow.} @@ -79,7 +79,7 @@ variables on a map.} \item{popup}{Options that control popup generation.} -\item{layerId}{An ID variable. It is mandatoy when one wants to update some +\item{layerId}{An ID variable. It is mandatory when one wants to update some chart with \code{updateMinicharts}.} \item{timeFormat}{Character string used to format dates and times when @@ -113,7 +113,7 @@ require(leaflet) leaflet() \%>\% addTiles() \%>\% addFlows(0, 0, 1, 1, flow = 10) -# Electric exchanges between France and neighbouring countries +# Electric exchanges between France and neighboring countries data("eco2mixBalance") bal <- eco2mixBalance leaflet() \%>\% addTiles() \%>\% diff --git a/man/addMinicharts.Rd b/man/addMinicharts.Rd index 74f4038..0473e5c 100644 --- a/man/addMinicharts.Rd +++ b/man/addMinicharts.Rd @@ -70,7 +70,7 @@ clearMinicharts(map) \item{lng}{Longitude where to place the charts.} -\item{lat}{Lattitude where to place the charts.} +\item{lat}{Latitude where to place the charts.} \item{chartdata}{A numeric matrix with number of rows equal to the number of elements in \code{lng} or \code{lat} and number of column equal to the @@ -126,7 +126,7 @@ property of a chart is updated.} \item{popup}{Options that control popup generation.} -\item{layerId}{An ID variable. It is mandatoy when one wants to update some +\item{layerId}{An ID variable. It is mandatory when one wants to update some chart with \code{updateMinicharts}.} \item{legend}{If TRUE and if data has column names, then a legend is @@ -143,7 +143,7 @@ shown when the map is created. It is used only when argument \code{time} is set.} \item{onChange}{(For power users who know javascript) A character string -containing javascript code that is exexuted each time a chart is updated. +containing javascript code that is executed each time a chart is updated. See the details section to understand why and how to use this parameter.} } \value{ diff --git a/man/d3.schemeCategory10.Rd b/man/d3.schemeCategory10.Rd index 3a57fbf..c2c2da7 100644 --- a/man/d3.schemeCategory10.Rd +++ b/man/d3.schemeCategory10.Rd @@ -16,6 +16,6 @@ color palette \url{https://github.com/d3/d3-scale} } \author{ -Francois Guillem \email{francois.guillem@rte-france.com} +Francois Guillem } \keyword{datasets} diff --git a/man/eco2mix.Rd b/man/eco2mix.Rd index b3b1552..632db80 100644 --- a/man/eco2mix.Rd +++ b/man/eco2mix.Rd @@ -17,7 +17,7 @@ of France from january 2010 to february 2017 and of 12 french regions from january 2013 to february 2017. In addition to the total production, the table contains one column for each -type of production. The table also contains the lattitude and longitude of +type of production. The table also contains the latitude and longitude of the center of the regions. \code{eco2mixBalance} is an extract of \code{eco2mix} that contains only @@ -28,6 +28,6 @@ to represent flows on a map. \url{http://www.rte-france.com/fr/eco2mix/eco2mix} } \author{ -Francois Guillem \email{francois.guillem@rte-france.com} +Francois Guillem } \keyword{datasets} diff --git a/vignettes/introduction.Rmd b/vignettes/introduction.Rmd index 53ae761..6668d72 100644 --- a/vignettes/introduction.Rmd +++ b/vignettes/introduction.Rmd @@ -19,7 +19,7 @@ let's have a look to a concrete example. The package provides a table that contains the electric production, consumption and exchanges of France from january 2010 to february 2017 and of 12 french regions from january 2013 to february 2017. -In addition to the total production, the table contains one column for each type of production. The table also contains the lattitude and longitude of the center of the regions. +In addition to the total production, the table contains one column for each type of production. The table also contains the latitude and longitude of the center of the regions. ```{r} library(leaflet.minicharts) @@ -112,7 +112,7 @@ This is nice, isn't it? ## Animated maps -Until now, we have only represented aggregated data but it would be nice to create a map that represents the evolution over time of some variables. It is actually easy with `leaflet.minicharts`. The first step is to construct a table containing longitude, lattitude, a time column and the variables we want to represent. The table `eco2mix` already has all these columns. We only need to filter the rows containing data for the entire country. +Until now, we have only represented aggregated data but it would be nice to create a map that represents the evolution over time of some variables. It is actually easy with `leaflet.minicharts`. The first step is to construct a table containing longitude, latitude, a time column and the variables we want to represent. The table `eco2mix` already has all these columns. We only need to filter the rows containing data for the entire country. ```{r} prodRegions <- eco2mix %>% filter(area != "France")