Skip to content

Commit

Permalink
Fixd import warning with fGarch
Browse files Browse the repository at this point in the history
  • Loading branch information
feng-li committed Apr 8, 2024
1 parent 9ac23cb commit ff9a8fe
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Package
Package: gratis
Title: Generating Time Series with Diverse and Controllable
Characteristics
Version: 1.0.5
Version: 1.0.7
Authors@R: c(
person("Yanfei", "Kang", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0001-8769-6650")),
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export(pi_coefficients)
export(rmixnorm)
export(rmixnorm_ts)
export(simulate_target)
import(fGarch)
import(feasts)
import(shiny)
importFrom(GA,ga)
Expand All @@ -30,6 +29,8 @@ importFrom(doRNG,"%dorng%")
importFrom(dplyr,bind_cols)
importFrom(dplyr,mutate)
importFrom(dplyr,select)
importFrom(fGarch,garchSim)
importFrom(fGarch,garchSpec)
importFrom(foreach,"%do%")
importFrom(foreach,"%dopar%")
importFrom(foreach,foreach)
Expand Down
8 changes: 6 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# gratis 1.0.7

* Fixed dependency issue on CRAN.

# gratis 1.0.5

* Fixed the 'docType' issue.
Expand All @@ -20,7 +24,7 @@

## Improvements

* Added new parameter 'output_format', give users an option to transform time series output data into a tsibble format.
* Added new parameter `output_format`, giving users an option to transform time series output data into a `tsibble` format.
* Update vignette content

## Bug fixes
Expand All @@ -33,4 +37,4 @@

## New features

* The R package gratis (previously known as tsgeneration) provides efficient algorithms for generating time series with diverse and controllable characteristics.
* The R package `gratis` (previously known as tsgeneration) provides efficient algorithms for generating time series with diverse and controllable characteristics.
2 changes: 1 addition & 1 deletion R/gratis-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' @importFrom GA startParallel garun
#' @importFrom tsfeatures tsfeatures
#' @importFrom doRNG "%dorng%"
#' @import fGarch
#' @importFrom fGarch garchSpec garchSim
#' @import shiny
#' @import feasts
#' @keywords internal
Expand Down
12 changes: 6 additions & 6 deletions R/rmixmorm.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ dmixnorm <- function(x, means, sigmas, weights, log = FALSE) {
#' means.ar.par.list <- list(c(0, 0.8), c(0, 0.6, 0.3))
#' require("fGarch")
#' sigmas.spec <- list(
#' garchSpec(model = list(alpha = c(0.05, 0.06)), cond.dist = "norm"),
#' garchSpec(model = list(alpha = c(0.05, 0.05)), cond.dist = "norm")
#' fGarch::garchSpec(model = list(alpha = c(0.05, 0.06)), cond.dist = "norm"),
#' fGarch::garchSpec(model = list(alpha = c(0.05, 0.05)), cond.dist = "norm")
#' )
#' sigmas.list <- lapply(
#' lapply(sigmas.spec, garchSim, extended = TRUE, n = n),
#' lapply(sigmas.spec, fGarch::garchSim, extended = TRUE, n = n),
#' function(x) x$sigma
#' )
#' weights <- c(0.8, 0.2)
Expand Down Expand Up @@ -205,9 +205,9 @@ dmixnorm_ts <- function(y, means.ar.par.list, sigmas.list, weights, log = FALSE)
## means.ar.par.list = list(c(0, 0.8), c(0, 0.6, 0.3))

## require("fGarch")
## sigmas.spec <- list(garchSpec(model = list(alpha = c(0.05, 0.06)), cond.dist = "norm"),
## garchSpec(model = list(alpha = c(0.05, 0.05)), cond.dist = "norm"))
## sigmas.list <- lapply(lapply(sigmas.spec, garchSim, extended = TRUE, n = n),
## sigmas.spec <- list(fGarch::garchSpec(model = list(alpha = c(0.05, 0.06)), cond.dist = "norm"),
## fGarch::garchSpec(model = list(alpha = c(0.05, 0.05)), cond.dist = "norm"))
## sigmas.list <- lapply(lapply(sigmas.spec, fGarch::garchSim, extended = TRUE, n = n),
## function(x) x$sigma)
## weights <- c(0.8, 0.2)
## y = rmixnorm_ts(n = n, means.ar.par.list = means.ar.par.list, sigmas.list = sigmas.list,
Expand Down
6 changes: 3 additions & 3 deletions man/rmixnorm_ts.Rd

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

0 comments on commit ff9a8fe

Please sign in to comment.