File: print.R

package info (click to toggle)
r-cran-splines2 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,512 kB
  • sloc: cpp: 1,988; ansic: 165; sh: 13; makefile: 2
file content (75 lines) | stat: -rw-r--r-- 1,845 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
##
## R package splines2 by Wenjie Wang and Jun Yan
## Copyright (C) 2016-2021
##
## This file is part of the R package splines2.
##
## The R package splines2 is free software: You can redistribute it and/or
## modify it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or any later
## version (at your option). See the GNU General Public License at
## <https://www.gnu.org/licenses/> for details.
##
## The R package splines2 is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
##

##' @export
print.bSpline2 <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

##' @export
print.ibs <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

##' @export
print.dbs <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

##' @export
print.mSpline <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

##' @export
print.iSpline <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

##' @export
print.cSpline <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

##' @export
print.bernsteinPoly <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

##' @export
print.naturalSpline <- function(x, ...) {
    print.default(tidyAttr(x, ...))
    invisible(x)
}

### internal function ==========================================================
## remove all attributes but dim and dimnames
tidyAttr <- function(x, ...) {
    dimen <- attr(x, "dim")
    dimenName <- attr(x, "dimnames")
    attributes(x) <- NULL
    attr(x, "dim") <- dimen
    attr(x, "dimnames") <- dimenName
    x
}