diff --git a/DESCRIPTION b/DESCRIPTION index c864324..fccedf1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ -Package: warmingStripes +Package: WarmingStripes Type: Package Title: What the Package Does (Title Case) -Version: 0.1.0 +Version: 0.2.0 Author: c(person("Kai", "Budde", email = "kai.budde@uni-rostock.de", role = c("aut", "cre")) Maintainer: Kai Budde @@ -10,5 +10,5 @@ Description: More about what it does (maybe more than one line) License: file LICENSE Encoding: UTF-8 LazyData: true -Imports: ggplot2, dplyr, lubridate, RColorBrewer, utils +Imports: ggplot2, lubridate, dplyr, RColorBrewer, utils RoxygenNote: 6.1.1 diff --git a/NAMESPACE b/NAMESPACE index 675dce2..bbdbaec 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,6 @@ # Generated by roxygen2: do not edit by hand -export(warmingStripes) +export(WarmingStripes) import(RColorBrewer) import(dplyr) import(ggplot2) diff --git a/R/warmingStripes.R b/R/WarmingStripes.R similarity index 94% rename from R/warmingStripes.R rename to R/WarmingStripes.R index d29e8fd..fa8a8aa 100644 --- a/R/warmingStripes.R +++ b/R/WarmingStripes.R @@ -5,8 +5,9 @@ #' red colors stand for higher mean temperatures and dark blue colors for #' lower mean temperatures. #' @aliases warmingstripes +#' @aliases warmingStripes #' @author Kai Budde -#' @export warmingStripes +#' @export WarmingStripes #' @import ggplot2 #' @import dplyr #' @import lubridate @@ -18,9 +19,16 @@ #' @param style A character # Created: 06/17/2019 -# Last edited: 06/19/2019 +# Last edited: 06/21/2019 -warmingStripes <- function(input_file, startyear.mean = 1961, endyear.mean = 1990, style = "continuous") { +WarmingStripes <- function(input_file, + startyear.mean = 1961, + endyear.mean = 1990, + style = "continuous") { + + # Set warnings off + oldw <- getOption("warn") + options(warn = -1) # import the annual temperatures df.temp <- utils::read.csv(input_file) @@ -166,4 +174,7 @@ warmingStripes <- function(input_file, startyear.mean = 1961, endyear.mean = 199 ggsave(filename = "WarmingStripes.pdf", width = 297, height = 210, units = "mm") + # Turn warnings on + options(warn = oldw) + } diff --git a/README.md b/README.md index 38ce0e0..b03340e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ In order to create a warming stripes plot of Rostock (example data), one needs t ```R library(devtools) install() -require(warmingStripes) +require(WarmingStripes) input_file <- "inst/data/data_TMK_MN004.csv" warmingStripes(input_file = input_file) ``` diff --git a/man/warmingStripes.Rd b/man/WarmingStripes.Rd similarity index 79% rename from man/warmingStripes.Rd rename to man/WarmingStripes.Rd index 58fcdd0..d8cfc55 100644 --- a/man/warmingStripes.Rd +++ b/man/WarmingStripes.Rd @@ -1,11 +1,11 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/warmingStripes.R -\name{warmingStripes} -\alias{warmingStripes} +% Please edit documentation in R/WarmingStripes.R +\name{WarmingStripes} +\alias{WarmingStripes} \alias{warmingstripes} \title{warmingStripes} \usage{ -warmingStripes(input_file, startyear.mean = 1961, endyear.mean = 1990, +WarmingStripes(input_file, startyear.mean = 1961, endyear.mean = 1990, style = "continuous") } \arguments{