Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
philipdelff committed Oct 30, 2024
1 parent 3f06587 commit d39b364
Show file tree
Hide file tree
Showing 18 changed files with 1,548 additions and 1,520 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: NMdata
Type: Package
Title: Preparation, Checking and Post-Processing Data for PK/PD Modeling
Version: 0.1.7.911
Version: 0.1.7.912
Authors@R:
c(person(given="Philip", family="Delff",
email = "philip@delff.dk",
Expand Down
1 change: 1 addition & 0 deletions R/NMreadParsText.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
##' @param fields Deprecated. Use `format`.
##' @param fields.omega Deprecated. Use `format.omega`.
##' @param fields.sigma Deprecated. Use `format.sigma`.
##' @return data.frame with parameter names and fields read from comments
##' @details Off-diagonal omega and sigma elements will only be
##' correctly treated if their num field specifies say 1-2 to
##' specify it is covariance between 1 and 2.
Expand Down
1 change: 1 addition & 0 deletions R/NMrelate.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
##' gain information but only extracts what it can from the model
##' code. You can then merge with information from functions such
##' as `NMreadExt()` and `NMreadParText()`.
##' @return data.frame relating parameters to variable names
##' @export

NMrelate <- function(file,lines,modelname,par.type,col.model,sections,as.fun){
Expand Down
1 change: 1 addition & 0 deletions R/colLabels.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
##' Extract column labels as defined in SAS
##' @param ... See `?compareCols`
##' @return A data.frame with variable and their labels
##' @seealso compareCols NMinfo
##' @export

Expand Down
1 change: 1 addition & 0 deletions R/editCharCols.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
##' @param ... Additional arguments passed to `gsub()`. Especially,
##' notice fixed=TRUE will disable interpretation of `pattern` and
##' `replace` as regular expressions.
##' @return a data.frame
##' @examples
##' ### remove commas from character columns
##' dat <- data.frame(A=1:3,text=cc(a,"a,d","g"))
Expand Down
3 changes: 2 additions & 1 deletion R/uniquePresent.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
##' variables. \code{uniquePresent} with `req.n1=TRUE` makes sure the
##' result is a single unique value (e.g., within subjects). A
##' typical use is carrying subject-level covariates from one data
##' set to another in a longitudinal analysis.
##' set to another in a longitudinal analysis.
##' @param a vector of same class as `x`
##' @export
uniquePresent <- function(x,req.n1=TRUE,na.pattern){
if(missing(na.pattern)) na.pattern <- "^ *$"
Expand Down
7 changes: 4 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,16 @@ explicitly select CRAN for the installation. Or if you should want a
version that has not yet reached CRAN, installing from Github is easy
too.

```
```{r,eval=FALSE}
## Option 1: Install from your default repository
install.packages("NMdata")
## Option 2: Install explicitly from CRAN
install.packages("NMdata",repos="https://cloud.r-project.org")
library(NMdata)
## Option 3: Install from github
library(remotes)
install_github("nmautoverse/NMdata")
library(NMdata)
```
If you use the Github version, you may want to see the
[FAQ](https://nmautoverse.github.io/NMdata/articles/NMdata-FAQ.html)
Expand Down
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,17 @@ that case you have two other options. You can explicitly select CRAN for
the installation. Or if you should want a version that has not yet
reached CRAN, installing from Github is easy too.

## Option 2: Install explicitly from CRAN
install.packages("NMdata",repos="https://cloud.r-project.org")
library(NMdata)

## Option 3: Install from github
library(remotes)
install_github("nmautoverse/NMdata")
library(NMdata)
``` r
## Option 1: Install from your default repository
install.packages("NMdata")

## Option 2: Install explicitly from CRAN
install.packages("NMdata",repos="https://cloud.r-project.org")

## Option 3: Install from github
library(remotes)
install_github("nmautoverse/NMdata")
```

If you use the Github version, you may want to see the
[FAQ](https://nmautoverse.github.io/NMdata/articles/NMdata-FAQ.html) for
Expand Down
6 changes: 5 additions & 1 deletion devel/scripts/dsCreate_1.R
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,11 @@ NMwriteSection(file.nm("xgxr001dir/input.txt"),section="DATA",newlines=sec.data.
### xgxgr002: CYCLE=DROP, BBW for WEIGHTB
pk2 <- copy(pk)
pk2[,AMT:=AMT*1000]
nmcode <- NMwriteData(pk2,file=file.data.test("xgxr12.csv"),script=script.1,args.stamp = list(description="AMT in micrograms"))
nmcode <- NMwriteData(pk2,
file=file.data.test("xgxr12.csv"),
script=script.1,
args.stamp = list(description="AMT in micrograms"),
args.rds=list(version=2))


### Section end: Version with AMT in microgram
Expand Down
3 changes: 3 additions & 0 deletions man/NMreadParsText.Rd

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

3 changes: 3 additions & 0 deletions man/NMrelate.Rd

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

3 changes: 3 additions & 0 deletions man/colLabels.Rd

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

3 changes: 3 additions & 0 deletions man/editCharCols.Rd

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

2 changes: 2 additions & 0 deletions man/uniquePresent.Rd

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

1 change: 1 addition & 0 deletions tests/testthat/test_NMdataConf.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ test_that("use.rds - deprecated",{
NMdataConf(reset=TRUE)
NMdataConf(use.rds=F)
res <- NMdataConf()
res <- dropFuns(res)

expect_equal_to_reference(res,fileRef)

Expand Down
Loading

0 comments on commit d39b364

Please sign in to comment.