[Rsiena-commits] r203 - in pkg: RSiena RSiena/R RSiena/man RSiena/src RSiena/tests RSienaTest RSienaTest/R RSienaTest/doc RSienaTest/man RSienaTest/src RSienaTest/tests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Feb 19 20:24:53 CET 2012
Author: ripleyrm
Date: 2012-02-19 20:24:53 +0100 (Sun, 19 Feb 2012)
New Revision: 203
Modified:
pkg/RSiena/DESCRIPTION
pkg/RSiena/R/robmon.r
pkg/RSiena/R/zzz.R
pkg/RSiena/changeLog
pkg/RSiena/man/RSiena-package.Rd
pkg/RSiena/src/siena07setup.cpp
pkg/RSiena/tests/scripts.Rout.save
pkg/RSienaTest/DESCRIPTION
pkg/RSienaTest/R/robmon.r
pkg/RSienaTest/R/zzz.R
pkg/RSienaTest/changeLog
pkg/RSienaTest/doc/RSiena_Manual.tex
pkg/RSienaTest/man/RSiena-package.Rd
pkg/RSienaTest/src/siena07setup.cpp
pkg/RSienaTest/tests/scripts.Rout.save
Log:
Minor fix to ML
Modified: pkg/RSiena/DESCRIPTION
===================================================================
--- pkg/RSiena/DESCRIPTION 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSiena/DESCRIPTION 2012-02-19 19:24:53 UTC (rev 203)
@@ -1,8 +1,8 @@
Package: RSiena
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.202
-Date: 2012-02-10
+Version: 1.0.12.203
+Date: 2012-02-19
Author: Various
Depends: R (>= 2.10.0)
Imports: Matrix
Modified: pkg/RSiena/R/robmon.r
===================================================================
--- pkg/RSiena/R/robmon.r 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSiena/R/robmon.r 2012-02-19 19:24:53 UTC (rev 203)
@@ -49,6 +49,18 @@
#######################################################
if (useCluster)
{
+ ## check the version has not been updated since we started R: possible
+ ## on linux and Mac. Not very stringent check, as environment
+ ## variables or path could lead to different R or different RSiena.
+ packageVersion <- packageDescription(pkgname,
+ fields=c("Version", "Date"))
+ if (packageVersion$Version != pkgvers$Version ||
+ packageVersion$Date != pkgvers$Date)
+
+ {
+ stop(c("Incompatible RSiena versions for sub process: exit R ",
+ "and restart"))
+ }
# if (!is.null(x$FRANname) && x$FRANname != "simstats0c")
# {
# stop("Multiple processors only for simstats0c at present")
Modified: pkg/RSiena/R/zzz.R
===================================================================
--- pkg/RSiena/R/zzz.R 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSiena/R/zzz.R 2012-02-19 19:24:53 UTC (rev 203)
@@ -15,7 +15,10 @@
## or .onAttach?
##@pkgpath Objects/Path Path for installation of siena.exe
pkgpath <- ''
+##@pkgname Objects/Package name of package (RSiena or RSienaTest)
pkgname <- ""
+##@pkgversion Objects/Package version of package
+pkgvers <- ""
##@.onLoad Miscellaneous Start-up processing
.onLoad <- function(libname,pkgname){
# dllpath <<- if (nzchar(.Platform$r_arch))
@@ -28,6 +31,7 @@
imagepath <<- file.path(libname, pkgname, paste('ilcampo.gif'))
pkgpath<<- file.path(libname, pkgname)
pkgname <<- pkgname
+ pkgvers <<- utils::packageDescription(pkgname, fields=c("Version", "Date"))
#cat(pkgname,pkgpath,'\n')
## csvpath<<- file.path(libname,pkgname)
# library.dynam("RSiena",package=pkgname)
Modified: pkg/RSiena/changeLog
===================================================================
--- pkg/RSiena/changeLog 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSiena/changeLog 2012-02-19 19:24:53 UTC (rev 203)
@@ -1,3 +1,13 @@
+2012-02-19 R-forge revision 203
+
+ * src/siena07setup.cpp: initialize permutation length correctly in
+ setup phase of ML.
+ * R/robmon.r, R/zzz.r: add check for same package if using
+ multiple processes.
+ * doc/RSiena_manual.tex: 1) removed details about snow and rlecuyer
+ packages 2) amended code to make sparse matrices. (RSienaTest only)
+ * tests/scripts.Rout.save: update for reduced diffs.
+
2012-02-10 R-forge revision 202 (RSienaTest only)
* doc/RSienaDeveloper.tex: updated various details. Reformatted pages
Modified: pkg/RSiena/man/RSiena-package.Rd
===================================================================
--- pkg/RSiena/man/RSiena-package.Rd 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSiena/man/RSiena-package.Rd 2012-02-19 19:24:53 UTC (rev 203)
@@ -30,8 +30,8 @@
\tabular{ll}{
Package: \tab RSiena\cr
Type: \tab Package\cr
-Version: \tab 1.0.12.202\cr
-Date: \tab 2012-02-10\cr
+Version: \tab 1.0.12.203\cr
+Date: \tab 2012-02-19\cr
License: \tab GPL-2 \cr
LazyLoad: \tab yes\cr
}
Modified: pkg/RSiena/src/siena07setup.cpp
===================================================================
--- pkg/RSiena/src/siena07setup.cpp 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSiena/src/siena07setup.cpp 2012-02-19 19:24:53 UTC (rev 203)
@@ -726,6 +726,9 @@
pMLSimulation->
missingBehaviorProbability(prmib[periodFromStart]);
+ pMLSimulation->currentPermutationLength(
+ pModel->currentPermutationLength(period));
+
/* initialize the chain: this also initializes the data */
// does not initialise with previous period missing values yet
pMLSimulation->pChain()->clear();
Modified: pkg/RSiena/tests/scripts.Rout.save
===================================================================
--- pkg/RSiena/tests/scripts.Rout.save 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSiena/tests/scripts.Rout.save 2012-02-19 19:24:53 UTC (rev 203)
@@ -2,7 +2,7 @@
R version 2.14.1 (2011-12-22)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
-Platform: i386-apple-darwin9.8.0/i386 (32-bit)
+Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
@@ -18,7 +18,6 @@
> #print(Sys.getenv("RSIENA_TESTING"))
> #print(.libPaths())
-> if(!nzchar(Sys.getenv("RSIENA_TESTING"))) q("no")
>
> runone <- function(f)
+ {
@@ -70,14 +69,6 @@
+ file.append("scriptfile.R", f)
+ }
+ }
->
-> ## now run it
-> res <- 0L
-> runone("scriptfile.R")
- Running 'scriptfile.R'
-[1] 0
->
-> ## now look at the differences
> ## code within extra braces because we execute it in batch mode
> {if (.Platform$OS.type == "windows")
+ {
@@ -87,34 +78,5 @@
+ {
+ previousFile <- "scriptfile.Rout.save"
+ }}
-> #system("diff scriptfile.Rout scriptfile.Rout.save")
> library(tools)
-> Rdiff("scriptfile.Rout", previousFile)
-
-490c490
-< Packaged: 2012-01-20 15:00:55 UTC; ruth
----
-> Packaged: 2012-01-20 14:53:50 UTC; ruth
-492c492
-< 15:01:02 UTC; unix
----
-> 14:54:06 UTC; unix
-2686c2686
-< % Fri Jan 20 15:04:14 2012
----
-> % Fri Jan 20 14:57:23 2012
-2714c2714
-< <!-- Fri Jan 20 15:04:14 2012 -->
----
-> <!-- Fri Jan 20 14:57:23 2012 -->
-[1] 1
->
-> proc.time()
- user system elapsed
- 86.492 0.276 88.932
->
-> if (res > 0)
-+ {
-+ stop("scripts failed")
-+ }
->
+> if(!nzchar(Sys.getenv("RSIENA_TESTING"))) q("no")
Modified: pkg/RSienaTest/DESCRIPTION
===================================================================
--- pkg/RSienaTest/DESCRIPTION 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/DESCRIPTION 2012-02-19 19:24:53 UTC (rev 203)
@@ -1,8 +1,8 @@
Package: RSienaTest
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.202
-Date: 2012-02-10
+Version: 1.0.12.203
+Date: 2012-02-19
Author: Various
Depends: R (>= 2.10.0)
Imports: Matrix
Modified: pkg/RSienaTest/R/robmon.r
===================================================================
--- pkg/RSienaTest/R/robmon.r 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/R/robmon.r 2012-02-19 19:24:53 UTC (rev 203)
@@ -49,6 +49,18 @@
#######################################################
if (useCluster)
{
+ ## check the version has not been updated since we started R: possible
+ ## on linux and Mac. Not very stringent check, as environment
+ ## variables or path could lead to different R or different RSiena.
+ packageVersion <- packageDescription(pkgname,
+ fields=c("Version", "Date"))
+ if (packageVersion$Version != pkgvers$Version ||
+ packageVersion$Date != pkgvers$Date)
+
+ {
+ stop(c("Incompatible RSiena versions for sub process: exit R ",
+ "and restart"))
+ }
# if (!is.null(x$FRANname) && x$FRANname != "simstats0c")
# {
# stop("Multiple processors only for simstats0c at present")
Modified: pkg/RSienaTest/R/zzz.R
===================================================================
--- pkg/RSienaTest/R/zzz.R 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/R/zzz.R 2012-02-19 19:24:53 UTC (rev 203)
@@ -15,7 +15,10 @@
## or .onAttach?
##@pkgpath Objects/Path Path for installation of siena.exe
pkgpath <- ''
+##@pkgname Objects/Package name of package (RSiena or RSienaTest)
pkgname <- ""
+##@pkgversion Objects/Package version of package
+pkgvers <- ""
##@.onLoad Miscellaneous Start-up processing
.onLoad <- function(libname,pkgname){
# dllpath <<- if (nzchar(.Platform$r_arch))
@@ -28,6 +31,7 @@
imagepath <<- file.path(libname, pkgname, paste('ilcampo.gif'))
pkgpath<<- file.path(libname, pkgname)
pkgname <<- pkgname
+ pkgvers <<- utils::packageDescription(pkgname, fields=c("Version", "Date"))
#cat(pkgname,pkgpath,'\n')
## csvpath<<- file.path(libname,pkgname)
# library.dynam("RSiena",package=pkgname)
Modified: pkg/RSienaTest/changeLog
===================================================================
--- pkg/RSienaTest/changeLog 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/changeLog 2012-02-19 19:24:53 UTC (rev 203)
@@ -1,3 +1,13 @@
+2012-02-19 R-forge revision 203
+
+ * src/siena07setup.cpp: initialize permutation length correctly in
+ setup phase of ML.
+ * R/robmon.r, R/zzz.r: add check for same package if using
+ multiple processes.
+ * doc/RSiena_manual.tex: 1) removed details about snow and rlecuyer
+ packages 2) amended code to make sparse matrices. (RSienaTest only)
+ * tests/scripts.Rout.save: update for reduced diffs.
+
2012-02-10 R-forge revision 202 (RSienaTest only)
* doc/RSienaDeveloper.tex: updated various details. Reformatted pages
Modified: pkg/RSienaTest/doc/RSiena_Manual.tex
===================================================================
--- pkg/RSienaTest/doc/RSiena_Manual.tex 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/doc/RSiena_Manual.tex 2012-02-19 19:24:53 UTC (rev 203)
@@ -361,7 +361,7 @@
Start \Rn, click on \sfn{Packages} and
then on \sfn{Install packages(s)...}. You will be prompted to select a mirror
for download. Then select the packages \sfn{xtable},
- \sfn{network}, \sfn{rlecuyer}, \sfn{snow},
+ \sfn{network}
and \rs. (There may be later zipped version of \RS available on our web
site: to install this, use \sfn{Install package(s) from local zip files}, and
select \sfn{RSiena.zip} (with the appropriate version number in the file
@@ -480,9 +480,7 @@
\sfn{ library(RSiena)}\\
The other packages will be loaded as required, but if you wish to examine them
or use other facilities from them you can load them using:\\
-\sfn{ library(snow)}\\
\sfn{ library(network)}\\
-\sfn{ library(rlecuyer)}\\
The following command
will give a review of
the functions that \RS offers:\\
@@ -677,8 +675,7 @@
\begin{enumerate}
\item Install \Rn.
\item Install (within \Rn) the package \rs, and
- possibly \sfn{network} (required to read Pajek files), \sfn{snow} and
- \sfn{rlecuyer} (required to use multiple processes).
+ possibly \sfn{network} (required to read Pajek files).
\item Set the working directory of \R appropriately (\sfn{setwd()} within \Rn
or via a desktop shortcut).
\item You can get help by the command
@@ -884,9 +881,13 @@
directories on each, simply set \sfn{clusterString} to a character vector of
the names of the machines.
\item For other cases, e.g.\ using Macs alongside Linux,
- see the documentation for the package \sfn{snow}.
+ see the documentation for the package \sfn{parallel}.
-\item Currently \RS uses sockets for inter-process communication.
+\item \RS uses sockets for inter-process communication.
+\item On Windows, sub processes are always started using \R scripts. On Linux
+ and Mac there is an option available in \R version 2.14.0 or later via the
+ code interface to \sfn{siena07} to ask for the sub processes to be formed by
+ forking. See the help page for details.
\item Each process needs a copy of the data in memory. If there is insufficient
memory available there will be no speed gain as too much time will be spent
paging.
@@ -1194,7 +1195,7 @@
the same results can be obtained as follows.
\begin{verbatim}
library(Matrix)
-tmp <- as(Matrix(a), "dgTMatrix")
+tmp <- as(a, "dgTMatrix")
edges2 <- cbind(tmp at i + 1, tmp at j + 1, tmp at x)
\end{verbatim}
Conversely, if \texttt{edges} is an edge list, then the following commands
@@ -9806,6 +9807,12 @@
repository.)
\begin{small}
\begin{itemize}
+\item 2012-02-19 R-forge revision 203
+\begin{itemize}
+\item Fixed minor bug in ML initialisation: will alter results slightly.
+\item New check for updated version when using multiple processes.
+\item Amended code in manual for making sparse matrices.
+\end{itemize}
\item 2012-02-07 R-forge revision 200
\begin{itemize}
\item Bug fix to scores for behavior variable rate effects.
Modified: pkg/RSienaTest/man/RSiena-package.Rd
===================================================================
--- pkg/RSienaTest/man/RSiena-package.Rd 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/man/RSiena-package.Rd 2012-02-19 19:24:53 UTC (rev 203)
@@ -30,8 +30,8 @@
\tabular{ll}{
Package: \tab RSiena\cr
Type: \tab Package\cr
-Version: \tab 1.0.12.202\cr
-Date: \tab 2012-02-10\cr
+Version: \tab 1.0.12.203\cr
+Date: \tab 2012-02-19\cr
License: \tab GPL-2 \cr
LazyLoad: \tab yes\cr
}
Modified: pkg/RSienaTest/src/siena07setup.cpp
===================================================================
--- pkg/RSienaTest/src/siena07setup.cpp 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/src/siena07setup.cpp 2012-02-19 19:24:53 UTC (rev 203)
@@ -731,6 +731,9 @@
pMLSimulation->
missingBehaviorProbability(prmib[periodFromStart]);
+ pMLSimulation->currentPermutationLength(
+ pModel->currentPermutationLength(period));
+
/* initialize the chain: this also initializes the data */
// does not initialise with previous period missing values yet
pMLSimulation->pChain()->clear();
Modified: pkg/RSienaTest/tests/scripts.Rout.save
===================================================================
--- pkg/RSienaTest/tests/scripts.Rout.save 2012-02-10 11:54:18 UTC (rev 202)
+++ pkg/RSienaTest/tests/scripts.Rout.save 2012-02-19 19:24:53 UTC (rev 203)
@@ -2,7 +2,7 @@
R version 2.14.1 (2011-12-22)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
-Platform: i386-apple-darwin9.8.0/i386 (32-bit)
+Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
@@ -18,7 +18,6 @@
> #print(Sys.getenv("RSIENA_TESTING"))
> #print(.libPaths())
-> if(!nzchar(Sys.getenv("RSIENA_TESTING"))) q("no")
>
> runone <- function(f)
+ {
@@ -70,14 +69,6 @@
+ file.append("scriptfile.R", f)
+ }
+ }
->
-> ## now run it
-> res <- 0L
-> runone("scriptfile.R")
- Running 'scriptfile.R'
-[1] 0
->
-> ## now look at the differences
> ## code within extra braces because we execute it in batch mode
> {if (.Platform$OS.type == "windows")
+ {
@@ -87,26 +78,5 @@
+ {
+ previousFile <- "scriptfile.Rout.save"
+ }}
-> #system("diff scriptfile.Rout scriptfile.Rout.save")
> library(tools)
-> Rdiff("scriptfile.Rout", previousFile)
-
-2685c2685
-< % Fri Jan 20 14:29:34 2012
----
-> % Fri Jan 20 14:17:42 2012
-2713c2713
-< <!-- Fri Jan 20 14:29:34 2012 -->
----
-> <!-- Fri Jan 20 14:17:42 2012 -->
-[1] 1
->
-> proc.time()
- user system elapsed
- 92.573 0.370 95.104
->
-> if (res > 0)
-+ {
-+ stop("scripts failed")
-+ }
->
+> if(!nzchar(Sys.getenv("RSIENA_TESTING"))) q("no")
More information about the Rsiena-commits
mailing list