Skip to content

Commit

Permalink
SH: version
Browse files Browse the repository at this point in the history
  • Loading branch information
hojsgaard committed Dec 8, 2022
1 parent 6e5b04d commit f36a163
Show file tree
Hide file tree
Showing 42 changed files with 879 additions and 640 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 4.6.14
Date: 2022-10-16 07:32:35 UTC
SHA: 8f084fd315fed10573a01735b0dc45254a70620e
Version: 4.6.15
Date: 2022-12-08 12:58:04 UTC
SHA: 6e5b04d94c7bbe5eb57009ff98415d9ee5d9d106
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: doBy
Version: 4.6.14.9005
Version: 4.6.15
Title: Groupwise Statistics, LSmeans, Linear Estimates, Utilities
Author: Søren Højsgaard <[email protected]> and Ulrich Halekoh
<[email protected]>
Expand Down
8 changes: 4 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export(get_X)
export(get_contrasts)
export(get_fun)
export(get_linest_list)
export(get_restrictions)
export(get_section)
export(get_vartypes)
export(get_xlevels)
export(interaction_plot)
Expand All @@ -88,9 +88,6 @@ export(popMeans)
export(recodeVar)
export(recover_pca_data)
export(renameCol)
export(restrict_fun)
export(restrict_fun_env)
export(restrict_fun_sub)
export(rle2)
export(sampleBy)
export(sample_by)
Expand All @@ -99,6 +96,9 @@ export(sapply_by)
export(scale2)
export(scaleBy)
export(scale_by)
export(section_fun)
export(section_fun_env)
export(section_fun_sub)
export(set_covariate_val)
export(set_xlevels)
export(splitBy)
Expand Down
42 changes: 22 additions & 20 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
doBy v4.6.15 (Release date: 2022-12-08)
=======================================

Changes

* `restrict_fun` renamed to `section_fun` and takes different arguments (`nms`, `vls`)

doBy v4.6.14 (Release date: 2022-10-16)
=======================================

Expand Down Expand Up @@ -27,10 +34,9 @@ doBy v4.6.11 (Release date: 2021-07-13)
doBy v4.6.10 (Release date: 2021-04-29)
=======================================

## CHANGES
Changes

* `specialize` function removed.

* `restrict` function replaces `specialize`.


Expand All @@ -42,10 +48,10 @@ doBy v4.6.10 (Release date: 2021-04-29)
# doBy v4.6.8 (Release date: 2020-11-10)
=========================================

* head / tail added for splitByData (a list resulting from
* head / tail added for `splitByData` (a list resulting from
calling splitBy)

* sapplyBy / sapply_by added
* `sapplyBy` / `sapply_by` added

* subSeq works on factors now (coerces to character)

Expand All @@ -55,7 +61,7 @@ doBy v4.6.10 (Release date: 2021-04-29)

* is_grouped added

* math / mathmark dataset added.
* `math` / `mathmark` dataset added.


doBy v4.6.7 (Release date: 2020-07-07)
Expand Down Expand Up @@ -202,7 +208,7 @@ Changes:
===============================================

* linest now accepts K=NULL, in which case K is taken to be the
diagonal materix
diagonal matrix
* No longer Depend(s) on MASS
* Some datasets added
* Version 4.5-12 uploaded.
Expand All @@ -229,7 +235,7 @@ Changes:
===============================================

* LSmeans, LSmatrix and linest functions added. (There are not yet
methods for nlme and survival objects but they will be added).
methods for `nlme` and `survival` objects but they will be added).
* popMeans and popMatrix functions removed
* Vignette on LSmeans added.
* Version 4.5-10 uploaded
Expand Down Expand Up @@ -335,8 +341,8 @@ Changes:
* funBy function added (documentation to be done)
* scaleBy function added
* Minor bug fixed in summaryBy
* popMeans extended to mer objects
* KRmodcomp, PBmodcomp and friends moved to the pbkrtest
* popMeans extended to `mer` objects
* KRmodcomp, PBmodcomp etc moved to the pbkrtest
package
* Version 4.4.1 uploaded.

Expand Down Expand Up @@ -442,7 +448,7 @@ Changes:
===============================================

* Bug in summaryBy fixed: Strata did not match their values (as
defined by the rh.variables). Thanks to Pascal Hirsch for pointing
defined by the `rh.variables`). Thanks to Pascal Hirsch for pointing
this out.
* Version 4.0.2 uploaded

Expand All @@ -463,7 +469,7 @@ Changes:
the levels of the factors (it used to be that the names matched
the levels of the factors in reverse order).
* The formula in splitBy can now also be a character vector.
* which.maxn and which.minn functions added
* `which.maxn` and `which.minn` functions added
* Version 4.0.0 uploaded


Expand Down Expand Up @@ -535,15 +541,15 @@ Changes:
2008-02-13 Søren Højsgaard <[email protected]>
===============================================

* firstobs and lastobs functions added
* `firstobs` and `lastobs` functions added
* Version 2.2 uploaded



2007-12-05 Søren Højsgaard <[email protected]>
===============================================

* splitBy: Results becomes a splitByData object. Two attributes
* splitBy: Results becomes a `splitByData` object. Two attributes
are added: 1) grps, which is the grouping factors coded into a
single variable. 2) idxvec, (a list) which holds the position of
each row in the original data set.
Expand All @@ -557,8 +563,6 @@ Changes:
===============================================

* DESCRIPTION file change from Depends: Hmisc to Imports: Hmisc;
* importFrom(Hmisc,mApply) added so that not all of Hmisc is
loaded.



Expand Down Expand Up @@ -629,7 +633,7 @@ Changes:

* Version 1.2 built and uploaded
* Description of codstom data updated.
* matrix2dataFrame2 and subsAttr2 added
* `matrix2dataFrame2` and `subsAttr2` added
* postfix argument in summaryBy can be a list


Expand Down Expand Up @@ -716,8 +720,6 @@ Changes:
2006-01-17 Søren Højsgaard <[email protected]>
===============================================

* Function summaryBy modified to take . as lhs in formula and to
take idvar = ~formula
* Functions powerBy, histBy, qqnormBy have been removed (figure
out how to do histBy and qqnormBy using xyplot() in lattice).
* Function summaryBy modified to take dot (.) as lhs in formula and to
take `idvar = ~formula`

90 changes: 15 additions & 75 deletions R/DATA-doby.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @description Yield and sugar percentage in sugar beets from a split plot
#' experiment. Data is obtained from a split plot experiment. There are 3
#' blocks and in each of these the harvest time defines the "whole plot" and
#' the sowing time defines the "split plot". Each plot was \eqn{25 m^2} and
#' the sowing time defines the "split plot". Each plot was 25 square meters and
#' the yield is recorded in kg. See 'details' for the experimental layout.
#'
#' @name beets
Expand Down Expand Up @@ -61,7 +61,7 @@
#' therapeutically refractory tumours. We preprocessed the data using Robust
#' Multichip Analysis (RMA). Dataset has been truncated to the 1000 most
#' informative genes (as selected by Wilcoxon test statistics) to simplify
#' computation. The genes have been standardised to have zero mean and unit
#' computation. The genes have been standardized to have zero mean and unit
#' variance (i.e. z-scored).
#'
#' The factor \code{code} defines whether there was a mutation in the p53
Expand All @@ -79,8 +79,7 @@
#' @references Miller et al (2005, PubMed
#' ID:16141321)
#'
#' @source Dr. Chris Holmes, c.holmes at stats
#' dot. ox . ac .uk
#' @source Chris Holmes, \email{c.holmes@@stats.ox.ac.uk}
#'
#' @keywords datasets
#'
Expand All @@ -104,65 +103,6 @@
"breastcancer"


#' budworm data
#'
#' Effect of Insecticide on survivial of tobacco budworms
#' number of killed budworms exposed to an insecticidepp
#' mortality of the moth tobacco budworm 'Heliothis virescens' for 6 doses of
#' the pyrethroid trans-cypermethrin differentiated with respect to sex
#'
#' @name budworm
#' @docType data
#'
#' @format This data frame contains 12 rows and 4 columns:
#' \describe{
#' \item{sex:}{sex of the budworm}
#' \item{dose:}{dose of the insecticide trans-cypermethrin in [\eqn{\mu}{mu}g]}
#' \item{ndead:}{budworms killed in a trial}
#' \item{ntotal:}{total number of budworms exposed per trial }
#' }
#'
#' @references Venables, W.N; Ripley, B.D.(1999) Modern Applied Statistics with
#' S-Plus, Heidelberg, Springer, 3rd edition, chapter 7.2
#'
#' @source Collet, D. (1991) Modelling Binary Data, Chapman & Hall, London,
#' Example 3.7
#'
#' @keywords datasets
#' @examples
#'
#' data(budworm)
#'
#' ## function to caclulate the empirical logits
#' empirical.logit<- function(y, n) {
#' el <- log((y + 0.5) / (n - y + 0.5))
#' el
#' }
#'
#'
#' # plot the empirical logits against log-dose
#'
#' log.dose <- log(budworm$dose)
#' emp.logit <- empirical.logit(budworm$ndead, budworm$ntotal)
#' plot(log.dose, emp.logit, type='n', xlab='log-dose', ylab='emprirical logit')
#' title('budworm: emprirical logits of probability to die ')
#' male <- budworm$sex=='male'
#' female <- budworm$sex=='female'
#' lines(log.dose[male], emp.logit[male], type='b', lty=1, col=1)
#' lines(log.dose[female], emp.logit[female], type='b', lty=2, col=2)
#' legend(0.5, 2, legend=c('male', 'female'), lty=c(1, 2), col=c(1, 2))
#'
#' \dontrun{
#' * SAS example;
#' data budworm;
#' infile 'budworm.txt' firstobs=2;
#' input sex dose ndead ntotal;
#' run;
#' }
#'
#'
"budworm"


##
## carcass
Expand All @@ -171,7 +111,7 @@
#' Lean meat contents of 344 pig carcasses
#'
#' Measurement of lean meat percentage of 344 pig carcasses together with
#' auxillary information collected at three Danish slaughter houses
#' auxiliary information collected at three Danish slaughter houses
#'
#' @name carcass
#'
Expand Down Expand Up @@ -216,7 +156,7 @@

#' Diet of Atlantic cod in the Gulf of St. Lawrence (Canada)
#'
#' Stomach content data for Atlantic cod (Gadus morhua) in the Gulf of
#' Stomach content data for Atlantic cod (\emph{Gadus morhua}) in the Gulf of
#' St.Lawrence, Eastern Canada. Note: many prey items were of no interest for
#' this analysis and were regrouped into the "Other" category.
#'
Expand Down Expand Up @@ -393,11 +333,11 @@
#' The \code{dietox} data frame has 861 rows and 7 columns.
#'
#' @details Data contains weight of slaughter pigs measured weekly for 12
#' weeks. Data also contains the startweight (i.e. the weight at week
#' weeks. Data also contains the start weight (i.e. the weight at week
#' 1). The treatments are 3 different levels of Evit = vitamin E (dose: 0,
#' 100, 200 mg dl-alpha-tocopheryl acetat /kg feed) in combination with 3
#' different levels of Cu=copper (dose: 0, 35, 175 mg/kg feed) in the feed.
#' The cumulated feed intake is also recorded. The pigs are littermates.
#' The cumulated feed intake is also recorded. The pigs are litter mates.
#'
#'
#' @format This data frame contains the following columns:
Expand Down Expand Up @@ -596,7 +536,7 @@
#' J. Dairy Sci. 90:5453–5467 doi:10.3168/jds.2006-821.
#'
#' This study was part of the Biosens project used data from the
#' “Mælkekoens energibalance og mobilisering” project; both were
#' “Malkekoens energibalance og mobilisering” project; both were
#' funded by the Danish Ministry of Food, Agriculture and Fisheries
#' and the Danish Cattle Association.
#'
Expand All @@ -610,18 +550,18 @@

#' NIRmilk
#'
#' Near infra red light (NIR) measurments are made at 152 wavelengths on 17
#' Near infra red light (NIR) measurements are made at 152 wavelengths on 17
#' milk samples. While milk runs through a glass tube, infra red light is sent
#' through the tube and the amount of light passing though the tube is measured
#' at different wavelengths. Each milk sample was additionally analysed for
#' fat, lactose, protein and drymatter.
#' fat, lactose, protein and dry matter.
#'
#' @name NIRmilk
#' @docType data
#' @format This data frame contains 18 rows and 158 columns. The first column
#' is the sample number. The columns Xwww contains the infra red light
#' amount at wavelength www. The response variables are fat, protein,
#' lactose and dm (drymatter).
#' is the sample number. The columns `Xwww` contains the infra red light
#' amount at wavelength `www`. The response variables are fat, protein,
#' lactose and dm (dry matter).
#' @keywords datasets
#' @examples
#'
Expand Down Expand Up @@ -657,9 +597,9 @@

#' Weight and size of 20 potatoes
#'
#' Weight and size of 20 potatoes. Weight in grams; size in milimeter. There
#' Weight and size of 20 potatoes. Weight in grams; size in millimeter. There
#' are two sizes: \code{length} is the longest length and \code{width} is the
#' shortest length across a potato. #'
#' shortest length across a potato.
#'
#' @name potatoes
#' @docType data
Expand Down
4 changes: 2 additions & 2 deletions R/by-lapplyBy.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#######################################################################
#' @param formula A formula describing how data should be split.
#' @param data A dataframe.
#' @param FUN A function to be applied to each element in the splitted
#' @param FUN A function to be applied to each element in the split
#' list, see 'Examples' below.
#' @param ... optional arguments to FUN.
#' @param \dots optional arguments to FUN.
#' @param USE.NAMES Same as for `sapply`
#' @param simplify Same as for `sapply`
#'
Expand Down
6 changes: 3 additions & 3 deletions R/by-lmBy.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#'
#' @aliases lmBy coef.lmBy coef.summary_lmBy summary.lmBy fitted.lmBy
#' residuals.lmBy getBy
#' @param formula A linear model formula object of the form y ~ x1 +
#' ... + xn | g1 + ... + gm. In the formula object, y represents
#' the response, x1, ... ,xn the covariates, and the grouping
#' @param formula A linear model formula object of the form
#' `y ~ x1 + ... + xn | g1 + ... + gm`. In the formula object, `y` represents
#' the response, `x1, ..., xn` the covariates, and the grouping
#' factors specifying the partitioning of the data according to
#' which different lm fits should be performed.
#' @param data A dataframe
Expand Down
2 changes: 1 addition & 1 deletion R/by-scaleBy.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ scale2 <- function(x, center = TRUE, scale = TRUE){
#'
###########################################################################
#'
#' @param formula Variables to split data frame by, as as.quoted
#' @param formula Variables to split data frame by, as `as.quoted`
#' variables, a formula or character vector.
#' @param data A dataframe or matrix
##' @param center Logical, should data be centered.
Expand Down
2 changes: 1 addition & 1 deletion R/by-splitBy.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#'
###########################################################################
#'
#' @param formula Variables to split data frame by, as as.quoted
#' @param formula Variables to split data frame by, as `as.quoted`
#' variables, a formula or character vector.
#' @param data A data frame
#' @param drop Logical indicating if levels that do not occur should
Expand Down
Loading

0 comments on commit f36a163

Please sign in to comment.