Displaying 20 results from an estimated 8000 matches similar to: "Rprofile: distinguish between Rgui, Rterm, JGR?"
2010 May 26
2
extracat , JGR, iWidgets install problems
[Environment: Win XP, R 2.10.1]
I'm trying to install the packages JGR and iWidgets required by the
extracat package to make the interactive plots
in the package work. I've tried various things, but nothing seems to
work. Here is my most recent attempt,
followed by my sessionInfo().
Does anyone have any suggestions how to make this work?
>
> library(extracat)
Loading
2012 Jul 30
1
locked binding of setwd() in R 2.15.x causes .Rprofile to fail
[Env: Win XP, R 2.14.2, R 2.15.0]
I have a replacement function for setwd() in my .Rprofile which displays
the current R path in the R window
title. It no longer works in R 2.15.x, giving the error below. Worse,
the error prevents the rest of my
.Rprofile script from completing.
Is there some way to rescue this, i.e., preserve this behavior in
R 2.15? If not, how can I modify my script so it
2010 Jul 22
1
namespace? environment? how to manage functions?
In http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1900.html
Jim Holtman wrote:
Here is the way that I do it instead of creating a package of my
functions. I 'source' the file into an environment and then attach the
environment to keep the global from being clustered:
# read my functions into a environment
.my.env <- new.env()
sys.source('c:/perf/bin/perfmon.r',
2010 Feb 01
2
hiding/protecting utility functions in .Rprofile
[Env: WinXp, R 2.9.2]
In my .Rprofile, I define a number of utility functions I'd like to have
available in my R session, but don't want them
to be *normally* listed by ls(), or more importantly, saved if I save my
session variables/functions.
How can I do this?
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416
2009 Oct 30
1
.Rprofile replacement function setwd() causing errors
In my .Rprofile I have the following functions which display the
current directory in the main R window title bar,
and modify base::setwd() to keep this up to date. I like this because I
can always tell where I am in the file system.
cd <- function(dir) {
base::setwd(dir)
utils::setWindowTitle( short.path(base::getwd()) )
}
short.path <- function(dir, len=2) {
np
2010 Nov 25
1
Request: kronecker to get a sep= argument
kronecker, with make.dimnames=TRUE uses a hardwired sep=":" in the line
tmp <- outer(dnx[[i]], dny[[i]], FUN = "paste", sep = ":")
For an application in which dimnames arise from an n-way array, where
different dimensions have
different roles, and I would like to be able to use kronecker in the form
kronecker(A, B, make.dimnames=TRUE,
2010 Nov 29
2
R equivalent of Beaton's Sweep algorithm
I'm looking for an R equivalent of Beaton's (1964) Sweep algorithim for
partial inversion of a
matrix by pivoting.
It implemented in SAS/IML as sweep(matrix, indices), described here
http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/langref_sect266.htm
and here for python
http://adorio-research.org/wordpress/?p=262
--
Michael Friendly Email: friendly AT yorku
2011 May 16
1
dir.choose analog of file.choose
Under Windows (and maybe others) you can use file.choose() as a
substitute for an explicit file=
argument in most places.
Is there an analog for what I'll call dir.choose(), so that I can say
setwd(dir.choose())
thx,
-Michael
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele
2011 Nov 29
2
format numbers without leading or trailing 0s
A simple question, but I can't find something to do what I want:
Given: a vector of numbers, like
lambda <- c(0, 0.005, 0.01, 0.02, 0.04, 0.08)
Desired: format them in minimal space for use as plot labels, ie,
without leading or tailing 0s. For this example:
lambdaf <- c("0", .005", ".01", ".02", ".04", ".08")
--
Michael
2011 Oct 12
1
NOTE: unstated dependencies in examples
Using R 2.13.1, I am now getting the following NOTE when I run R CMD
check on my HistData
package
* checking for unstated dependencies in examples ... NOTE
'library' or 'require' calls not declared from:
gplots sp
Under R 2.12.x, I didn't get these notes.
I have ~ 25 .Rd files in this package, and AFAICS, every example uses
library or require for the
functions used;
2011 Nov 08
2
NAMESPACES for data only packages
the NEWS file for R-devel says
*
Even data-only packages without *R* code need a namespace and so may
need to be installed under *R* 2.14.0 or later.
but what should this contain? Can it simply be an empty NAMESPACE
file? I assume that data does not have to
be exported.
-Michael
--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University
2011 May 07
1
generate multiple mvrnorm samples using apply-like
I want to generate multiple multivariate normal samples with different
mean vectors
and common covariance matrix.
I can do this with a loop, but can't quite figure out how to do it with
apply and friends.
In the example below, I want values to have 3 columns: group, x, y
# number of groups, and group means
x <- jitter(seq(2,10,by=2))
y <- x + rnorm(length(x), 0, .5)
means <-
2011 Apr 08
0
Consistency of messages from R CMD {check,build,install}
A minor gripe/request: Could all R CMD package tools not at the very
least be consistent in indicating when
they are done, as in
* DONE (packagename)
or at least
* DONE
R CMD build leaves one hanging, not knowing whether it has completed or
it is time to get another coffee.
* checking for file 'C:/Documents/workspace/heplots/DESCRIPTION' ... OK
* preparing 'heplots':
*
2011 Aug 22
0
CRAN packages maintained by you
It is A Good Thing to regularize Authors and Maintainers of packages,
particularly for citation()
and toBibTex().
Could I add a suggested TODO item for the maintainer of package.skeleton
and friends to
help reinforce this for new packages:
- Please add appropriate templates for Author at R in the skeleton
DESCRIPTION file generated,
indicating the proper format as well as the use of role= to
2010 Nov 19
0
printCoefmat() for a data.frame with factors
I want to use something like printCoefmat() in a print.summary method to
print a more nicely formatted version
of the result from a summary method, but where the estimates may be
cross-classified by one or more factors.
However, printCoefmat() assumes that the labels for the parameters are
the rownames of the object, and
prints factors as integers. With one factor, I could just assign that as
2011 Jan 05
1
OT: Reprinting of Bertin's Semiology of Graphics
Aficionados of graphics may be interested to know that the English
translation (1984) of Jacques Bertin's
Semiology of Graphics has been reprinted by ESRI.
http://www.amazon.com/Semiology-Graphics-Diagrams-Networks-Maps/dp/0299090604
new edition:
http://www.amazon.com/Semiology-Graphics-Diagrams-Networks-Maps/dp/1589482611/ref=tmm_hrd_title_0
The long out-of-print 1984 edition sells for
2011 Nov 11
1
proportional area venn diagrams?
In http://finzi.psych.upenn.edu/R/Rhelp02a/archive/14637.html
some rudimentary R functions were given for drawing
proportional area venn diagrams with area of each intersection ~ the
count in a 2 x 2 x 2 table.
I'm interested in this, for another application: showing the
correlations among Y, X1, X2 using
area ~ r^2 of each pair (sometimes called a Ballantine diagram).
Before I attempt
2010 Nov 27
1
return vector of element names for vector, matrix or array
Just as as.vector() takes a vector, matrix or array and returns a
vector in row-major order,
I'd like to write a function to take such an object and return the
dimension names,
pasted with some separator, as a similar vector.
Here is something ugly cobbled together to demonstrate what I want: a
function to work
for any number of dimensions.
vecnames <- function(x, sep=':') {
2015 Jul 29
1
Installing/updating packages on a lab network
On 7/28/2015 1:32 PM, Uwe Ligges wrote:
> Just add the line
>
> R_LIBS_SITE=F:/R/library
>
> to the file R_HOME/etc/x64/Renviron.site
Thanks, Uwe
I have no way to test this and our IT people who do the installation
know nothing of R, so follow-up questions:
* There is no R_HOME/etc/x64/Renviron.site file, but there is a
R_HOME/etc/Rprofile.site I can modify and
ask them to
2015 Jul 28
2
Installing/updating packages on a lab network
I'm the faculty member in my department who advises our IT staff on the
details of installing R for
students and faculty on our Windows 7 lab network. We are about to
upgrade from R 3.1.1 to
R 3.2.1, and once that is done, this version of R and all installed
packages will be frozen in the
image that appears in C:/Program Files/R/R-3.2.1/ on every lab computer,
and this image is
refreshed