Skip to content

Commit

Permalink
SH: SH
Browse files Browse the repository at this point in the history
  • Loading branch information
hojsgaard committed Mar 22, 2023
1 parent 18fbf0d commit b1ba878
Show file tree
Hide file tree
Showing 17 changed files with 143 additions and 97 deletions.
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
S3method(LE_matrix,default)
S3method(LSmeans,default)
S3method(LSmeans,lmerMod)
S3method(as.data.frame,mvrVal)
S3method(as.double,mvrVal)
S3method(as_lhs_chr,character)
S3method(as_lhs_chr,formula)
S3method(as_lhs_frm,character)
Expand Down Expand Up @@ -116,6 +118,7 @@ export(sapply_by)
export(scale2)
export(scaleBy)
export(scale_by)
export(scale_df)
export(section_fun)
export(section_fun_env)
export(section_fun_sub)
Expand Down Expand Up @@ -164,6 +167,7 @@ importFrom(stats,delete.response)
importFrom(stats,family)
importFrom(stats,fitted)
importFrom(stats,formula)
importFrom(stats,ftable)
importFrom(stats,lm)
importFrom(stats,logLik)
importFrom(stats,median)
Expand Down
70 changes: 38 additions & 32 deletions R/DATA-doby.R
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
#' @docType data
#' @format This data frame contains:
#' \describe{
## #' \item{State:}{State of the USA}
#' \item{state:}{State of the USA}
#' \item{murder:}{crime of murder}
#' \item{rape:}{}
#' \item{robbery:}{}
Expand Down Expand Up @@ -553,48 +553,54 @@
"milkman_rdm1"


#' NIRmilk
#' @title NIRmilk
#'
#' 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 dry matter.
#' @description 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 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 (dry matter).
#' @format This data frame contains 17 rows and 158 columns. The
#' first column is the sample number. The columns `Xklm` contains
#' the transmittance (fraction of electromagnetic power)
#' transmittance through the sample at wavelength `klm`. The
#' response variables are fat, protein, lactose and dm (dry
#' matter).
#' @keywords datasets
#' @examples
#'
#' data(NIRmilk)
#'
"NIRmilk"

## #' nir_milk
## #'
## #' Near infra red light (NIR) measurments 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.
## #'
## #' @name nir_milk
## #' @docType data
## #' @format A list with two components
## #' x Datafrane with infra red light amount at different wavelengths (column names are the wavelengths; just remove the leading X).
## #' y Datafrane with response variables fat, protein,
## #' lactose and dm (drymatter)
## #'
## #' @keywords datasets
## #' @examples
## #'
## #' data(nir_milk)
## #'
## "nir_milk"

#' @title nir_milk
#'
#' @description 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 dry matter.
#'
#' @name nir_milk
#' @docType data
#' @format A list with two components
#' x Datafrane with infra red light amount at different wavelengths (column names are the wavelengths; just remove the leading X).
#' y Datafrane with response variables fat, protein,
#' lactose and dm (drymatter)
#'
#' @keywords datasets
#' @seealso [NIRmilk]
#' @examples
#'
#' data(nir_milk)
#'
"nir_milk"



Expand Down
9 changes: 2 additions & 7 deletions R/recover_pca_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
##' @examples
##'
##' crime <- doBy::crimeRate
##' rownames(crime) <- crime$State
##' crime$State <- NULL
##' crime <- doBy::crimeRate
##' rownames(crime) <- crime$State
##' crime$State <- NULL
##' rownames(crime) <- crime$state
##' crime$state <- NULL
##'
##' o <- order(apply(scale(crime), 1, sum))
##' dat <- crime[o,]
Expand All @@ -33,11 +30,9 @@
##' matplot(scale(dat), type="l")
##' matplot(scale(rec2), type="l")
##'
##'
##' j <- merge(dat, rec2, by=0)
##' pairs(j[,-1])
##'
##'
##' @export
recover_pca_data <- function (object, comp = 1)
{
Expand Down
Binary file added data/NIRmilk.RData
Binary file not shown.
Binary file modified data/crimeRate.RData
100755 → 100644
Binary file not shown.
Binary file modified data/crime_rate.RData
Binary file not shown.
Binary file added data/nir_milk.RData
Binary file not shown.
21 changes: 12 additions & 9 deletions man/NIRmilk.Rd

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

16 changes: 8 additions & 8 deletions man/crimeRate.Rd

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

16 changes: 8 additions & 8 deletions man/crime_rate.Rd

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

32 changes: 32 additions & 0 deletions man/nir_milk.Rd

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

9 changes: 2 additions & 7 deletions man/recover_pca_data.Rd

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

26 changes: 0 additions & 26 deletions man/scale2.Rd

This file was deleted.

37 changes: 37 additions & 0 deletions man/scale_df.Rd

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

File renamed without changes.
Binary file added zandbox/crimeRate.RData
Binary file not shown.
Binary file modified zandbox/nir_milk.RData
Binary file not shown.

0 comments on commit b1ba878

Please sign in to comment.