Skip to content

Commit

Permalink
cleaned up NAMESPACE and close #35
Browse files Browse the repository at this point in the history
  • Loading branch information
beanumber committed May 20, 2019
1 parent ba05dbc commit 68c50a6
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 45 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: mdsr
Title: Complement to 'Modern Data Science with R'
Version: 0.1.6.9000
Date: 2018-06-13
Version: 0.1.6.9002
Date: 2019-06-01
Authors@R: c(
person("Ben", "Baumer", email = "ben.baumer@gmail.com",
role = c("aut", "cre")),
Expand Down Expand Up @@ -36,5 +36,6 @@ Suggests:
sp,
testthat
RoxygenNote: 6.1.1
Encoding: UTF-8
URL: http://github.com/beanumber/mdsr
BugReports: https://github.com/beanumber/mdsr/issues
20 changes: 1 addition & 19 deletions NAMESPACE
Expand Up @@ -8,23 +8,5 @@ export(mysql_scidb)
export(src_scidb)
export(theme_mdsr)
import(babynames)
importFrom(DBI,dbConnect)
importFrom(RMySQL,MySQL)
importFrom(dbplyr,src_dbi)
importFrom(downloader,download)
importFrom(dplyr,"%>%")
importFrom(dplyr,bind_rows)
importFrom(dplyr,inner_join)
importFrom(dplyr,mutate_)
importFrom(dplyr,rename_)
importFrom(dplyr,select_)
importFrom(fs,fs_path)
import(dplyr)
importFrom(ggplot2,"%+replace%")
importFrom(ggplot2,element_line)
importFrom(ggplot2,element_rect)
importFrom(ggplot2,element_text)
importFrom(ggplot2,rel)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_grey)
importFrom(mosaic,theme_map)
importFrom(stats,approx)
4 changes: 4 additions & 0 deletions NEWS.md
@@ -1,3 +1,7 @@
mdsr 0.1.7

* added Connections pane interface to DB Server [#35](https://github.com/beanumber/mdsr/issues/35)

mdsr 0.1.6

* improved documentation [#18](https://github.com/beanumber/mdsr/issues/18)
Expand Down
3 changes: 1 addition & 2 deletions R/BabynameDist.R
@@ -1,7 +1,6 @@
#' Wrangle babynames data
#' @importFrom dplyr mutate_ select_ bind_rows rename_ inner_join %>%
#' @import dplyr
#' @import babynames
#' @importFrom stats approx
#' @export
#' @return a \code{\link[dplyr]{tbl_df}} similar to \code{\link[babynames]{babynames}}
#' with a column for the estimated number of people alive in 2014.
Expand Down
9 changes: 4 additions & 5 deletions R/NCI60.R
@@ -1,7 +1,4 @@

#' Load the NCI60 data from GitHub
#'
#' @importFrom downloader download
#' @export
#' @examples
#'
Expand All @@ -13,8 +10,10 @@ etl_NCI60 <- function() {
NCI60 <- data.frame()
dir <- tempdir()
lcl <- file.path(dir, "NCI60.rda")
downloader::download("https://github.com/beanumber/mdsr/blob/master/data-raw/NCI60.rda?raw=true",
destfile = lcl)
downloader::download(
"https://github.com/beanumber/mdsr/blob/master/data-raw/NCI60.rda?raw=true",
destfile = lcl
)
load(lcl)
return(dplyr::as.tbl(NCI60))
}
1 change: 0 additions & 1 deletion R/Rnw2Rmd.R
Expand Up @@ -2,7 +2,6 @@ globalVariables(c("."))

#' Convert Rnw to Rmd
#' @inheritParams fs::file_move
#' @importFrom fs fs_path
#' @export

# inspiration
Expand Down
13 changes: 0 additions & 13 deletions R/scidb.R
@@ -1,18 +1,11 @@
#' src_scidb
#' @description Connect to the scidb server at Smith College.
#'
#' @param dbname the name of the database to which you want to connect
#' @param ... arguments passed to \code{\link[dplyr]{src_mysql}} or \code{\link[DBI]{dbConnect}}
#'
#' @details This is a public, read-only account. Any abuse will be considered a
#' hostile act.
#'
#' @return For \code{\link{src_scidb}}, a \code{\link[dplyr]{src_dbi}} object
#'
#' @seealso \code{\link[dbplyr]{src_dbi}}
#'
#' @importFrom dbplyr src_dbi
#' @importFrom RMySQL MySQL
#' @export
#'
#' @examples
Expand All @@ -26,15 +19,10 @@ src_scidb <- function(dbname, ...) {

#' @rdname src_scidb
#' @export
#'
#' @importFrom DBI dbConnect
#' @importFrom RMySQL MySQL
#'
#' @return For \code{\link{dbConnect_scidb}}, a \code{\link[DBI]{DBIConnection-class}} object
#'
#' @seealso \code{\link[DBI]{DBIConnection-class}}
#' @examples
#'
#' dbAir <- dbConnect_scidb("airlines")
#' dbAir

Expand All @@ -49,7 +37,6 @@ dbConnect_scidb <- function(dbname, ...) {
#'
#' @return For \code{\link{mysql_scidb}}, a character vector of length 1 to be used
#' as an \code{engine.ops} argument, or on the command line.
#'
#' @seealso \code{\link[knitr]{opts_chunk}}
#' @examples
#'
Expand Down
3 changes: 1 addition & 2 deletions R/themes.R
Expand Up @@ -3,8 +3,7 @@
#' @description Graphical themes used in MDSR book
#'
#' @inheritParams ggplot2::theme_grey
#' @importFrom ggplot2 theme theme_grey element_text element_line element_rect rel %+replace%
#' @importFrom mosaic theme_map
#' @importFrom ggplot2 %+replace%
#' @export
#' @examples
#'
Expand Down
1 change: 1 addition & 0 deletions inst/rstudio/connections.dcf
@@ -0,0 +1 @@
Name: MDSR_MySQL_Server
1 change: 1 addition & 0 deletions inst/rstudio/connections/MDSR_MySQL_Server.R
@@ -0,0 +1 @@
db <- mdsr::src_scidb(${0:Schema="airlines"})
1 change: 0 additions & 1 deletion man/src_scidb.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 68c50a6

Please sign in to comment.