Ronaldo Reis Junior said the following on 8/14/2007 7:08 AM:
Hi,
I use panel.points to add points to a xyplot graphic. But I like to use the
sunflowerplot to plot my points because this is very superimposed. It is
possible to use this? I try but it dont work directly. It may be need to
Try
weights = as.numeric(total)
BTW, there is a SIG (Special Interest Group) for lmer.
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
HTH,
--sundar
Chris O'Brien said the following on 8/14/2007 11:00 AM:
Dear R users,
Prof. Ripley just corrected my understanding of the use of
Ronaldo Reis Junior said the following on 8/5/2007 6:18 AM:
Hi,
it is possible to setup trellis.device(color=F) inside teh function xyplot?
I try to use
xyplot(ocup~tempo|
nitro+estacao,col=white,ylim=c(0,0.7),par.settings=list(color=F))
But dont work, the only way that work for
Dennis Fisher said the following on 7/30/2007 6:25 AM:
Colleagues,
I am using R 2.5.1 on an Intel Mac (OS 10) to create PDF outputs
using pdf(); same problem exists in Linux (RedHat 9)
While adding text to the document with text() and mtext(), I
encounter the following problem:
Dylan Beaudette said the following on 7/25/2007 11:18 AM:
Hi,
I am able to reverse the order of plotting on regular plots (i.e. with the
plot() function) by manually setting the xlim variable.
Is there some trick like this which will work for a boxplot?
* for example:
l -
Michael Hoffman said the following on 7/10/2007 7:06 AM:
barchart(Titanic, stack=F) produces a very nice horizontal barchart.
Each panel has four groups of two bars.
barchart(Titanic, stack=F, horizontal=F) doesn't produce the results I
would have expected, as it produces this warning
Felipe Carrillo said the following on 7/10/2007 7:58 AM:
Date Fo Co6/27/2007 57.1 13.96/28/2007 57.7 14.3
6/29/2007 57.8 14.36/30/2007 57 13.97/1/2007 57.1 13.9
7/2/2007 57.2 14.07/3/2007 57.3 14.17/4/2007 57.6 14.2
7/5/2007 58
Atte Tenkanen said the following on 7/7/2007 8:41 AM:
Dear R users,
I wonder if it is possible to form a function from a character string. Here
is an example:
x=3
`-`(`+`(`^`(x,3),`^`(x,2)),1) # Here is my function evaluated.
[1] 35
Brian Wilfley said the following on 6/21/2007 2:44 PM:
Hi folks,
I'm using R 2.5.0 under ESS under Windows XP. (This also happens using
the Rgui application.)
I'm trying to add lines to a plot originally made with boxplot, but
the lines appear in the wrong place. Below is a script that
Hi, Greg,
type = 'b' won't work according to ?locator. Try type = 'o'.
HTH,x
--sundar
Greg Snow said the following on 6/13/2007 7:27 AM:
Does
locator(type='l')
(or type ='b')
Work for you?
-Original Message-
From: ryestone [EMAIL PROTECTED]
To:
Tim Bergsma said the following on 6/8/2007 5:57 AM:
Suppose I have a list of logicals, such as returned by lapply:
Theoph$Dose[1] - NA
Theoph$Time[2] - NA
Theoph$conc[3] - NA
lapply(Theoph,is.na)
Is there a direct way to execute logical or across all vectors? The
following gives the
Hi, all,
This is for R-2.5.0 on WinXP and in particular RGui.
I'm trying to teach some colleagues of mine R and rather than impose
Xemacs/ESS upon them I decided to simply start by showing them RGui.
When R is installed, R workspaces (.RData) are automatically registered
so that I can
)
}
stop(msg)
}
Sundar Dorai-Raj wrote:
Hi, All,
I'm writing a wrapper for stop that produces a popup window using tcltk.
Something like:
error - function(...) {
msg - paste(..., sep = )
if(!length(msg)) msg -
if(require(tcltk, quiet = TRUE)) {
tt - tktoplevel
Hi, Vladimir,
Sorry, didn't see this reply. .Traceback - NULL doesn't work because of
the warning in ?traceback.
Warning:
It is undocumented where '.Traceback' is stored nor that it is
visible, and this is subject to change. Prior to R 2.4.0 it was
stored in the workspace,
Martin Henry H. Stevens said the following on 5/31/2007 9:59 AM:
Hi Folks,
How do I get red bold font on my y axis and black standard font on my
x axis?
plot(runif(10), ylab=Red, Bold?, xlab=Black, standard?)
Any pointers or examples would be great.
Thanks!
Hank
Dr. Hank
the following on 5/31/2007 7:51 AM:
Hi sundar --
maybe
myerr - function(err) err$call
foo - function() stop()
tryCatch({ foo() }, error=myerr)
foo()
suggests a way to catch errors without having to change existing code
or re-invent stop?
Martin
Sundar Dorai-Raj [EMAIL PROTECTED
Thanks! That's the answer I was looking for.
--sundar
Ismail Onur Filiz said the following on 5/31/2007 12:23 PM:
Hi,
On Wednesday 30 May 2007 14:53:28 Sundar Dorai-Raj wrote:
error - function(...) {
msg - paste(..., sep = )
if(!length(msg)) msg -
if(require(tcltk, quiet = TRUE
Ismail Onur Filiz said the following on 5/31/2007 1:03 PM:
Sorry for replying to myself, but:
On Thursday 31 May 2007 12:23:12 Ismail Onur Filiz wrote:
Hi,
On Wednesday 30 May 2007 14:53:28 Sundar Dorai-Raj wrote:
error - function(...) {
msg - paste(..., sep = )
if(!length(msg
Nitin Jain said the following on 5/30/2007 8:12 AM:
Hello,
I would like to get the scales of y-axes dependent only on the data points in
a particular panel. Have attached a test example below.
When using 'relation=free', it does not make the scales 'free', however
when using
Hi, All,
I'm writing a wrapper for stop that produces a popup window using tcltk.
Something like:
error - function(...) {
msg - paste(..., sep = )
if(!length(msg)) msg -
if(require(tcltk, quiet = TRUE)) {
tt - tktoplevel()
tkwm.title(tt, Error)
tkmsg - tktext(tt, bg =
Hi, Andrew,
Looks like you're reading the data incorrectly. If using ?read.table or
the like, try to add a na.strings = c(NA, NaN) argument. Second,
Bert's comment: use ?is.nan, rather than ==.
--sundar
Andrew Yee said the following on 5/29/2007 3:39 PM:
Okay, it turns out that there were
I would also suggest Paul Murrell's book R Graphics.
http://www.amazon.com/Graphics-Computer-Science-Data-Analysis/dp/158488486X/
--sundar
Tyler Smith said the following on 5/27/2007 1:27 PM:
On 2007-05-27, Adrian Dragulescu [EMAIL PROTECTED] wrote:
Check the documentation link from
You need not buy Acrobat. There are two free software programs that will
compress pdf files:
http://www.cutepdf.com
http://www.cs.wisc.edu/~ghost/ (and in particular GSView)
They both allow several levels of compression.
Thanks,
--sundar
Chabot Denis said the following on 5/22/2007 3:32 AM:
Thompson, Valeria V said the following on 5/16/2007 12:04 PM:
Hello,
I have trouble adding an abline to a dotplot() from lattice package.
For example, I would like to draw a line at x=3:
library(lattice)
x-1:5
names(x) - c(a, b, c, d, e)
dotplot(sample(x))
panel.abline(v=3)
Weiwei Shi said the following on 5/14/2007 11:04 AM:
Hi,
I happened to need generate the following
t1
V1 V2 count count2
1 1 11 2 3
2 1 12 2 2
3 2 11 1 3
4 3 13 3 1
5 3 11 3 3
6 3 12 3 2
from
V1 V2
1 1 11
2 1 12
3
Jose Quesada said the following on 5/7/2007 11:25 AM:
Hi,
I need to multiply all columns in a matrix so something like
apply(x,2,sum), but using multiplication should do.
I have tried apply(x,2,*)
I know this must be trivial, but I get:
Error in FUN(newX[, i], ...) : invalid unary
Paul Smith said the following on 5/7/2007 3:25 PM:
On 5/7/07, Paul Smith [EMAIL PROTECTED] wrote:
I think the problem is the starting point. I do not remember the details
of the BFGS method, but I am almost sure the (.5, .5) starting point is
suspect, since the abs function is not
Jacques Wagnor said the following on 5/4/2007 8:53 AM:
Given the following, one of the things I am trying to see is what % of
draws are below a certain number:
lambda - 3
rate - 5
n - 5
set.seed(123)
v - replicate(n, rexp(rpois(1,lambda), rate))
vv - unlist(v)
cat(% of draws below
Doran, Harold said the following on 5/3/2007 11:32 AM:
I'm attempting to build an R package for distribution and am working
from the directions found at
http://www.maths.bris.ac.uk/~maman/computerstuff/Rhelp/Rpackages.html#Wi
n-Win
I've read through Writing R Extensions and various other
ivo welch said the following on 5/2/2007 8:13 AM:
dear R wizards:
I am trying to replace subset() with my own version that first checks
that each name in the select statement has a corresponding name in the
data set. preferably, it would have the same syntax and semantics as
subset()
Iasonas Lamprianou said the following on 5/2/2007 8:25 AM:
Hi I am using R version 2.4.1. How can I upgrade to version 2.5 without
having to install all the packages again?
Thanks
Jason
You may find the following link relevant.
Robert A LaBudde said the following on 5/2/2007 2:39 PM:
At 01:41 PM 5/2/2007, you wrote:
On 5/2/07, Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Iasonas Lamprianou said the following on 5/2/2007 8:25 AM:
Hi I am using R version 2.4.1. How can I upgrade to version 2.5
without having
Li Li said the following on 5/2/2007 4:06 PM:
Hi All,
I found mvfft in R and fft2 in Matlab give different result
and can't figure out why. My example is:
In R:
matrix(c(1,4,2,20), nrow=2)
[,1] [,2]
[1,]12
[2,]4 20
mvfft(matrix(c(1,4,2,20), nrow=2))
[,1]
Li Li said the following on 5/2/2007 7:53 PM:
Thanks for both replies.
Then I found the ifft2 from Matlab gives different result from fft( ,
inverse=T) from R.
An example:
in R:
temp - matrix(c(1,4,2, 20), nrow=2)
fft(temp)
[,1] [,2]
[1,] 27+0i -17+0i
[2,] -21+0i 15+0i
Michael Kubovy said the following on 4/26/2007 7:20 AM:
Dear R-helpers,
How do I tell panel.polygon what greoup and panel it applies to whithin
xyplot(y ~ x | c, groups = g
panel = function(x, y, groups, ...){
panel.polygon(x = xpol[c, g], y = ypol[c, g], default.units
Read FAQ 7.22
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f
--sundar
Ronaldo Reis Junior said the following on 4/24/2007 6:38 AM:
Hi,
I write several xyplot graphics on a source file. When I try to use
source(graphics.R) the source don't
Søren Højsgaard said the following on 4/20/2007 3:57 AM:
Dear all, Consider this plot
xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species,
data = iris, allow.multiple=T, outer=F,
panel = function(x,y,...) {
panel.xyplot(x,y,...)
}
)
I
Deepayan Sarkar said the following on 4/20/2007 11:42 AM:
On 4/20/07, Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Søren Højsgaard said the following on 4/20/2007 3:57 AM:
Dear all, Consider this plot
xyplot(Sepal.Length + Sepal.Width ~ Petal.Length | Species,
data = iris
Michael Kubovy said the following on 4/10/2007 5:54 PM:
On Apr 10, 2007, at 7:07 PM, Deepayan Sarkar wrote:
On 4/10/07, Michael Kubovy [EMAIL PROTECTED] wrote:
Dear R-helpers,
I have an xyplot
of the following kind:
xYplot(y ~ x | p, groups = factor(gg, levels = c('1', '5', '2', '4',
Deepayan Sarkar said the following on 4/11/2007 1:55 PM:
On 4/11/07, Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Seems like you may get a workaround (albeit kludgey) by using
?print.trellis. Here's another example:
library(lattice)
z - expand.grid(x = 1:10, p = 1:5, r = 1:10)
z$y - rnorm(nrow
Michael Kubovy said the following on 4/10/2007 3:21 PM:
Dear R-helpers,
I have an xyplot
of the following kind:
xYplot(y ~ x | p, groups = factor(gg, levels = c('1', '5', '2', '4',
'3')),
strip = strip.custom(var.name = 'g', factor.levels = c(1', '5', '2',
'4', '3'),
Dan Bolser said the following on 4/4/2007 7:52 AM:
My question was thus;
Given
library(lattice)
my.m - matrix(seq(1,100,1),nrow=10)
levelplot(my.m)
How can I add a diagonal line onto the resulting 'color square'?
The answer I found was to hack the 'panel.levelplot'
Andy Jacobson said the following on 3/28/2007 4:01 PM:
Hi,
I'd like to try using options(error=recover) in my ~/.Rprofile, but
it appears that the function recover is not defined during R
startup when the .Rprofile is processed. recover is defined after
I get an R prompt, however.
Luis Ridao Cruz said the following on 3/27/2007 6:15 AM:
R-help,
I'm using the lattice package to plot 2 variables (vekt ~ aldur)
conditioned to a third (kyn * 2 categories).
I use the following:
xyplot(vekt ~ aldur|kyn, , data = sexSu)
I want to superimpose the average(vekt) by
Daniel Berg said the following on 3/27/2007 6:56 AM:
Dear all,
Suppose I have a very long expression e. Lets assume, for simplicity, that it
is
e = expression(u1+u2+u3)
Now I wish to replace u2 with x and u3 with 1. I.e. the 'new'
expression, after replacement, should be:
e
Alternatively, you can use ?glob2rx
test[, grep(glob2rx(*[tT]), names(test))]
which allows for wildcards.
--sundar
Benilton Carvalho said the following on 3/26/2007 12:19 PM:
if 'test' is your data frame...
test[, grep([tT]$, names(test))]
b
On Mar 26, 2007, at 3:06 PM, [EMAIL
Peter McMahan said the following on 3/20/2007 3:16 PM:
Hello,
I'm running into a frustrating problem with the legend on a lattice
plot I'm working with. The plot is a stripplot with a panel.linejoin
() line running through the mean of each of the categories. Thus
there are both points
Giovanni Parrinello said the following on 3/15/2007 6:43 AM:
Dear All,
update.packages(ask='graphics')
--- Please select a CRAN mirror for use in this session ---
Error in .readRDS(pfile) : unknown input format.
???
TIA
Giovanni
I cannot replicate this in R-2.4.1. What version of R and
Benjamin Tyner said the following on 1/22/2007 3:18 PM:
Hi,
Say I have
z-data.frame(y=runif(190),
x=runif(190),
f=gl(5,38),
g=gl(19,10))
plot-xyplot(y~x|g,
data=z,
Hi, Lynette,
A few pointers:
1. Not an R question.
2. Not an ESS question.
3. No reproducible example.
4. (x = 1/4) is comparing a pointer. Surely, this is not what you
intended to do. Plus, if you're using void* then this is not even a C
function called by R. And I'm not familiar with Rdqags.
Stephane Cruveiller said the following on 1/12/2007 4:15 AM:
Dear R users,
I am trying to include C code into R via the .C interface. I have read
that arguments passed to a C function have to be correctly DEreferenced.
This is something that can be easily done for numbers (integers or
Indermaur Lukas said the following on 1/12/2007 7:55 AM:
Hello
I want to repeatedly extract coefficients and standard errors from a GLM and
write them into a file (1row=all coefficients of model A, 2 row=all
coefficients of model B, etc.). I can extract coefficients but not standard
Joerg van den Hoff said the following on 12/14/2006 7:30 AM:
I have encountered the following problem: I need to extract from
a list of lists equally named compenents who happen to be 'one row'
data frames. a trivial example would be:
a - list(list(
df = data.frame(A = 1, B = 2, C = 3)),
Lisa Wang said the following on 12/7/2006 3:01 PM:
Hello there,
In gdata package, read.xls is to be used for reading excel data (from
windows).
The following is my code:('C:/session/sampledata.xls' is where the file
is stored)
data1-read.xls('C:/session/sampledata.xls',sheet=1)
and
Matt Pocernich said the following on 12/4/2006 12:32 PM:
I an using xyplot in lattice. I have data in a dataframe. Some columns
contains data, each from a different group. Is there a direct way to
specify a range of column names as a grouping variables? Currently, I
am stacking the data
Carmen Meier said the following on 11/10/2006 9:46 AM:
Hi to all ... the same code, but another question.
I changed only the type='n' to type='l' and debugged the function xy.coords.
with type = 'l' :
there are the correct values of x and y inside the function xy.coords
but the y value is
hadley wickham said the following on 11/7/2006 8:46 PM:
On 11/7/06, Denis Chabot [EMAIL PROTECTED] wrote:
Dear list members,
I have to combine dataframes together. However they contain different
numbers of variables. It is possible that all the variables in the
dataframe with fewer
Jeffrey Stratford said the following on 10/13/2006 9:28 AM:
Hi. I'm attempting to fit a logistic/binomial model so I can determine
the influence of landscape on the probability that a box gets used by a
bird. I've looked at a few sources (MASS text, Dalgaard, Fox and
google) and the
Daniel E. Bunker said the following on 10/12/2006 11:48 AM:
Dear R users,
About a year ago Deepayan offered a suggestion to incorporate error bars
into a dotplot using the singer data as an example
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/63875.html.
When I try to utilize this
Yuval Sapir said the following on 10/12/2006 1:08 PM:
Hi,
I'm trying to perform a glm model on count data (poisson distribution of
the errors) where data are nested.
glmmodel-glm(y~x/z,poisson)
x and z are factors, z nested within x, y is count data.
In that point the R just stuck and not
Osman Al-Radi said the following on 10/5/2006 3:43 PM:
Hi,
for the data below:
time-c(rep(1:10,5))
y-time+rnorm(50,5,2)
subject-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10))
group-c(rep('A',30),rep('B',20))
df-data.frame(subject,group,time,y)
I'd like to produce a
Spencer Jones said the following on 9/28/2006 10:44 AM:
I am fitting a regression model with a bs term and then making predictions
based on the model. According to some info on the internet at
http://www.stat.auckland.ac.nz/~yee/smartpred/DummiesGuide.txt
there are some problems with using
Peter Lauren said the following on 9/27/2006 3:11 PM:
I would like to use readBin to read a binary data
file. Most of the data is 4-byte floating point but,
for some reason, only double precision appears to be
offered. I tried
fVariable=readBin(iFile,what=single());
and got 35.87879
Marc Schwartz said the following on 9/24/2006 1:56 PM:
On Sun, 2006-09-24 at 11:31 -0700, Jonathan Greenberg wrote:
Another newbie question for you all:
In a function, say I have:
countme - function() {
for(i in 1:10) {
i
}
}
How do I get R to print i as it runs (e.g. By calling
Caio Lucidius Naberezny Azevedo said the following on 9/22/2006 4:40 PM:
Hi all,
I need to solve double integrals with no closed solution. Calling x and y
the two variables we have x ~ Normal(y*v,1) and y ~Half-Normal(0,1). In fact,
given a joint funcion g(x,y), I need evaluate the
kone said the following on 9/21/2006 2:30 PM:
Hi,
Is there some function, which generates this kind of n x n -matrix
from a vector?
rhset
[1] 1792 256 13312 512 1024 2048 8192 4096
m=matrix(nrow=length(rhset),ncol=length(rhset))
for(i in 1:length(rhset))
+
ERICK YEGON said the following on 9/18/2006 8:22 AM:
Hi Gurus, i have a small problem with working with graphs on R.
Say i have data say bull-c(34,23,7,4) and i assign names to the elements in
the brackets
if i do
Pie(bull) i get a pie chart of bull togtjer with the names.
Question. How
Iñaki Murillo Arcos said the following on 9/18/2006 12:31 PM:
Hello,
I don't know if the result of
acos(0.5) == pi/3
is a bug or not. It looks strange to me.
Inaki Murillo
__
R-help@stat.math.ethz.ch mailing list
Benjamin Tyner said the following on 9/15/2006 2:36 PM:
In dotplot, what's the best way to suppress the unused levels of 'y' on
a per-panel basis? This is useful for the case that 'y' is a factor
taking perhaps thousands of levels, but for a given panel, only a
handfull of these levels
Deepayan Sarkar said the following on 9/14/2006 2:31 PM:
Hi,
consider this:
--
estr - c(2^4, alpha[1])
eexp - expression(2^4, alpha[1])
## Is it possible to get 'eexp' starting from 'estr'? The closest I could
## get was:
do.call(expression, lapply(estr, as.name))
Dietrich Trenkler said the following on 9/13/2006 9:44 AM:
Dear HelpeRs,
I have some data:
ice - structure(c(0.386, 0.374, 0.393, 0.425, 0.406, 0.344,
0.327, 0.288, 0.269, 0.256, 0.286, 0.298, 0.329, 0.318, 0.381,
0.381, 0.47, 0.443, 0.386, 0.342, 0.319, 0.307, 0.284, 0.326,
Yes. I do this periodically:
dat.new - dat[1:6, ]
dat.new[] - lapply(dat.new, function(x)
if(is.factor(x)) factor(x) else x)
HTH,
--sundar
Afshartous, David said the following on 9/12/2006 11:00 AM:
thanks to all for the quick replies!
if the factor is part of a
Emmanuel Levy said the following on 9/12/2006 3:50 PM:
Hello,
I'd like to group the lines of a matrix so that:
A 1.0 200
A 3.0 800
A 2.0 200
B 0.5 20
B 0.9 50
C 5.0 70
Would give:
A 2.0 400
B 0.7 35
C 5.0 70
So all lines corresponding to a letter (level), become a single line
Robin Hankin said the following on 9/11/2006 3:52 AM:
Hi
Given a real number x, I want to know how accurately R can represent
numbers near x.
In particular, I want to know the infinum of exactly representable
numbers greater than x, and the supremum of exactly representable
Ernst O Ahlberg Helgee wrote:
Hi!
Im sorry to bother you but I cant fix this.
I use the lattice function levelplot and I want the colorkey at the
bottom, how do I get it there? I have tried changing colorkey.space and
changing in legend but I cant get it right, plz help
btw I'd like to
Nick Desilsky wrote:
Hi,
any good trick to get the column names for title() aside from running
lapply on the column indexes?
Thanks
Nick.
apply(X[,numCols],2,function(x){
nunqs - length(unique(x))
nnans - sum(is.na(x))
info -
Maria Montez wrote:
Hi!
I would like to be able to create formulas automatically. For example, I
want to be able to create a function that takes on two values: resp and
x, and then creates the proper formula to regress resp on x.
My code:
fit.main - function(resp,x) {
form -
, there is a way fitdistr can also compute difficult data.
Best regards, markus
-Original Message-
From: Sundar Dorai-Raj [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 17. August 2006 16:47
To: Schweitzer, Markus
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] fitting truncated normal
in advance
markus
Sorry, didn't notice that you *did* mention dtnorm is part of msm.
Ignore that part of the advice...
--sundar
Sundar Dorai-Raj wrote:
[EMAIL PROTECTED] wrote:
Hello,
I am a new user of R and found the function dtnorm() in the package
msm.
My problem now
[EMAIL PROTECTED] wrote:
Hello,
I am a new user of R and found the function dtnorm() in the package msm.
My problem now is, that it is not possible for me to get the mean and sd out
of a sample when I want a left-truncated normal distribution starting at 0.
fitdistr(x,dtnorm,
Sorry, didn't notice that you *did* mention dtnorm is part of msm.
Ignore that part of the advice...
--sundar
Sundar Dorai-Raj wrote:
[EMAIL PROTECTED] wrote:
Hello,
I am a new user of R and found the function dtnorm() in the package msm.
My problem now is, that it is not possible for me
Hi, Jose/John,
Here's an example to help Jose and highlights John's advice. Also
includes set.seed which should be included in all simulations posted to
R-help.
set.seed(42)
mu - 10
sigma - 5
n - 3
nsim - 1
m - matrix(rnorm(n * nsim, mu, sigma), nsim, n)
t - apply(m, 1, function(x)
Hi, all,
I'm looking a utility for removing a directory from within R. Currently,
I'm using:
foo - function(...) {
mydir - tempdir()
dir.create(mydir, showWarnings = FALSE, recursive = TRUE)
on.exit(system(sprintf(rm -rf %s, mydir)))
## do some stuff in mydir
invisible()
}
Please ignore. I forgot ?unlink had a recursive argument.
Thanks.
--sundar
Sundar Dorai-Raj wrote:
Hi, all,
I'm looking a utility for removing a directory from within R. Currently,
I'm using:
foo - function(...) {
mydir - tempdir()
dir.create(mydir, showWarnings = FALSE
LL wrote:
Hi.. I am running R version 2.3.1 on a Windows XP machine with the latest
Miktex 2.5 installed. I get no errors from R when running the Sweave example,
testfile - system.file(Sweave, Sweave-test-1.Rnw, package = utils)
However, when I tex the resulting .tex file (after
Try:
plot(x, y, asp = 1)
--sundar
bogdan romocea wrote:
Dear useRs,
I'd like to produce some scatter plots where N units on the X axis are
equal to N units on the Y axis (as measured with a ruler, on screen or
paper). This approach
x - sample(10:200,40) ; y - sample(20:100,40)
Georg Otto wrote:
Hi,
i have a list of several vectors, for example:
vectorlist
$vector.a.1
[1] a b c
$vector.a.2
[1] a b d
$vector.b.1
[1] e f g
I can use intersect to find elements that appear in $vector.a.1 and
$vector.a.2:
intersect(vectorlist[[1]],
John Wiedenhoeft wrote:
Dear all,
I apologize if this is a FAQ (seems a bit like one, but I didn't find
anything).
I'm looking for an easy way to cut one value out of a vector and shorten
the vector accordingly. Something like:
x - c(1, 1, 0, 6, 2)
throwaway(x[3])
which will return
Dieter Menne wrote:
Dear R-Listeners,
as the Sweave faq says:
http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html
creating several figures from one figure chunk does not work, and for
standard graphics, a workaround is given. Now I have a multipage trellis
plot with an a-priori
Doran, Harold wrote:
I need to wrap a loop inside a function and am having a small bit of
difficulty getting the results I need. Below is a replicable example.
# define functions
pcm - function(theta,d,score){
exp(rowSums(outer(theta,d[1:score],'-')))/
in:
library(gdata)
setwd(/)
cmd - paste(perl, system.file(perl/xls2csv.pl, package = gdata),
test)
system(cmd)
ff - list.files(patt = test_Sheet.*.csv)
sapply(ff, read.csv, na.strings = na , simplify = FALSE)
On 7/12/06, Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Hi, Gabor,
Thanks for the reply. Perhaps
Hi, all,
I'm trying to use RODBC to read data from Excel. However, I'm having
trouble converting missing values to NA and rather perplexed by the
output. Below illustrates my problem:
## DATA - copy to Excel and save as tmp.xls
## tmp.xls!Sheet1
x
0.11
0.11
na
na
na
0.11
## tmp.xls!Sheet2
x
1 0.11
2 0.11
3 NA
4 NA
5 NA
6 NA
7 0.11
R.version.string # XP
[1] Version 2.3.1 Patched (2006-06-04 r38279)
packageDescription(gdata)$Version
[1] 2.1.2
packageDescription(RODBC)$Version
[1] 1.1-7
On 7/12/06, Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Hi, all
Patrick Connolly wrote:
] version
_
platform x86_64-unknown-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
Peter Lauren wrote:
Is there a colinearty function implemented in R? I
have tried help.search(colinearity) and
help.search(collinearity) and have searched for
colinearity and collinearity on
http://www.rpad.org/Rpad/Rpad-refcard.pdf but with no
success.
Many thanks in advance,
Peter
Vumani Dlamini wrote:
Dear listers,
Am currently using MCMC approaches to estimate some parameters of my model.
One parameter has to be updated using a tuned gamma distribution. So at each
iteration I estimate the mean and variance of the density of the gamma
approximation using vmmin (i
przeszczepan wrote:
Hi,
I have got problems integrating the following function using integrate:
lambdat-function(t){
tempT-T[k,][!is.na(T[k,])]#available values from k-th row of matrix T
tempJ-J[k,][!is.na(J[k,])]
hg-length(tempT[tempT=t tempJ==0])#counts observations satisfing the
Amir Safari wrote:
Hi Dear R users,
For a pair plotting, usaully we use par( ) function. Apparently it does not
work anywhere. I want to have 3 plots in a single figure, like this:
par(mfrow=c(3,1))
densityplot( a)
densityplot(b)
densityplot(c)
But it does not work.
A Ezhil wrote:
Hi,
Is it possible to find corresponding color code in R
for the following RGB (R185, G35 B80)?
Thanks in advance.
Best regards,
Ezhil
How about:
x - c(185, 35, 80)
class(x) - hexmode
paste(#, paste(format(x), collapse = ), sep = )
[1] #b92350
I found this
Deepayan Sarkar wrote:
On 6/26/06, Sundar Dorai-Raj [EMAIL PROTECTED] wrote:
Amir Safari wrote:
Hi Dear R users,
For a pair plotting, usaully we use par( ) function. Apparently it
does not work anywhere. I want to have 3 plots in a single figure,
like this:
par(mfrow=c(3,1
1 - 100 of 558 matches
Mail list logo