Skip to content

Commit

Permalink
Preparing CRAN release
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Mar 22, 2019
1 parent 1f25297 commit a30d3eb
Show file tree
Hide file tree
Showing 35 changed files with 238 additions and 147 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
@@ -1,3 +1,4 @@
^Meta$
^.*\.Rproj$
^\.Rproj\.user$
^data-raw$
Expand Down
8 changes: 2 additions & 6 deletions .gitignore
@@ -1,28 +1,24 @@
Meta
doc
.Rproj.user
.Rhistory
.RData
inst/doc


# Binary files
*.so
*.o
*.xls*
*.doc*
*.ppt*

*.ods

*.zip
*.gz
*.tar

# Tempfiles
*.dta
*.ods
*.log
*.out
*.tex

playground/
doc/
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: netdiffuseR
Title: Analysis of Diffusion and Contagion Processes on Networks
Version: 1.20.0
Date: 2018-06-06
Version: 1.20.1
Date: 2019-03-22
Authors@R: c(
person("George", "Vega Yon", email="g.vegayon@gmail.com", role=c("aut", "cre"),
comment=c(ORCID = "0000-0002-3171-0844", what="Rewrite functions with Rcpp, plus new features")
Expand Down Expand Up @@ -39,7 +39,7 @@ Imports:
utils,
boot,
igraph,
viridis
viridisLite
Suggests:
covr,
testthat,
Expand All @@ -49,7 +49,7 @@ Suggests:
survival
VignetteBuilder: knitr
LinkingTo: Rcpp, RcppArmadillo
RoxygenNote: 6.0.1.9000
RoxygenNote: 6.1.1
Encoding: UTF-8
URL: https://github.com/USCCANA/netdiffuseR,
https://USCCANA.github.io/netdiffuseR
Expand Down
4 changes: 3 additions & 1 deletion NAMESPACE
Expand Up @@ -250,6 +250,8 @@ importFrom(stats,var)
importFrom(utils,getFromNamespace)
importFrom(utils,head)
importFrom(utils,str)
importFrom(viridis,viridis_pal)
importFrom(viridisLite,inferno)
importFrom(viridisLite,magma)
importFrom(viridisLite,viridis)
importMethodsFrom(Matrix,t)
useDynLib(netdiffuseR, .registration = TRUE)
14 changes: 14 additions & 0 deletions NEWS.md
@@ -1,3 +1,17 @@
# Changes in netdiffuseR version 1.20.1 (2019-03-22)

* This version has no user level visible changes.

## Other changes

* Changing `PI` macros in C++ code as requested by RcppCore.

* Setting 3.5 seed version for tests so that test won't break following message
from CRAN.




# Changes in netdiffuseR version 1.20.0 (2018-06-06)

## New functions and features
Expand Down
2 changes: 1 addition & 1 deletion R/diffnet-methods.r
Expand Up @@ -957,7 +957,7 @@ plot_infectsuscep <- function(
xlab = "Infectiousness of ego",
ylab = "Susceptibility of ego",
sub = ifelse(logscale, "(in log-scale)", NA),
color.palette = viridis::viridis_pal(),
color.palette = function(n) viridisLite::viridis(n),
include.grid = TRUE,
exclude.zeros = FALSE,
valued = getOption("diffnet.valued",FALSE),
Expand Down
2 changes: 1 addition & 1 deletion R/imports.r
Expand Up @@ -8,7 +8,7 @@ NULL
#' @importFrom network as.edgelist is.multiplex is.directed has.loops as.network
#' get.network.attribute list.vertex.attributes
#' @importFrom networkDynamic networkDynamic network.extract network.collapse
#' @importFrom viridis viridis_pal
#' @importFrom viridisLite viridis inferno magma
NULL

#' @useDynLib netdiffuseR, .registration = TRUE
Expand Down
2 changes: 1 addition & 1 deletion R/misc.r
Expand Up @@ -132,7 +132,7 @@ drawColorKey <- function(
key.pos = c(.925,.975,.05,.95),
pos = 2,
nlevels = length(tick.marks),
color.palette = viridis::viridis(nlevels),
color.palette = viridisLite::viridis(nlevels),
tick.width = c(.01,.0075),
add.box = TRUE,
na.col = NULL,
Expand Down
2 changes: 1 addition & 1 deletion R/plot_diffnet2.r
Expand Up @@ -95,7 +95,7 @@ plot_diffnet2.default <- function(
graph,
toa,
pers = min(toa, na.rm = TRUE):max(toa, na.rm = TRUE),
color.ramp = grDevices::colorRamp(viridis::magma(20)),
color.ramp = grDevices::colorRamp(viridisLite::magma(20)),
layout = NULL,
key.width = 0.1,
key.args = list(),
Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Expand Up @@ -163,7 +163,7 @@ data("medInnovationsDiffNet")
set.seed(131)
plot_threshold(
medInnovationsDiffNet,
vertex.color = viridis::inferno(4)[medInnovationsDiffNet[["city"]]],
vertex.color = viridisLite::inferno(4)[medInnovationsDiffNet[["city"]]],
vertex.sides = medInnovationsDiffNet[["city"]] + 2,
sub = "Note: Vertices' sizes and shapes given by degree and city respectively",
jitter.factor = c(1,1), jitter.amount = c(.25,.025)
Expand Down Expand Up @@ -215,7 +215,7 @@ diffnet.toa(x) <- sample(x$toa, size = nnodes(x))
dm1 <- diffusionMap(x, layout = dm0$coords, kde2d.args=list(n=150, h=.5))
oldpar <- par(no.readonly = TRUE)
col <- viridis::plasma(100)
col <- viridisLite::plasma(100)
par(mfrow=c(1,2), oma=c(1,0,0,0), cex=.8)
image(dm0, col=col, main="Non-random Times of Adoption\nAdoption from the core.")
image(dm1, col=col, main="Random Times of Adoption")
Expand All @@ -234,11 +234,11 @@ ftable(out)
# Plotting
oldpar <- par(no.readonly = TRUE)
par(xpd=TRUE)
plot(out, color=viridis::inferno(5), las = 2, xlab="Time of Adoption",
plot(out, color=viridisLite::inferno(5), las = 2, xlab="Time of Adoption",
ylab="Threshold", main="")
# Adding key
legend("bottom", legend = levels(out$thr), fill=viridis::inferno(5), horiz = TRUE,
legend("bottom", legend = levels(out$thr), fill=viridisLite::inferno(5), horiz = TRUE,
cex=.6, bty="n", inset=c(0,-.1))
par(oldpar)
```
Expand Down

0 comments on commit a30d3eb

Please sign in to comment.