Doug's R package installation list
From InterSciWiki
Contents |
[edit] Learning how to be the right packages installed
You might find a needed package at the menu bar by clicking 'Packages' and then 'Load Packages.' If not then on the drop down menu click 'Install package(s)' - e.g.,
utils
help(utils) #(see index of functions: one of them is update.packages)
update.packages
help(ergm)
Warning message:
In print.help_files_with_topic("C:/PROGRA~1/R/R-26~1.2/library/ergm/chm/ergm") :
No CHM help for 'ergm' in package 'ergm' is available: the CHM file for the package is missing
help(network) #gives me help
help(igraph) #no help --> says "No documentation for 'igraph' in specified packages and libraries: you could try 'help.search("igraph")'
help.search("igraph") #no help --> not installed ? tells me this might be foreign
install(igraph) #says Error: could not find function "install" -- install from main menu "Packages"
#went to main menu 2008/02/21 abd installed igraph (not test with Peter McMahan
search() # will show all installed packages - at this point I have
[1] ".GlobalEnv" "package:ergm" "package:network" "package:stats" "package:graphics" "package:grDevices"
[7] "package:utils" "package:datasets" "package:methods" "Autoloads" "package:base"
example(cohesive.blocks) #From Peter McMahan doesn't work because I haven't installed "Digest"
help.search(digest) # no response
#so installed from Main menu packages - response
package 'digest' successfully unpacked and MD5 sums checked
The downloaded packages are in
C:\Documents and Settings\User\Local Settings\Temp\RtmpcQ4U1C\downloaded_packages
updating HTML package descriptions
> help(digest) #No documentation for 'digest' in specified packages and libraries: you could try 'help.search("digest")'
> help.search(digest) #Error in help.search(digest) : object "digest" not found
#The problem wasnt here tho but that I hadnt locally installed igraph:
library(igraph) #NOW example(cohesive.blocks) works
example(cohesive.blocks) #that all works
#installed statnet from Main Menu
#Says: also installing the dependencies ‘scatterplot3d’, ‘rgl’, ‘abind’, ‘shapes’, ‘latentnet’, ‘degreenet’, ‘sna’
search() #results ok
[edit] My installation order
- Network
- iGraph Drawing graphs - see IGraph updates
- Attaching package: 'igraph'
The following object(s) are masked from package:network :
%c%,
add.edges,
add.vertices,
delete.edges,
delete.vertices,
get.edge.attribute,
get.edges,
get.vertex.attribute,
is.directed,
list.edge.attributes,
list.vertex.attributes,
set.edge.attribute,
set.vertex.attribute
- digest - needed to do cohesive.blocks Peter McMahan - Structural Cohesion instructions, needs iGraph - see Graph updates
- install.packages("ergm",contriburl="http://www.csde.washington.edu/~handcock") #for Running the simple model for complex networks with arbitrary degree distribution and clustering in R
help.search("install")
installFoundDepends(tools) A function to install unresolved dependencies installed.packages(utils) Find Installed Packages remove.packages(utils) Remove Installed Packages update.packages(utils) Download Packages from CRAN-like repositories INSTALL(utils) Install Add-on Packages from Sources
[edit] Package commands
On Windows install.packages can also install a binary package from a local zip file by setting argument repos to NULL. Rgui.exe has a menu Packages with a GUI interface to install.packages, update.packages and library.
I need to update statnet and maybe latentnet -- hopefully will contain hetdata as well.
library() #---- tells you what packages are installed.
Default
grid The Grid Graphics Package
KernSmooth Functions for kernel smoothing for Wand & Jones
(1995)
lattice Lattice Graphics
MASS Main Package of Venables and Ripley's MASS
methods Formal Methods and Classes
mgcv GAMs with GCV smoothness estimation and GAMMs
by REML/PQL
network Classes for Relational Data
nlme Linear and Nonlinear Mixed Effects Models
nnet Feed-forward Neural Networks and Multinomial
Log-Linear Models
rcompgen Completion generator for R
rpart Recursive Partitioning
spatial Functions for Kriging and Point Pattern
Analysis
splines Regression Spline Functions and Classes
stats The R Stats Package
stats4 Statistical Functions using S4 Classes
survival Survival analysis, including penalised
likelihood.
tcltk Tcl/Tk Interface
tools Tools for Package Development
utils The R Utils Package
R Library: Introduction to bootstrapping -- exists, doesnt open
[edit] Installed
installed.packages()
Package LibPath Version base "base" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" boot "boot" "C:/PROGRA~1/R/R-26~1.2/library" "1.2-30" class "class" "C:/PROGRA~1/R/R-26~1.2/library" "7.2-40" cluster "cluster" "C:/PROGRA~1/R/R-26~1.2/library" "1.11.9" codetools "codetools" "C:/PROGRA~1/R/R-26~1.2/library" "0.1-3" datasets "datasets" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" digest "digest" "C:/PROGRA~1/R/R-26~1.2/library" "0.3.1" ergm "ergm" "C:/PROGRA~1/R/R-26~1.2/library" "2.0-6" foreign "foreign" "C:/PROGRA~1/R/R-26~1.2/library" "0.8-23" graphics "graphics" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" grDevices "grDevices" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" grid "grid" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" igraph "igraph" "C:/PROGRA~1/R/R-26~1.2/library" "0.5" KernSmooth "KernSmooth" "C:/PROGRA~1/R/R-26~1.2/library" "2.22-22" lattice "lattice" "C:/PROGRA~1/R/R-26~1.2/library" "0.17-4" MASS "MASS" "C:/PROGRA~1/R/R-26~1.2/library" "7.2-40" methods "methods" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" mgcv "mgcv" "C:/PROGRA~1/R/R-26~1.2/library" "1.3-29" network "network" "C:/PROGRA~1/R/R-26~1.2/library" "1.3" nlme "nlme" "C:/PROGRA~1/R/R-26~1.2/library" "3.1-86" nnet "nnet" "C:/PROGRA~1/R/R-26~1.2/library" "7.2-40" rcompgen "rcompgen" "C:/PROGRA~1/R/R-26~1.2/library" "0.1-17" rpart "rpart" "C:/PROGRA~1/R/R-26~1.2/library" "3.1-38" spatial "spatial" "C:/PROGRA~1/R/R-26~1.2/library" "7.2-40" splines "splines" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" stats "stats" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" stats4 "stats4" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" survival "survival" "C:/PROGRA~1/R/R-26~1.2/library" "2.34" tcltk "tcltk" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" tools "tools" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2" utils "utils" "C:/PROGRA~1/R/R-26~1.2/library" "2.6.2"
- Priority Bundle Contains
base "base" NA NA boot "recommended" NA NA class "recommended" "VR" "MASS class nnet spatial" cluster "recommended" NA NA codetools "recommended" NA NA datasets "base" NA NA digest NA NA NA ergm NA NA NA foreign "recommended" NA NA graphics "base" NA NA grDevices "base" NA NA grid "base" NA NA igraph NA NA NA KernSmooth "recommended" NA NA lattice "recommended" NA NA MASS "recommended" "VR" "MASS class nnet spatial" methods "base" NA NA mgcv "recommended" NA NA network NA NA NA nlme "recommended" NA NA nnet "recommended" "VR" "MASS class nnet spatial" rcompgen "recommended" NA NA rpart "recommended" NA NA spatial "recommended" "VR" "MASS class nnet spatial" splines "base" NA NA stats "base" NA NA stats4 "base" NA NA survival "recommended" NA NA tcltk "base" NA NA tools "base" NA NA utils "base" NA NA
- Depends
base NA boot "R (>= 2.4.0), graphics, stats" class "R (>= 2.4.0), grDevices, graphics, stats, utils" cluster "R (>= 2.2.1), stats, graphics, utils" codetools "R (>= 2.1)" datasets NA digest "R (>= 2.4.1)" ergm "network" foreign "R (>= 2.6.0), stats" graphics NA grDevices NA grid NA igraph "stats" KernSmooth "R (>= 2.5.0), stats" lattice "R (>= 2.5.0)" MASS "R (>= 2.4.0), grDevices, graphics, stats, utils" methods NA mgcv "R (>= 2.3.0)" network "R (>= 2.0.0), utils" nlme "graphics, stats, R (>= 2.4.0)" nnet "R (>= 2.4.0), grDevices, graphics, stats, utils" rcompgen "R (>= 2.5.0)" rpart "R (>= 2.4.0), graphics, stats, grDevices" spatial "R (>= 2.4.0), grDevices, graphics, stats, utils" splines NA stats NA stats4 "methods, graphics, stats" survival "stats, utils, graphics, splines, R (>= 2.0.0)" tcltk NA tools NA utils NA
- Imports
base NA boot NA class NA cluster NA codetools NA datasets NA digest NA ergm NA foreign "methods, utils" graphics "grDevices" grDevices NA grid "grDevices" igraph NA KernSmooth NA lattice "grid, grDevices, graphics, stats, utils" MASS NA methods "utils" mgcv "graphics, stats" network NA nlme "lattice" nnet NA rcompgen "utils, methods" rpart NA spatial NA splines "graphics, stats" stats NA stats4 NA survival NA tcltk NA tools NA utils NA
- Suggests Built
base NA "2.6.2" boot "survival" "2.6.2" class "lattice, nlme, survival" "2.6.2" cluster NA "2.6.2" codetools NA "2.6.2" datasets NA "2.6.2" digest NA "2.6.0" ergm "coda, KernSmooth, sna" "2.6.2" foreign NA "2.6.2" graphics NA "2.6.2" grDevices NA "2.6.2" grid "lattice" "2.6.2" igraph "stats4, rgl, tcltk, RSQLite, digest" "2.6.2" KernSmooth "MASS" "2.6.2" lattice "grid" "2.6.2" MASS "lattice, nlme, survival" "2.6.2" methods NA "2.6.2" mgcv "nlme (>= 3.1-64), MASS (>= 7.2-2)" "2.6.2" network "sna, statnet" "2.6.2" nlme NA "2.6.2" nnet "lattice, nlme, survival" "2.6.2" rcompgen NA "2.6.2" rpart "survival" "2.6.2" spatial "lattice, nlme, survival" "2.6.2" splines NA "2.6.2" stats NA "2.6.2" stats4 NA "2.6.2" survival NA "2.6.2" tcltk NA "2.6.2" tools NA "2.6.2" utils NA "2.6.2"
[edit] Old ergm package
library(ergm)
Loading required package: network Classes for Relational Data Version 1.3 created on January 31, 2008. copyright (c) 2005, Carter T. Butts, University of California-Irvine
Mark S. Handcock, University of Washington
David R. Hunter, Penn State University
Martina Morris, University of Washington
For citation information, type citation("network"). Type help(package="network-package") to get started.
ergm: Fit, Simulate and Diagnose Exponential-Family Models for Networks Version 2.0-6 created on February 17, 2008 copyright (c) 2003, Mark S. Handcock, University of Washington
David R. Hunter, Penn State University
Carter T. Butts, University of California-Irvine
Steven M. Goodreau, University of Washington
Martina Morris, University of Washington
Type help(package="ergm") to get started.
Based on "statnet" project software (http://statnetproject.org).
For license and citation information see http://statnetproject.org/attribution or type citation("ergm").
[edit] New ergm and example
Running the simple model for complex networks with arbitrary degree distribution and clustering in R
From Mark S. Handcock: You need:
install.packages("ergm",contriburl="http://www.csde.washington.edu/~handcock")
examplesimmeltie.r
source("C:\\Program Files\\R\\R-2.6.2\\Handcock_Simmel\\examplesimmeltie.r") Error in library(netdata) : there is no package called 'netdata'
ERRORS:
> install.packages("ergm",contriburl="http://www.csde.washington.edu/~handcock")
Warning: package 'ergm' is in use and will not be installed
> update.packages("ergm",contriburl="http://www.csde.washington.edu/~handcock")
Warning message:
In list.files(lib) : list.files: 'ergm' is not a readable directory
> update("ergm",contriburl="http://www.csde.washington.edu/~handcock")
Error in update.default("ergm", contriburl = "http://www.csde.washington.edu/~handcock") :
need an object with call component
In addition: Warning message:
In object$call : $ operator is invalid for atomic vectors, returning NULL
#careful: egrm already installed: help(ergm) #gives me output
update.packages("ergm",contriburl="http://www.csde.washington.edu/~handcock")
install.packages("ergm",contriburl="http://www.csde.washington.edu/~handcock")
Supplem. Ref: Inference in curved exponential family models for networks. David R. Hunter. Mark S. Handcock. November 3, 2005. Abstract ...
