Note: forwarded message attached.
Mistakenly I did not send this to the list!
---BeginMessage---
Here is a solution which (I think) works, but it
contains a loop which most likely can be eliminated by
more knowledgable people):
Let a and b be like in your example but to make things
more
The arr.ind in the which function does the job very nicely!!!
Thank you everyone for the suggestions!
Ana
Mensaje Original
De: [EMAIL PROTECTED]
Para: [EMAIL PROTECTED]
Asunto: Re: [BioC] [R] function to find coodinates in an array
Fecha: Thu, 16 Aug 2007 21:53:44 -0500
If I am
Hi all:
How can the R graphics window be customized
programmatically? Either minimized,maximized or change
the size of the default that ships with R.
Thanks
Felipe D. Carrillo
Fishery Biologist
US Fish Wildlife Service
Red Bluff, California 96080
Felipe Carrillo mazatlanmexico at yahoo.com writes:
How can the R graphics window be customized
programmatically? Either minimized,maximized or change
the size of the default that ships with R.
Assuming Windows as OS (which you forgot to mention)
windows(width = 2, height = 2, pointsize =
Hi,
I was wondering if I might be able to ask some advice about doing residual
plots for the lmer function in the lme4 package.
(Apologies to anyone who has received this message twice. I have had
problems with embedded text.)
Our group's aim is to find if the expression staining of a
jim holtman jholtman at gmail.com writes:
Turn 'Recording on for the plots.
windows(record=TRUE)
or select from the GUI.
I mean if the object has several plots how can I
get those?
gam.object - gam(y ~ s(x,6) + z,data=gam.data)
plot(gam.object,se=TRUE)
Or use something like
GaGr == Gabor Grothendieck [EMAIL PROTECTED]
on Thu, 16 Aug 2007 23:46:28 -0400 writes:
GaGr Get the indices using expand.grid and then reorder
GaGr them: set.seed(1); X - array(rnorm(24), 2:4) # input
GaGr X # look at X
GaGr do.call(expand.grid, sapply(dim(X),
Greg Snow wrote:
Oops, I read further down in your original post and see that you already
knew about par(mfg=c(2,1)). To get it to advance to page 2 for the 4th
plot try calling plot.new() which should move you to the next page, then
doing par(mfg=c(1,1)) should cause the next graph to be at
Hi
you do not give much information, even subject line is missing. Try to
follow posting guide and try to explain what you did and how did you fail.
Regards
Petr
[EMAIL PROTECTED] napsal dne 16.08.2007 17:24:24:
hi,
i'm new to R and i'm trying to port a quattro pro spreadsheet into R.
?plot.gam or ?preplot.gam says there is an ask= option, slightly bizarrely set
to F by default.
If ask=T, You'll get a menu of options for plotting. In windows, hitting Esc
will get you out of the menu.
example:
gam(Kyphosis ~ s(Age,4) + Number, family = binomial, data=kyphosis,
trace=TRUE)
Page 14 of the working paper
http://www.burns-stat.com/pages/Working/perfmeasrandport.pdf
gives an example of why you might not want to use Fisher's
method, and it gives R code for Stouffer's method.
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry
On Thu, 16 Aug 2007, Rachel Jia wrote:
Hi, there:
It's my first time to post question in this forum, so thanks for your
tolerance if my question is too naive. I am using a nonparametric smoothing
procedure in sm package to generate smoothed survival curves for continuous
covariate. I want
I am doubtful whether standard residual plots are very useful
in this context. One wants the theoretical effects Ui to have a
normal distribution. If there are similar amounts of information
on each patient, maybe it will not be too bad to extract the
estimated effects and check them for
Dear R users,
Plotting question from a R beginner...
When I try to plot a response through time, for example:
Date-c(2006-08-17, 2006-08-18, 2006-08-19, 2006-08-20)
response-c(4,4,8,12)
as.Date(Date)
plot(Date,response)
The dates on the graphic appear in spanish. This I guess is the default
way
On 16/08/2007 7:35 PM, Felipe Carrillo wrote:
Hi all:
How can the R graphics window be customized
programmatically? Either minimized,maximized or change
the size of the default that ships with R.
Which device are you working with? Most of them allow the size to be
selected in the initial
Hi Andrew,
This is pretty clumsy but it seems to work. I suspect
there are many better ways
x - seq(0, 1, length=21)
plot(db)
colour - c(red, blue)
mytext - c(RED, BLUE)
mtext( mytext, at= c(2,5), side=1, col=colour)
--- Andrew Yee [EMAIL PROTECTED] wrote:
Hi, I'm interested in using
Hi there,
Is it basically possible to solve a non-convex quadratic programming with
optimal solution by any way? What could be the way? How can be this problem
dealt with? Could you guide me to some references please?
I thank you very much for eny help.
Tobi
Correction
x - seq(0, 1, length=21)
db - dbeta(x, 3,1)
plot(db)
colour - c(red, blue)
mytext - c(RED, BLUE)
mtext( mytext, at= c(2,5), side=1, col=colour)
--- John Kane [EMAIL PROTECTED] wrote:
Hi Andrew,
This is pretty clumsy but it seems to work. I
suspect
there are many better ways
If you want to use English, you need to set your session to be use
English.
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
We need to know your OS and locale, and you did not follow the guide.
On a Unix-alike probably Sys.setlocale(LC_TIME,en_US) or
I am trying to install the gsl package.
I had gsl installed with YaSt in /usr/lib.
when I launch R as superuser and launch install.packages, it says in
cannot find Gnu Scientific Library. How can I make it find them?
Thank you,
Luca Laghi
__
OK, solved!!!
Thanks again!
Inaki
Perhaps:
lct - Sys.getlocale(LC_TIME)
Sys.setlocale(LC_TIME, English)
format.Date(Date, %b-%Y)
For restore the configurations:
Sys.setlocale(LC_TIME, lct)
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 17/08/07, [EMAIL
Perhaps:
lct - Sys.getlocale(LC_TIME)
Sys.setlocale(LC_TIME, English)
format.Date(Date, %b-%Y)
For restore the configurations:
Sys.setlocale(LC_TIME, lct)
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 17/08/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Dear R
On Fri, 17 Aug 2007, luca laghi wrote:
I am trying to install the gsl package.
I had gsl installed with YaSt in /usr/lib.
when I launch R as superuser and launch install.packages, it says in
cannot find Gnu Scientific Library. How can I make it find them?
Please tell us the exact messages
Ana,
Two quick comments:
1. Needless to say, my use of 'ARR[order(ARR)]' can of course be
simplified to 'sort(ARR)'. For some reason, I got fixated on your use of
order() last night.
2. I suspect that you will find Gabor's solution to be superior to mine.
Most notably because I neglected to
I just used the table () function for building a presence/absence matrix
of plots vs. species
Now I would like to export the result to a txt file.
Thanks
Duccio
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
write.table(yourtable, file.txt, quote=F)
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 17/08/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I just used the table () function for building a presence/absence matrix
of plots vs. species
Now I would like to
Hi,
Imagine a vector x with elements (1,2,1,1,3,5,3,3,1) and a vector y with
elements (2,3). I need to find out what elements of x match any of the
elements of y.
Is there a simple command that will return a vector with elements
(F,T,F,F,T,F,T,T,F). Ideally, I would like a solution that works
Hi Jim,
You could also use the 'select' argument. For example,
plot(gam.object,se=TRUE,select=1)
will give you the smooth plot for the first variable.
Be sure to read the documentation. See ?plot.gam for specifics details on
plotting gam objects.
Julian
On Fri, 17 Aug 2007, Dieter Menne
x %in% y
David L. Reiner
Rho Trading Securities, LLC
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gonçalo Ferraz
Sent: Friday, August 17, 2007 9:46 AM
To: r-help@stat.math.ethz.ch
Subject: [R] matching elements from two vectors
Hi,
Imagine a vector
Hello everyone,
I am sorry if this has already been asked but I can't find it. I want
to superpose two lattice plots, namely a levelplot and a contourplot
of two different variables with the same x-y scale. I found
information about panel.superpose but it does not seem to correspond
to
x - c(1,2,1,1,3,5,3,3,1)
y - c(2,3)
intersect(x,y)
[1] 2 3
On 8/17/07, Gonçalo Ferraz [EMAIL PROTECTED] wrote:
Hi,
Imagine a vector x with elements (1,2,1,1,3,5,3,3,1) and a vector y with
elements (2,3). I need to find out what elements of x match any of the
elements of y.
Is there a
Hi!
v1 - c(1,2,1,1,3,5,3,3,1)
v2 - c(2,3)
v1 %in% v2
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 17/08/07, Gonçalo Ferraz [EMAIL PROTECTED] wrote:
Hi,
Imagine a vector x with elements (1,2,1,1,3,5,3,3,1) and a vector y with
elements (2,3). I need to find
Hello,
A newly-revised version of my introductory manual The R Guide
is now available in the Contributed Documents section in CRAN.
Among other changes, the description of the function t.test() has
been expanded as well as an introduction to methods for the
creation of prediction and confidence
Also if you want all the matches
x[x %in% y]
[1] 2 3 3 3
On 8/17/07, Gonçalo Ferraz [EMAIL PROTECTED] wrote:
Hi,
Imagine a vector x with elements (1,2,1,1,3,5,3,3,1) and a vector y with
elements (2,3). I need to find out what elements of x match any of the
elements of y.
Is there a
Thanks much. x %in% y works.
On 8/17/07, jim holtman [EMAIL PROTECTED] wrote:
Also if you want all the matches
x[x %in% y]
[1] 2 3 3 3
On 8/17/07, Gonçalo Ferraz [EMAIL PROTECTED] wrote:
Hi,
Imagine a vector x with elements (1,2,1,1,3,5,3,3,1) and a vector y with
elements (2,3).
Hi,
I have a problem with the predict function of svyglm:
When I try to predict with an object of svyglm I get
the error message that R can't allocate a vector about
3 GB big.
Has anybody a hint how I can reduce the memory used
for this?
I have about 25000 observation and use the weigths
zhijie zhang wrote:
Dear R users,
We have some programs for the specific task in our research, but they were
very commonly used. We want to make some functions for them, anybody can
recommend any good tools to facilitate us to create R functions even without
going deep into the theories
mara serrano teachermara at yahoo.com writes:
hi,
i'm new to R and i'm trying to port a quattro pro spreadsheet into R.
spreadsheets have optional lower and
upper limit parameters on the beta distribution function. i would like to know
how to incorporate this
with R's pbeta function.
GF == Gonçalo Ferraz [EMAIL PROTECTED]
on Fri, 17 Aug 2007 11:03:09 -0400 writes:
GF Thanks much. x %in% y works.
yes, indeed.
But I wonder a bit why nobody remarked on the facts that
1) you use match in the subject of your e-mail
2) match() is the basic ingredient you use:
'%in%'
Hi All,
I had 12766 elements in a column, 12566 are values and 200 are NAs. I used
the following line to get the ranks:
total_list$MB.rank - rank(-total_list$MB,ties.method=min,na.last=NA)
but I got an error message:
Error in `$-.data.frame`(`*tmp*`, BCRP_PW_F.rank, value = c(3949, 6182, :
Dear R list,
After a huge delay, I come back to this question. Using names of
variables inside a function is a problem I run into quite often.
Maybe this little example should help to get my point:
Suppose I want to make a function llabel to get the labels of the
variables from a data frame.
If no
Hi, try this:
total_list$MB.rank[!is.na(toal_list$MB)] - rank(-total_list$MB,ties.method=
min,na.last=NA)
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 17/08/07, Jiong Zhang, PhD [EMAIL PROTECTED] wrote:
Hi All,
I had 12766 elements in a column, 12566 are
The simplest trick is to use the QR decomposition:
The OLS solution (X'X)^{-1}X'y can be easily computed as:
qr.solve(X, y)
Here is an illustration:
set.seed(123)
X - matrix(round(rnorm(100),1),20,5)
b - c(1,1,2,2,3)
y - X %*% b + rnorm(20)
ans1 - solve(t(X)%*%X,t(X)%*%y)
ans2 -
On Fri, 17 Aug 2007, Jiong Zhang, PhD wrote:
Hi All,
I had 12766 elements in a column, 12566 are values and 200 are NAs. I
used the following line to get the ranks:
total_list$MB.rank - rank(-total_list$MB,ties.method=min,na.last=NA)
but I got an error message:
Error in
Within a function deparse(substitute(x)) will give the name of x, as a character
variable. Search the archives for
deparse substitute
to find many examples.
On 8/17/07, david dav [EMAIL PROTECTED] wrote:
Dear R list,
After a huge delay, I come back to this question. Using names of
variables
David,
I think you are looking for
deparse(substitute(var))
See
?deparse
Notice in
?data.frame
this bit:
...: these arguments are of either the form 'value' or 'tag =
value'. Component names are created based on the tag (if
present) or
Hi,
New to R, I don't find a way to plot the following data with image():
x is a N * M matrix
y is a vector of length M
z is a N*M matrix
I wish to plot z as a greyscale image, but my x axis is different for
every row of the z data.
Here is a minimal example,
theta-c(3:6) # N
y-c(1:5) # M
The original complaint
What exactly are my options to improve this? I looked into the biglm
package but the problem with it is it uses update() function and is
therefore not transparent
is not warranted.
As usual, the source code is the best reference. It took about a minute
to download
On Fri, Aug 17, 2007 at 01:53:25PM -0400, Ravi Varadhan wrote:
The simplest trick is to use the QR decomposition:
The OLS solution (X'X)^{-1}X'y can be easily computed as:
qr.solve(X, y)
While I agree that this is the correct way to solve the linear algebra
problem, I seem to be missing the
On 8/17/2007 1:17 PM, david dav wrote:
Dear R list,
After a huge delay, I come back to this question. Using names of
variables inside a function is a problem I run into quite often.
Maybe this little example should help to get my point:
Suppose I want to make a function llabel to get the
Its actually only a few lines of code to do this from first principles.
The coefficients depend only on the cross products X'X and X'y and you
can build them up easily by extending this example to read files or
a database holding x and y instead of getting them from the args.
Here we process
On Fri, Aug 17, 2007 at 07:51:59PM +0100, baptiste Augui? wrote:
Hi,
New to R, I don't find a way to plot the following data with image():
...
This doesn't give what I want, as the x axis needs to be shifted as
we go from line to the following. (probably clearer if you plot
If you are willing to go to the bother of representing your data
as a sparse matrix, the package SparseM has a version of image()
that will do what you would like to do, I believe.
url:www.econ.uiuc.edu/~rogerRoger Koenker
email[EMAIL PROTECTED]Department of
Hello Zhijie,
You can many specific commands and tricks by using R commander's menus:
install.packages(Rcmdr)
library(Rcmdr)
However, I can not stress enough that if you want to be proficient and
sound in your work with R, you will have to invest time reading the
documentation (see
Hi,
If I have a data frame A with the following format:
Day1 Day2 Day3 Day4
1 1979-11-02 1979-11-03 1979-11-04 NA
2 1979-12-06 NA NA NA
3 1979-12-13 1979-12-14 1979-12-15 1979-12-16
4 1979-12-20 NA NA NA
Leandra Desousa sousa at ims.uaf.edu writes:
I am using 'R' version 2.2.1 and 'S-PLUS' version 6.0; and I loaded the
MASS library in 'S-PLUS'.
I am running a logistic regression using glm:
summary(mydata.glm)
Call:
glm(formula = COMU ~ MeanPycUpT + MeanPycUpS, family = binomial,data
I'm trying to create two variables (dka and newsonset) from the
following composite character variable diagnosis:
diagnosis - c(hypoglycemia,diabetes ,newonsetdka, newonset,
diabetes, dkaGI, diabetesGI, newonset, dka)
I can extract the indices for dka and newonset using the following
On Fri, Aug 17, 2007 at 05:32:54PM -0400, Dale Steele wrote:
I'm trying to create two variables (dka and newsonset) from the
following composite character variable diagnosis:
diagnosis - c(hypoglycemia,diabetes ,newonsetdka, newonset,
diabetes, dkaGI, diabetesGI, newonset, dka)
I can
On Fri, 2007-08-17 at 14:40 -0700, Daniel Lakeland wrote:
On Fri, Aug 17, 2007 at 05:32:54PM -0400, Dale Steele wrote:
I'm trying to create two variables (dka and newsonset) from the
following composite character variable diagnosis:
diagnosis - c(hypoglycemia,diabetes ,newonsetdka,
try this, and you will get a clue:
(today - Sys.Date())
[1] 2007-08-17
class(today)
[1] Date
as.Date(2007-08-17) == today
[1] TRUE
so basically,
your.target = as.Date(1979-12-14)
apply(A, c(1,2), function(x) x==your.target)) # should work. I did not
test though.
HTH,
Weiwei
On 8/17/07,
Hi Martin (and others, hopefully ) -
Upon your suggestion, I tried your code and did not see a leak, and this
was reflected by the 'top' command.
However, I modified your code snippet below to make it a little closer
to what I'm actually doing, and can now reproducibly cause the leak that
I'm
Your question is well un-defined. Specify your question, maybe by an
example so we can help.
You can also send me personal email if you want. I graduate from Fudan
too, so I would like to give a favor, lol
Best,
Weiwei
On 8/17/07, zhijie zhang [EMAIL PROTECTED] wrote:
Dear R users,
We have
Read the posting guide at http://www.R-project.org/posting-guide.html
and try the suggestions under Do your homework before posting: You
probably won't have to go past bullet 3 to find the answer to your
question.
Regards,
Francisco
Tobias Schlottmann wrote:
Hi there,
Is it
Hello Rainer,
You need to catch the cases where the call to plot generates an error.
Using your example:
## Set layout to three rows and only one column
par( mfcol=c(3,1), oma=c(0,0,0,0), mar=c(4, 4, 2, 2) )
## First row
par(mfg=c(1,1))
er-try( plot(runif(ff)), silent=T ) ## plot fails due to
64 matches
Mail list logo