Skip to content

Commit 31a4c1d

Browse files
committed
Resolving build errors in anticipation of submitting to CRAN
Moved gf graphics functions to gtilde package. But fmodel remains here. Added a gmodel as alias for fmodel --- gmodel makes more sense as a name.
1 parent 0c87ac5 commit 31a4c1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+899
-1824
lines changed

DESCRIPTION

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@ Maintainer: Daniel Kaplan <kaplan@macalester.edu>
77
Description: Functions providing a formula-based interface to ggplot.
88
License: MIT + file LICENSE
99
LazyData: TRUE
10+
Depends:
11+
R (>= 3.1), ggplot2
1012
Imports:
11-
shiny,
12-
miniUI,
13-
ggplot2,
14-
ggmap,
1513
lazyeval,
1614
rpart,
1715
mosaic,
1816
magrittr
1917
RoxygenNote: 5.0.1
2018
Suggests:
19+
dplyr,
2120
testthat,
2221
mosaicData,
23-
mosaicMapShapes,
24-
rpart.plot,
2522
knitr,
2623
rmarkdown
2724
VignetteBuilder: knitr

NAMESPACE

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,30 @@
11
# Generated by roxygen2: do not edit by hand
22

3-
S3method(data_from_model,lm)
4-
S3method(explanatory_vars,bootstrap_ensemble)
5-
S3method(explanatory_vars,lm)
63
S3method(print,bootstrap_ensemble)
7-
S3method(response_var,bootstrap_ensemble)
8-
S3method(response_var,lm)
94
export(collinearity)
10-
export(create_eval_levels)
115
export(cv_pred_error)
12-
export(data_from_model)
136
export(effect_size)
147
export(ensemble)
158
export(evaluate_model)
16-
export(explanatory_vars)
17-
export(fborders)
18-
export(fmap)
199
export(fmodel)
20-
export(formula_gg)
21-
export(formula_to_gg)
22-
export(gf_abline)
23-
export(gf_bar)
24-
export(gf_boxplot)
25-
export(gf_counts)
26-
export(gf_density)
27-
export(gf_density_2d)
28-
export(gf_frame)
29-
export(gf_freqpoly)
30-
export(gf_hex)
31-
export(gf_histogram)
32-
export(gf_hline)
33-
export(gf_jitter)
34-
export(gf_line)
35-
export(gf_path)
36-
export(gf_point)
37-
export(gf_text)
38-
export(gghelper)
39-
export(kfold_trial)
10+
export(gmodel)
4011
export(reference_values)
41-
export(response_var)
4212
export(typical_levels)
43-
import(ggmap)
44-
import(ggplot2)
45-
import(miniUI)
46-
import(shiny)
13+
importFrom(ggplot2,aes_string)
4714
importFrom(ggplot2,facet_grid)
4815
importFrom(ggplot2,facet_wrap)
49-
importFrom(ggplot2,ggtitle)
50-
importFrom(ggplot2,xlab)
51-
importFrom(ggplot2,xlim)
16+
importFrom(ggplot2,geom_errorbar)
17+
importFrom(ggplot2,geom_line)
18+
importFrom(ggplot2,geom_point)
19+
importFrom(ggplot2,geom_ribbon)
20+
importFrom(ggplot2,ggplot)
21+
importFrom(ggplot2,label_both)
5222
importFrom(ggplot2,ylab)
53-
importFrom(ggplot2,ylim)
23+
importFrom(stats,formula)
24+
importFrom(stats,lm)
25+
importFrom(stats,median)
26+
importFrom(stats,model.matrix)
27+
importFrom(stats,predict)
28+
importFrom(stats,quantile)
29+
importFrom(stats,sd)
30+
importFrom(utils,data)

R/AARP.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#' changes as the insured person ages.)
1313
#'
1414
#' @docType data
15-
#'
16-
#' @usage data(AARP, package = "statisticalModeling")
15+
#' @name AARP
16+
#' @usage data(AARP)
1717
#'
1818
#' @keywords datasets
1919
#'

R/Alder.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
#'
4949
#' @docType data
50-
#'
50+
#' @name Alder
5151
#' @usage data(Alder)
5252
#'
5353
#' @keywords datasets

R/Birth_weight.R

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
#' weight, and whether the mother smoked is also recorded.
77
#' The data were present by Nolan and Speed to address the question
88
#' of whether there is a link between maternal smoking and the
9-
#' baby's health. (See D. Nolan and T.P. Speed (2009) "Stat Labs: Mathematical
10-
#' Statistics Through Applications")
9+
#' baby's health.
1110
#'
1211
#' @docType data
13-
#'
14-
#' @usage data(Birth_weight, package = "statisticalModeling")
12+
#' @name Birth_weight
13+
#' @usage data(Birth_weight)
1514
#'
1615
#' @keywords datasets
1716
#'
18-
#' @source The "AARP Bulletin".
19-
#' A copy of the ad is available \href{http://tiny.cc/mosaic/AARP-insurance-ad.pdf}{at this link.}
20-
#'
17+
#' @source D. Nolan and T.P. Speed (2009) "Stat Labs: Mathematical
18+
#' Statistics Through Applications"
2119
#' @format
2220
#' A data frame with 886 observations on the following variables.
2321
#' \itemize{

R/College_grades.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#' are included. Only courses with 10 or more students enrolled were included.
99
#'
1010
#' @docType data
11-
#'
12-
#' @usage data(College_grades, package = "statisticalModeling")
11+
#' @name College_grades
12+
#' @usage data(College_grades)
1313
#'
1414
#' @keywords datasets
1515
#'
@@ -34,5 +34,7 @@
3434
#' }
3535
#'
3636
#' @examples
37-
#' GPA <- mosaic::mean(gradepoint ~ sid, data = College_grades)
37+
#' \dontrun{
38+
#' GPA <- lm(gradepoint ~ sid - 1, data = College_grades)
39+
#' }
3840
"College_grades"

R/Crime.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#'
77
#' @docType data
88
#' @name Crime
9-
#' @usage data(Crime, package = "statisticalModeling")
9+
#' @usage data(Crime)
1010
#'
1111
#' @keywords datasets
1212
#'

R/HDD_Minneapolis.R

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#' Heating degree days in Minneapolis, Minnesota, USA
2+
#'
3+
#' A "heating degree day" is a measure of weather coldness. It's defined to be the difference
4+
#' between the outdoor ambient temperature and 65 degrees F, but has a value of zero when the ambient
5+
#' temperature is above 65 degrees. This difference is averaged over time and multiplied by the number
6+
#' of days in the time period covered. The heating degree day is often used as a measure of the demand for
7+
#' domestic heating in a locale.
8+
#'
9+
#' These data report monthly heating degree days. For teaching purposes, the data give an extreme example
10+
#' of how a relationship (hdd vs year) can be revealed by including a covariate (month). Although interest focusses
11+
#' on the change in temperature over the century the data cover, there is such regular seasonal variation that
12+
#' no systematic trend over the years is evident unless month is taken into account.
13+
#'
14+
#' @format A data frame \code{HDD_Minneapolis} with 1412 rows and 4 variables:
15+
#' \itemize{
16+
#' \item year the year
17+
#' \item month the month
18+
#' \item hdd the number of heating degree days for that period.
19+
#' \item loc the location at which the temperature was measured. In the early years, this was downtown Minneapolis.
20+
#' Later, the site was moved to the Minneapolis/Saint-Paul International Airport.
21+
#' }
22+
23+
24+
#'
25+
#' @docType data
26+
#' @name HDD_Minneapolis
27+
#' @usage data(HDD_Minneapolis)
28+
#'
29+
#' @keywords datasets
30+
#'
31+
32+
#' @examples
33+
#' mod_1 <- lm(hdd ~ year, data = HDD_Minneapolis)
34+
#' mod_2 <- lm(hdd ~ year + month, data = HDD_Minneapolis)
35+
"HDD_Minneapolis"

R/Houses_for_sale.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
#' A random sample of 1,728 homes taken from public records
44
#' from the Saratoga County
55
#' (http://www.saratogacountyny.gov/departments/real-property-tax-service-agency/).
6-
#' Collected by Candice Corvetti (Williams College 07) for her senior thesis.
6+
#' Collected by Candice Corvetti (Williams College '07) for her senior thesis.
77
#'
88
#' These data are part of a case study developed by Prof. Dick de Veaux at
99
#' Williams. They are available from the American Statistical Association's \href{http://community.amstat.org/stats101/home}{Stat 101} collection
1010
#' of case studies and included in this package for convenience.
1111
#'
1212
#' @docType data
13-
#'
13+
#' @name Houses_for_sale
1414
#' @usage data(Houses_for_sale)
1515
#'
1616
#' @format A dataframe with 1728 cases, each of which is a house for sale.
@@ -19,7 +19,7 @@
1919
#'
2020
#' @references Dick De Veaux (2015) "How much is a fireplace worth?" Stats 101: A resource for teaching introductory statistics, American Statistical Association
2121
#'
22-
#' @source \href{http://community.amstat.org/stats101/home}{Stat 101}
22+
# @source \href{http://community.amstat.org/stats101/home}{Stat 101}
2323
#'
2424
#' @examples
2525
#' mod_1 <- lm(price ~ fireplaces, data = Houses_for_sale)

R/Mussels.R

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#' Metabolism of zebra mussels
2+
#'
3+
#' Zebra mussels are a small, fast reproducing species of freshwater mussel
4+
#' native to the lakes of southeast Russia. They have accidentally been introduced in other
5+
#' areas, competing with native species and creating problems for people as they cover the
6+
#' undersides of docks and boats, clog water intakes and other underwater structures.
7+
#' Zebra mussels even attach themselves to other mussels, sometimes starving those mussels.
8+
#'
9+
#' Ecologists Shirley Baker and Daniel Hornbach examined whether zebra mussels gain an advantage by attaching to other mussels rather than to rocks.(baker-hornbach-2008) The ecologists collected samples of small rocks and Amblema plicata mussels, each of which had a collection of zebra mussels attached. The samples were transported to a laboratory where the group of mussels from each individual rock or Amblema were removed and placed in an aquarium equipped to measure oxygen uptake and ammonia excretion. After these physiological measurements were made, the biochemical composition of the mussel tissue was determined: the percentage of protein, lipid, carbohydrate, and ash.
10+
11+
#' Baker and Hornbach found that zebra mussels attached to Amblema had greater
12+
#' physiological activity than those attached to rocks as measured by oxygen uptake and
13+
#' ammonia excretion. But this appears to be a sign of extra effort for the Amblema-attached
14+
#' zebra mussels, since they had lower carbohydrate and lipid levels. In other words, attaching to
15+
#' Amblema appears to be disadvantageous to the zebra mussels compared to attaching to a rock.
16+
17+
#'
18+
#' @format A data frame \code{Mussels} with 30 rows and 11 variables.
19+
#' \itemize{
20+
#' \item{\code{GroupID}} {ID for the cluster of mussels growing on a substrate. }
21+
#' \item{\code{dry.mass}} {The mass of the mussels (as a group) after dehydration.}
22+
#' \item{\code{count}} {How many mussels were in the cluster.}
23+
#' \item{\code{attachment}} {The substrate to which the mussels were attached.}
24+
#' \item{\code{lipid}} {Percentage of dry mass that is lipid.}
25+
#' \item{\code{protein}} {Percentage of dry mass that is protein.}
26+
#' \item{\code{carbo}} {Percentage of dry mass that is carbohydrate.}
27+
#' \item{\code{ash}} {Percentage of dry mass that is ash.}
28+
#' \item{\code{ammonia}} {Nitrogen excretion measured as ammonia in mg per hour for the group.}
29+
#' \item{\code{Kcal}} {Total calorific value of the tissue in kilo-calories per gram.}
30+
#' \item{\code{O2}} {Oxygen uptake in mg per hour for the group.}
31+
#' }
32+
#'
33+
#' @docType data
34+
#' @name Mussels
35+
#' @usage data(Mussels)
36+
#'
37+
#' @keywords datasets
38+
#'
39+
40+
#' @examples
41+
#' Mussels$ind.mass <- with(Mussels, dry.mass/count)
42+
#' mod_1 <- lm(O2/count ~ attachment, data = Mussels)
43+
#' mod_2 <- lm(ammonia/count ~ attachment, data = Mussels)
44+
#' mod_3 <- lm(O2/count ~ ind.mass + attachment, data = Mussels)
45+
#' mod_4 <- lm(ammonia/count ~ ind.mass + attachment, data = Mussels)
46+
"Mussels"

0 commit comments

Comments
 (0)