Skip to content

Commit

Permalink
merge branch sub
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjie2wang committed Dec 11, 2016
2 parents 050c33f + 2680934 commit fcec6b1
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 31 deletions.
15 changes: 11 additions & 4 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
^.*\.Rproj$
\.tar\.gz$
\.Rproj$
^\.Rproj\.user$
^\.Rhistory$
\.Rcheck$
^\.Rhistory$
~$
^\.\#
^\#
^\.travis\.yml$
^\.git$
^test$
^dev$
^Makefile$
^revdep$
^test$
^COPYRIGHT$
^LICENSE$
^TODO.org$
^TODO\.org$
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: splines2
Title: Regression Spline Functions and Classes Too
Version: 0.2.2
Date: 2016-11-05
Version: 0.2.3
Date: 2016-12-09
Authors@R: c(
person(given = "Wenjie", family = "Wang",
email = "wenjie.2.wang@uconn.edu",
Expand Down
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
objects := $(wildcard R/*.R) DESCRIPTION
man := $(wildcard man/*.Rd) NAMESPACE
# man := $(wildcard man/*.Rd) NAMESPACE
dir := $(shell pwd)
version := $(shell grep "Version" DESCRIPTION | sed "s/Version: //")
pkg := $(shell grep "Package" DESCRIPTION | sed "s/Package: //")
tar := $(pkg)_$(version).tar.gz
checkLog := $(pkg).Rcheck/00check.log

rmd := vignettes/$(pkg)-intro.Rmd
vignettes := vignettes/$(pkg)-intro.html
cprt := COPYRIGHT

.PHONY: all
all: $(tar)

$(tar): $(objects)
Rscript -e "library(methods); devtools::document();";
R CMD build $(dir)

.PHONY: check
check: $(checkLog)

.PHONY: build
all: $(tar)

.PHONY: preview
preview: $(vignettes)

$(tar): $(objects)
Rscript -e "library(methods); devtools::document();";
R CMD build $(dir)

$(checkLog): $(tar)
R CMD check --as-cran $(tar)

$(vignettes): $(rmd)
Rscript -e "rmarkdown::render('$(rmd)')"

.PHONY: INSTALL
INSTALL: $(tar)
R CMD INSTALL --build $(tar)
.PHONY: install
install: $(tar)
R CMD INSTALL $(tar)

## update copyright year in HEADER, R script and date in DESCRIPTION
.PHONY: updateHeader
Expand Down
23 changes: 15 additions & 8 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# splines2 v0.2.2
# CHANGES IN splines2 VERSION 0.2.3

## Bug fixes
## BUG FIXES

* Fixed one-piece constant basis for M-splines.


# CHANGES IN splines2 VERSION 0.2.2

## BUG FIXES

* Fixed the NA's handling in all the functions constructing spline bases.


# splines2 v0.2.1
# CHANGES IN splines2 VERSION 0.2.1

## New features
## NEW FEATURES

* Added function `bSpline` generating B-spline basis allowing zero degree or
piecewise constant basis based on function `bs` in package **splines**.
Expand All @@ -21,19 +28,19 @@

* Added `print` methods for all **splines2** objects developed so far.

## Major changes
## MAJOR CHANGES

* Improved the function `iSpline` to construct I-spline basis directly from
B-spline basis instead of M-spline basis.

## Minor changes
## MINOR CHANGES

* Updated all CRAN URL to a canonical form suggested.


# splines2 v0.1.0
# CHANGES IN splines2 VERSION 0.1.0

## New features
## NEW FEATURES

* The first version of **splines2** providing functions constructing M-spline,
I-spline, and integral of B-spline basis.
Expand Down
8 changes: 6 additions & 2 deletions R/iSpline.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ iSpline <- function(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
x <- x[! nax]

## function determining j from x
foo <- stats::stepfun(x = knots, y = seq(ord, length(knots) + ord))
j <- as.integer(foo(x))
j <- if (length(knots)) {
foo <- stats::stepfun(x = knots, y = seq(ord, length(knots) + ord))
as.integer(foo(x))
} else {
rep.int(1L, length(x))
}

## calculate I-spline basis at non-NA x's
## directly based on B-spline
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ constant basis of degree zero is allowed for B-spline and M-spline basis.
You can install the released version from [CRAN][3].

```R
install.packages("splines2", dependencies = TRUE)
install.packages("splines2")
```


Expand All @@ -24,13 +24,21 @@ install.packages("splines2", dependencies = TRUE)
[![Build Status][6]][5]

The latest version of package is under development at [GitHub][7] in branch
'dev'. You may consider installing the latest version with the help of
**devtools** if it is able to pass the building check by Travis CI.
'dev'. If it is able to pass the building check by Travis CI, you may consider
installing it with the help of **devtools** by

```R
devtools::install_github("wenjie2wang/splines2", ref = "dev")
```

or cloning this reposotory to local and install by makefile as follows:

```
git clone https://github.com/wenjie2wang/splines2.git
cd splines2
make install
```


## Get Started

Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ citEntry(entry = "Manual",
Title = "{splines2}: {R}egression Spline Functions and Classes Too}",
Author = personList(as.person("Wenjie Wang"),
as.person("Jun Yan")),
Note = "{R} package version 0.2.2",
Note = "{R} package version 0.2.3",
Year = "2016",
Url = "https://CRAN.R-project.org/package=splines2",

textVersion = paste("Wang, W., Yan, J. (2016). splines2:",
"Regression Spline Functions and Classes Too.",
"R package version 0.2.2.",
"R package version 0.2.3.",
"https://CRAN.R-project.org/package=splines2")
)
3 changes: 3 additions & 0 deletions revdep/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/
checks.rds
*.Rout
9 changes: 9 additions & 0 deletions revdep/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
R := R CMD BATCH --vanilla

.PHONY: check
check:
$(R) check.R &

.PHONY: clean
clean:
rm -rf *.rds *.Rout *.Rhistory
30 changes: 30 additions & 0 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Setup

## Platform

|setting |value |
|:--------|:----------------------------|
|version |R version 3.3.2 (2016-10-31) |
|system |x86_64, linux-gnu |
|ui |X11 |
|language |(EN) |
|collate |en_US.UTF-8 |
|tz |America/New_York |
|date |2016-12-09 |

## Packages

|package |* |version |date |source |
|:---------|:--|:-------|:----------|:------------------------------------|
|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) |
|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) |
|splines2 | |0.2.3 |2016-12-10 |local (wenjie2wang/splines2@ab4f426) |

# Check results
1 packages

## reda (0.3.0)
Maintainer: Wenjie Wang <wenjie.2.wang@uconn.edu>
Bug reports: https://github.com/wenjie2wang/reda/issues

0 errors | 0 warnings | 0 notes
5 changes: 5 additions & 0 deletions revdep/check.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
library("devtools")

revdep_check()
revdep_check_save_summary()
revdep_check_print_problems()
26 changes: 26 additions & 0 deletions revdep/problems.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Setup

## Platform

|setting |value |
|:--------|:----------------------------|
|version |R version 3.3.2 (2016-10-31) |
|system |x86_64, linux-gnu |
|ui |X11 |
|language |(EN) |
|collate |en_US.UTF-8 |
|tz |America/New_York |
|date |2016-12-09 |

## Packages

|package |* |version |date |source |
|:---------|:--|:-------|:----------|:------------------------------------|
|knitr | |1.15.1 |2016-11-22 |cran (@1.15.1) |
|rmarkdown | |1.2 |2016-11-21 |cran (@1.2) |
|splines2 | |0.2.3 |2016-12-10 |local (wenjie2wang/splines2@ab4f426) |

# Check results
0 packages with problems


0 comments on commit fcec6b1

Please sign in to comment.