[adegenet-commits] r1092 - in www: . files files/hackLib
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Mar 20 17:04:36 CET 2013
Author: jombart
Date: 2013-03-20 17:04:35 +0100 (Wed, 20 Mar 2013)
New Revision: 1092
Added:
www/files/hackLib/
www/files/hackLib/README
www/files/hackLib/hackLib.R
Removed:
www/files/hackLib.R
Modified:
www/documentation.html
Log:
hack for lib install
Modified: www/documentation.html
===================================================================
--- www/documentation.html 2013-03-20 12:24:47 UTC (rev 1091)
+++ www/documentation.html 2013-03-20 16:04:35 UTC (rev 1092)
@@ -37,6 +37,7 @@
+
engine</a>. <br>
<br>
<br>
@@ -53,12 +54,11 @@
italic;">adegenet-basics</span></a>: introduction to the
package; accessible from R by typing <span style="font-family:
monospace; color: rgb(255, 0, 0);">vignette("adegenet-basics")</span>.<br>
- - <a
- href="files/adegenet-spca.pdf"><span
- style="font-style: italic;">adegenet-spca</span></a>: spatial
- multivariate analysis using adegenet; includes an introduction to
- spatial PCA (sPCA); accessible from R by typing <span
- style="font-family: monospace; color: rgb(255, 0, 0);">vignette("adegenet-spca")</span>.<br>
+ - <a href="files/adegenet-spca.pdf"><span style="font-style:
+ italic;">adegenet-spca</span></a>: spatial multivariate
+ analysis using adegenet; includes an introduction to spatial PCA
+ (sPCA); accessible from R by typing <span style="font-family:
+ monospace; color: rgb(255, 0, 0);">vignette("adegenet-spca")</span>.<br>
</div>
<div style="margin-left: 40px;">- <a href="files/adegenet-dapc.pdf"><span
style="font-style: italic;">adegenet-dapc</span></a>: analysis
@@ -94,18 +94,21 @@
+
1</a> [<a href="files/practical-day1.1.2-allcmd.pdf">version
with all commands</a>]<br>
> <a href="files/practical-day2.1.3.pdf">practical
+
2</a> [<a href="files/practical-day2.1.3-allcmd.pdf">version
with all commands</a>]<br>
> <a href="files/practical-day3.1.2.pdf">practical
+
3</a><br>
<br>
- MRC methodological session: Introduction to phylogenetics:<br>
@@ -128,6 +131,7 @@
- Imperial College - Master <span style="font-style: italic;">Modern
+
Epidemiology</span> / <i>Public Health</i>: <span
style="font-weight: bold;">Introduction to phylogenetics</span>.<img
style=" width: 80px; height: 37px;" alt="new"
@@ -138,6 +142,15 @@
<a href="files/usflu.annot.csv">usflu.annot.csv</a>)<br>
<br>
<br>
+ <span style="font-weight: bold; color: rgb(0, 102, 0);">Dirty
+ hacks useful for teaching</span><br>
+ - a small hack for installing R packages on computers without
+ administrative rights: <a href="files/hackLib/hackLib.R">hackLib.R</a>
+ <a href="files/hackLib/README">README</a> <img style=" width:
+ 80px; height: 37px;" alt="new" src="images/new.png" height="37"
+ width="80"><br>
+ <br>
+ <br>
<span style="font-weight: bold; color: rgb(0, 102, 0);">Mailing
lists archives </span><br>
Use the <a target="_top" href="search.html">search engine</a> to
Added: www/files/hackLib/README
===================================================================
--- www/files/hackLib/README (rev 0)
+++ www/files/hackLib/README 2013-03-20 16:04:35 UTC (rev 1092)
@@ -0,0 +1,23 @@
+
+=================================================
+ HACK TO INSTALL R PACKAGES WITHOUT ADMIN RIGHTS
+=================================================
+== AUTHOR ==
+ Thibaut Jombart, March 2013
+ tjombart at imperial.ac.uk
+
+
+
+== USAGE ==
+The function hackLib has to be loaded in R, either by copy-pasting the code of libHack.R into the R console, or by using the R command 'source' to load the file, e.g.:
+source("libHack.R")
+
+The hack is made active by typing:
+hackLib()
+
+By default, libraries will be installed in "C:/Users/Public/Rlibs" (windows systems). Other locations can be specified by the user, as an argument of the function. For instance, linux users might use:
+hackLib("~/Rlibs")
+to create a library in their home directory.
+
+Once the hack is activated, install packages normally. For instance, to install a package 'foo', simply use:
+install.packages("foo")
Added: www/files/hackLib/hackLib.R
===================================================================
--- www/files/hackLib/hackLib.R (rev 0)
+++ www/files/hackLib/hackLib.R 2013-03-20 16:04:35 UTC (rev 1092)
@@ -0,0 +1,24 @@
+
+##
+## HACK TO INSTALL R PACKAGES ON WINDOWS SYSTEMS
+## WITHOUT ADMIN RIGHTS
+##
+## Thibaut Jombart, March 2013
+## tjombart at imperial.ac.uk
+##
+## usage:
+## hackLib()
+## install.packages("foo")
+##
+hackLib <- function(myPath="C:/Users/Public/Rlibs"){
+ if(file.exists(myPath)) myPath <- paste(myPath,"Rlibs", sep="/")
+ myPath <- gsub("/+", "/", myPath)
+ if(!file.exists(myPath)){
+ if(!dir.create(myPath)) stop(paste(myPath, "could not be created."))
+ }
+
+ .libPaths(myPath)
+ cat(paste("\nR library set to:",myPath,"\n"))
+ if(as.numeric(file.info(myPath)$mode)<500) warning(paste(myPath, "may not be 'writable'."))
+ return(invisible())
+}
Deleted: www/files/hackLib.R
===================================================================
--- www/files/hackLib.R 2013-03-20 12:24:47 UTC (rev 1091)
+++ www/files/hackLib.R 2013-03-20 16:04:35 UTC (rev 1092)
@@ -1,24 +0,0 @@
-
-##
-## HACK TO INSTALL R PACKAGES ON WINDOWS SYSTEMS
-## WITHOUT ADMIN RIGHTS
-##
-## Thibaut Jombart, March 2013
-## tjombart at imperial.ac.uk
-##
-## usage:
-## hackLib()
-## install.packages("foo")
-##
-hackLib <- function(myPath="C:/Users/Public/Rlibs"){
- if(file.exists(myPath)) myPath <- paste(myPath,"Rlibs", sep="/")
- myPath <- gsub("/+", "/", myPath)
- if(!file.exists(myPath)){
- if(!dir.create(myPath)) stop(paste(myPath, "could not be created."))
- }
-
- .libPaths(myPath)
- cat(paste("\nR library set to:",myPath,"\n"))
- if(as.numeric(file.info(myPath)$mode)<500) warning(paste(myPath, "may not be 'writable'."))
- return(invisible())
-}
More information about the adegenet-commits
mailing list