Skip to content
Browse files

documented

  • Loading branch information...
1 parent a7ce953 commit f17cdba7de0581b5c318f52591b6d85291a11052 @schloerke schloerke committed Jul 14, 2014
Showing with 8 additions and 6 deletions.
  1. +2 −2 man/ggcorr.Rd
  2. +6 −4 man/ggnet.Rd
View
4 man/ggcorr.Rd
@@ -31,7 +31,7 @@ ggcorr(data, method = "pairwise", palette = "RdYlGn", name = "rho",
\item{...}{other arguments supplied to geom_text for the diagonal labels. Arguments pertaining to the title or other items can be achieved through ggplot2 methods.}
}
\description{
-Function for making a correlation plot starting from a data matrix, using ggplot2. The function is directly inspired by Tian Zheng and Yu-Sung Su's arm::corrplot function. Please visit \link{http://github.com/briatte/ggcorr} for the latest development and descriptions about ggcorr.
+Function for making a correlation plot starting from a data matrix, using ggplot2. The function is directly inspired by Tian Zheng and Yu-Sung Su's arm::corrplot function. Please visit \url{http://github.com/briatte/ggcorr} for the latest development and descriptions about ggcorr.
}
\examples{
# Basketball statistics provided by Nathan Yau at Flowing Data.
@@ -43,7 +43,7 @@ ggcorr(nba[, -1],
label = TRUE,
label_alpha = TRUE,
name = "") +
- theme(legend.position = "bottom")
+ ggplot2::theme(legend.position = "bottom")
# Custom options.
ggcorr(
nba[, -1],
View
10 man/ggnet.Rd
@@ -45,6 +45,8 @@ ggnet(net, mode = "fruchtermanreingold", layout.par = NULL, size = 12,
\item{label.nodes}{label nodes with their vertex names attribute. If set to \code{TRUE}, all nodes are labelled. Also accepts a vector of character strings to match with vertex names.}
+\item{label.size}{size of the labels. Defaults to \code{size / 2}.}
+
\item{top8.nodes}{use the top 8 nodes as node groups, colored with \code{"Set1"}. The rest of the network will be plotted as the ninth (grey) group. Experimental.}
\item{trim.labels}{removes '@', 'http://', 'www.' and the ending '/' from vertex names. Cleans up labels for website and Twitter networks. Defaults to \code{TRUE}.}
@@ -73,16 +75,16 @@ nw.mat <- matrix(0, nrow = x, ncol = x)
dimnames(nw.mat) <- list(1:x, 1:x)
nw.mat[row(nw.mat) != col(nw.mat)] <- runif(ndyads) < density
nw.mat
-rnd <- network(nw.mat)
+rnd <- network::network(nw.mat)
rnd
# random network
-pRnd <- ggnet(rnd, label = TRUE, alpha = 1, color = "white", segment.color = "grey10")
+pRnd <- ggnet(rnd, label.nodes = TRUE, alpha = 1, color = "white", segment.color = "grey10")
# pRnd
# random groups
category = LETTERS[rbinom(x, 4, .5)]
-ggnet(rnd, label = TRUE, color = "white", segment.color = "grey10", node.group = category)
+ggnet(rnd, label.nodes = TRUE, color = "white", segment.color = "grey10", node.group = category)
# city and service firms data from the UCIrvine Network Data Repository
url = url("http://networkdata.ics.uci.edu/netdata/data/cities.RData")
@@ -93,7 +95,7 @@ close(url)
type = cities \%v\% "type"
type = ifelse(grepl("City|Law", type), gsub("I+", "", type), "Firm")
pRnd <- ggnet(cities, mode = "kamadakawai", alpha = .2, node.group = type,
- label = c("Paris", "Beijing", "Chicago"), color = "darkred")
+ label.nodes = c("Paris", "Beijing", "Chicago"), color = "darkred")
# pRnd
}
\author{

0 comments on commit f17cdba

Please sign in to comment.
Something went wrong with that request. Please try again.