Dear Thierry,
I do not know fdrtool::monoreg(), however I think that the simple R^2 is
meaningless in thise case. An unconstrained (non-monotonic) fit will
have always a higher R^2 and more degrees-of-freedom.
A better approach would use any goodness-of-fit criterion penalized for
the degrees o
Hello,
I tried the approx() and it worked. Now, I have a list named "interpol"
resulting from the interpolation. I would like to append the values in
interpol$y in the position specified by interpol$x in a existing vector
"spect1". I tried with append() and the following code:
spect1 <- c(1:109
Hi Stiffler,
Duncan Murdoch wrote:
>> The point is that a scatterplot is a graph of real numbers, not of
>> integers.
>> Use a plot designed for a discrete data type if you don't want things
>> displayed as their real values ...
To drive home Duncan's point (not that it needs it) ...and to co
Hello,
In fact I would like to make something like a "movie" : to keep the map as
background and to display successively the temperatures pictures.
At the moment I create the picture of the temperature with R from latitude,
longitude, temperature data. I read that it can be done with image() so
Dear R-users,
I'd like to announce the release of the new package JM (JM_0.1-0
available from CRAN) for the joint modelling of longitudinal and
time-to-event data.
The package has a single model-fitting function called jointModel(),
which accepts as main arguments a linear mixed effects object
Hi helpers.
I have the following problem and I need some help
When using grid.edit inside a pdf device it applies the changes on a
second plot, not erasing the first one.
Here it is an example.
>DF<-data.frame(A=c(1:12),B=c(1:12)*c(rnorm(12,mean=1)),C=2*c(1:12),D=re
p(c(1:4),each=3))
>trellis.d
First I just want to say thanks for all the help I've had from the
list so far..)
I now have what I think is a clustering problem. I have lots of
objects which I have measured a dissimilarity between. Now, this list
only has one entry per pair, so it is not symmetrical.
Example input:
NameA N
Hello,
I am trying to insert a certain number of points into a certain position
of a vector with this code:
x <- seq(1:10909)
x1 <- c(13112-10909)
spect1 <- rnorm(13112)
interpol <- approx(x,spect1,xout=c(seq(from=1, by=((10909 - 1)/(x1 -
1)), length.out=x1)))
pos <- round(interpol$x,0)
intensiti
Greg Snow-2 wrote:
>
>
>> write.table(my.data, 'clipboard', sep="\t")
>
> Then in Excel just do a paste and the data is there, this saves a couple
> of steps from saving as a .csv file and importing that into excel. This
> would probably be fine for a few tables.
>
>
>
Just to in
Hi.
On Feb 20, 2008 2:38 AM, Dani Valverde <[EMAIL PROTECTED]> wrote:
> Hello,
> I am trying to insert a certain number of points into a certain position
> of a vector with this code:
> x <- seq(1:10909)
> x1 <- c(13112-10909)
> spect1 <- rnorm(13112)
> interpol <- approx(x,spect1,xout=c(seq(from=
Hello, I'm trying to obtain a species abundance curve with the function
specaccum from vegan package. I've applied this function to my data and I've
obtained something like this:
Sites1.00 2.00 3.00 4.00 5.000 6.000 7.00
Richness 6.51 8.29 9.15 9.770
Hello all!
I have the following problem with the %in% command:
1) I have a data frame that consists of functions (rows) and genes
(columns). The whole has been loaded with the "read.delim" command
because of gene-duplications between the different rows.
2) Now, there is another data frame that
Earl F. Glynn wrote:
> Nearly six years ago, SAS also refused to give us academic pricing because
> we were not a degree granting institution. About a year ago, SAS finally
> granted us academic pricing, but most of the analysis momentum was already
> for the use of R/Bioconductor.
I recently
Thank you very much, everybody. The scale of responses of depth of guidance
is overwhelming. All this will help me to become an expert in no time! I
have a while yet as I am still collecting data for my PhD project but when I
start statistical data analysis, thanks to all of you, I will know what
Gallego Liberman, Matias isofoton.com> writes:
> When using grid.edit inside a pdf device it applies the changes on a
> second plot, not erasing the first one.
..
> >DF<-data.frame(A=c(1:12),B=c(1:12)*c(rnorm(12,mean=1)),C=2*c(1:12),D=re
> p(c(1:4),each=3))
> >trellis.device(pdf,file='prueba.pdf
With the format you have, we have to split out the genes separated by
commas and then do 'table'. Here is one way of doing it:
> x <- readLines(textConnection(" Function
> x
+ Function1 gene5, gene19, gene22, gene23
+ Fu
Try this
data(BCI)
sp1 <- specaccum(BCI)
as.data.frame(sp1[3:5])
On 20/02/2008, Alfonso Pérez Rodríguez <[EMAIL PROTECTED]> wrote:
> Hello, I'm trying to obtain a species abundance curve with the function
> specaccum from vegan package. I've applied this function to my data and I've
> obtained
You need to read the help for specaccum to see what it returns. If you
want the site and richness components, as in the example you give, you
could do:
my.sa <- specaccum(my.data)
write.table(cbind(my.sa$sites, my.sa$richness), "myoutput.csv")
Sarah
On Feb 20, 2008 7:24 AM, Alfonso Pérez Rodrígu
On Wed, 2008-02-20 at 13:24 +0100, Alfonso Pérez Rodríguez wrote:
> Hello, I'm trying to obtain a species abundance curve with the
> function specaccum from vegan package. I've applied this function to
> my data and I've obtained something like this:
>
> Sites1.00 2.00 3.00 4.
> Hello,
>
> I am looking for a function which allows to calculate the confidence
> interval for a standard mortality ratio. I do have vectors with the
> number of observed and expected death. Has anybody a hint where to
> look?
> Best,
> Stefan
We find the following function useful for an SMR
Xing Yuan wrote:
> Dear List,
>
> Does anybody no how to compare mean survival times for two (more) groups in
> R? What test statistics should I use?
You should be careful considering the mean survival time, because censoring in
survival data often makes the mean less informative. The median sur
Xing Yuan wrote:
> Dear List,
>
> Does anybody no how to compare mean survival times for two (more) groups in
> R? What test statistics should I use?
Because of censoring, you can only compare the conditional means. That is,
given a pre-defined cutpoint such as "2 years", you estimate the ex
Dear R-users,
I am currently trying to switch from SAS to R, and am not very familiar with R
yet, so forgive me if this question is irrelevant.
If I try to find the significance of the fixed factor "spikes" in a generalized
linear mixed model, with "site" nested within "zone" as a random factor
I don't use Word much but an xtable (html) seems to
import with no trouble. Thanks for reminding me that
it works well with OOo.
--- Peter Dalgaard <[EMAIL PROTECTED]> wrote:
> Gabor Grothendieck wrote:
> > On Feb 16, 2008 5:28 PM, David Scott
> <[EMAIL PROTECTED]> wrote:
> >
> >> On Sat, 1
The lme4 package is still in development. I can't guarantee the
evaluation of the deviance for the quasipoisson family. There is a
certain amount of mystery about the role of the dispersion parameter
and the null deviance in families like quasipoisson and quasibinomial.
For the time being don't
I am looking for assistance in figuring out how to use the circular-linear
regression in package circular.
See below for an example of what I have been trying. If anyone can help me with
this please reply to my email address.
Thank you,
This is what I have been doing:
with a linear variable x; l
Hi,
I am looking for the best multidimensional configuration for my data (47*47
distance matrix).
I ve tried classical metric (cmdscale) and non metric MDS (isoMDS, nmds)
but it is now difficult to choose the best solution because of the
uncertainties in the definitions of the "stress" function.
Hello,
I would like to convert an Rd object to a latex file, so that I can put
it in my thesis. How can I do it? I tryed latex(), but it only works for
code...
Best,
Dani
--
Daniel Valverde Saubí
Grup de Biologia Molecular de Llevats
Facultat de Veterinària de la Universitat Autònoma de Barce
See R CMD Rdconv --help (at the command line).
[This is in Appendix B of 'An Introduction to R']
On Wed, 20 Feb 2008, Dani Valverde wrote:
Hello,
I would like to convert an Rd object to a latex file, so that I can put
it in my thesis. How can I do it? I tryed latex(), but it only works for
cod
I presume this is isoMDS which is part of package MASS, support software
for a book. The definitions of 'stress' are in that book, and the source
code is part of the package.
It makes no sense to use a metric definition of stress with a non-metric
method of fitting: the original and fitted dis
maybe the xtable package?
On Wednesday 20 February 2008 05:42:27 pm Dani Valverde wrote:
DV> Hello,
DV> I would like to convert an Rd object to a latex file, so that I can put
DV> it in my thesis. How can I do it? I tryed latex(), but it only works for
DV> code...
DV> Best,
DV>
DV> Dani
DV>
Hello,
I've tried with R CMD Rdeconv and it works, but, when I want to paste it
into my main latex file, there are lots of undefined environments. I
loaded the package Rd.sty in the latex document preface, but it does not
seem to work. Any idea?
Best,
Dani
Daniel Valverde Saubí
Grup de Biolog
Dear All,
I am a novice in R and am working on my thesis for
master's in Epidemiology & Biostatistics. While
calculating Cronbach's alpha for the SF-36
questionnaire, I got all 8 of them more than 1. Is it
possible to get alpha more than 1. If yes, please help
me understand it. I read about the neg
On 2/20/2008 11:42 AM, Dani Valverde wrote:
> Hello,
> I would like to convert an Rd object to a latex file, so that I can put
> it in my thesis. How can I do it? I tryed latex(), but it only works for
> code...
> Best,
See ?Rdconv and its references.
Duncan Murdoch
___
Dear all,
I'm having a few problems trying to reshape a data frame. I tried with
reshape{stats} and melt{reshape} but I was missing something. Any help is
very welcome. Please find details below:
#
# data in its original shape:
indiv <- rep(c("A","B"),c(10,10))
le
Rolf Turner wrote:
> For reasons best known only to myself ( :-) ) I wish to create a data
> frame with 0 rows and 9 columns.
>
> The best I've been able to come up with is:
>
> junk <- as.data.frame(matrix(0,nrow=0,ncol=9))
>
> Is there a sexier way?
I'm unsure of their virtue or seedine
On 2/20/2008 1:14 PM, ahimsa campos-arceiz wrote:
> Dear all,
>
> I'm having a few problems trying to reshape a data frame. I tried with
> reshape{stats} and melt{reshape} but I was missing something. Any help is
> very welcome. Please find details below:
>
> #
> #
Thanks to Bill Venables, Gabor Grothendieck, and Tony Plate
all of whom gave me useful advice in answer to my question:
>> For reasons best known only to myself ( :-) ) I wish to create a data
>> frame with 0 rows and 9 columns.
>> The best I've been able to come up with is:
>> junk <- as.da
Well, it turns out to be very simple - just insert a Vectorize between
integrate and function(x).
However, the special cases where C[i,j]==1 make the actual code quite
messy.
It matches pmvnorm {mvtnorm} and pmnorm {mnormt} quite well.
And the recursive method is incredibly slow for higher dimensio
On 20-Feb-08 17:34:33, Smita Pakhale wrote:
> Dear All,
> I am a novice in R and am working on my thesis for
> master's in Epidemiology & Biostatistics. While
> calculating Cronbach's alpha for the SF-36
> questionnaire, I got all 8 of them more than 1. Is it
> possible to get alpha more than 1. If
igraph is a package for graphs and networks. It has a C core and
uses a simple and fast graph representation allowing millions
of vertices and edges.
NEW FEATURES:
- We use the ARPACK library for graph related eigenvalue problems,
like Page Rank calculation, Kleinberg's hub and authority sco
Try
apply(A,2:3,sum)
--- Saurav Pathak <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I cannot seem to figure out how to sum over an index
> of a array.
> For example, let A be a 3 dimensional array. I want
> to, say, find
> the sum over the first dimension. That is
>
> S_jk = Sum_i A_ijk
>
>
Dear R Gurus:
I'm trying to find R on another Linux system.
I'm using the find command, (surprise), but I only want to see the
output where it exists, not all of the other stuff.
Is there an option that I could select, please?
Right now I have
find / -name R
TIA,
Sincerely,
Edna
___
Hi all,
I encountered difficulties when I tried to install the
rgl package. I'm using R devel (2.7.0) on Mac OS X
10.5.1. Below is the message popping up when
compiling the package from source.
I'd be grateful if someone can help me solve the
problem.
Thanks,
Kenneth
* Installing *source* pac
On 20-Feb-08 21:51:54, Edna Bell wrote:
> Dear R Gurus:
>
> I'm trying to find R on another Linux system.
>
> I'm using the find command, (surprise), but I only want to see the
> output where it exists, not all of the other stuff.
>
> Is there an option that I could select, please?
>
> Right no
On Wed, 2008-02-20 at 13:39 -0800, Moshe Olshansky wrote:
> Try
>
> apply(A,2:3,sum)
If speed is an issue, then colSums is a faster version of the above:
> A <- array(c(1:27), dim = c(3,3,3))
> (res1 <- apply(A, 2:3, sum))
[,1] [,2] [,3]
[1,]6 33 60
[2,] 15 42 69
[3,] 24 5
Hi all,
I've been trying out the code from Chamber's "Classes and Methods in the S
language": http://www.omegahat.org/RSMethods/Intro.pdf
>From my session:
R> whatis <- function(object) paste( "sdw" )
R> setMethod( "whatis", "vector", function(object) paste( "cswdvcr" ) )
R> dumpMethod( "whatis"
I am using Sweave in a Makefile-managed LaTeX project. I regenerate the
.tex files automatically when there are changes in the Rnw files, but
this also needs to be done when files that are sourced using source()
are changed.
Is there something that can be done using codetools to discover all th
Hi,
How to order the levels os factor not by alphabetic order but by mean of Y.
Somethink like this:
I have this alphabetic order:
> levels(pH)
[1] "alto" "baixo" "medio"
the order by mean os yvar is:
> sort(tapply(Riqueza,pH,mean))
baixomedio alto
11.56667 20.0 26.8
How
On 20/02/2008 4:54 PM, Kenneth Lo wrote:
> Hi all,
>
> I encountered difficulties when I tried to install the
> rgl package. I'm using R devel (2.7.0) on Mac OS X
> 10.5.1. Below is the message popping up when
> compiling the package from source.
There's been some discussion of this on the R-si
***creating matrix and calculating variance across probesets
x<-1:2
y<-2:141
data.matrix<-data.matrix(data[,y])
variableprobe<-apply(data.matrix[x,],1,var)
hist(variableprobe)
**filter out low variance*
data.sub = data.matrix[order(variableprobe,d
Hi, it seems that the fastbw() in the Design package
only works with variable of class "factor" according
to the help page if I understand correctly. Is there
any R function/package that do stepwise variable
selection for a Cox model with continuous independent
variables?
Thank you
John
Hello, fellow R enthusiasts.
Ok, I've been racking my brain about this small issue, and between
searching the help archives and reading through the plot-related
documentation, I can't figure out how to achieve my desired endpoint
without some ugly, brute force coding.
What I would like to do is m
Try this:
ix <- seq(1, nrow(example.df), 5)
with(example.df[ix,], {
plot(DSR1 ~ StartDate, type = "b", ylim = c(0.3, 0.9))
points(DSR2 ~ StartDate, type = "b", pch = 3)
})
On Wed, Feb 20, 2008 at 6:57 PM, Jessi Brown <[EMAIL PROTECTED]> wrote:
> Hello, fellow R enthusiasts.
>
> Ok, I've be
useR's,
First, I would like to say thanks to John Fox for providing this segment of
code to perform intersection for multiple sets:
intersection <- function(x, y, ...){
if (missing(...)) intersect(x, y)
else intersect(x, intersection(y, ...))
}
I want to execute this function on
array chip wrote:
> Hi, it seems that the fastbw() in the Design package
> only works with variable of class "factor" according
> to the help page if I understand correctly. Is there
> any R function/package that do stepwise variable
> selection for a Cox model with continuous independent
> variabl
Try this:
factor(pH,levels=names(sort(tapply(Riqueza,pH,mean
2008/2/20, Ronaldo Reis Junior <[EMAIL PROTECTED]>:
> Hi,
>
> How to order the levels os factor not by alphabetic order but by mean of Y.
> Somethink like this:
>
> I have this alphabetic order:
>
> > levels(pH)
> [1] "alto" "baixo"
Try this:
do.call(intersection, unname(as.data.frame(t(mat
On Wed, Feb 20, 2008 at 6:45 PM, dxc13 <[EMAIL PROTECTED]> wrote:
>
> useR's,
>
> First, I would like to say thanks to John Fox for providing this segment of
> code to perform intersection for multiple sets:
> intersection <- functio
Dear R-experts,
I am running a script that has the following
structure:
windows(height=5.5,width=8)
dat<-read.csv("myfile.csv")
names(dat)<-c('a','b','c','d')
dat<-dat[,1:4]
xyplot(dat$a~dat$b)
Then I usually save the plot as a PDF (from the
menu in the R console). I can save the PDF tw
lk.list<-split(lk.mat.test,1:nrow(lk.mat.test))
names(lk.list)<-NULL
do.call(intersection,lk.list)
2008/2/20, dxc13 <[EMAIL PROTECTED]>:
>
> useR's,
>
> First, I would like to say thanks to John Fox for providing this segment of
> code to perform intersection for multiple sets:
> intersection <- f
Thanks Gabor, that works great!
Gabor Grothendieck wrote:
>
> Try this:
>
> do.call(intersection, unname(as.data.frame(t(mat
>
>
> On Wed, Feb 20, 2008 at 6:45 PM, dxc13 <[EMAIL PROTECTED]> wrote:
>>
>> useR's,
>>
>> First, I would like to say thanks to John Fox for providing this segmen
Hi Judith,
If I undestand, see ?savePlot and try this
xyplot(dat$a~dat$b)
savePlot(filename="C:\\yourname",type=c("pdf"),device=dev.cur())
I hope this helps.
Jorge
On 2/20/08, Judith Flores <[EMAIL PROTECTED]> wrote:
>
> Dear R-experts,
>
> I am running a script that has the following
> s
Try this:
library(lattice)
xyplot(DSR1 + DSR2 ~ StartDate, example.df, type = "b", pch = c(1, 3),
subset = seq(1, nrow(example.df), 5))
On Wed, Feb 20, 2008 at 8:57 PM, Jessi Brown <[EMAIL PROTECTED]> wrote:
> Thanks for the ideas so far, Gabor and Phil.
>
> I was hoping to find a solution that
Thanks for the ideas so far, Gabor and Phil.
I was hoping to find a solution that didn't depend on building another
data frame, but if that's the easiest way, I can certainly do it
through that route. At least your solutions involve fewer lines of
code than I had devised for extracting the desired
On Wed, Feb 20, 2008 at 6:02 PM, Ronaldo Reis Junior <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How to order the levels os factor not by alphabetic order but by mean of Y.
> Somethink like this:
>
> I have this alphabetic order:
>
> > levels(pH)
> [1] "alto" "baixo" "medio"
>
> the order by mean o
On 20/02/2008 7:44 PM, Judith Flores wrote:
> Dear R-experts,
>
>I am running a script that has the following
> structure:
>
> windows(height=5.5,width=8)
>
> dat<-read.csv("myfile.csv")
> names(dat)<-c('a','b','c','d')
> dat<-dat[,1:4]
>
> xyplot(dat$a~dat$b)
>
>
>Then I usually save
Thank you, that also works perfectly! I am not sure which method works more
efficiently, but they are both instantaneous and give the correct result.
Thanks
Derek
Henrique Dallazuanna wrote:
>
> lk.list<-split(lk.mat.test,1:nrow(lk.mat.test))
> names(lk.list)<-NULL
> do.call(intersection,lk
useR's,
Consider the variables defined below:
yvals <- c(25,30,35)
x1 <- c(1,2,3)
x2 <- c(3,4,5)
x3 <- c(6,7,8)
x <- as.data.frame(cbind(x1,x2,x3))
delta <- c(2.5, 1.5, 0.5)
h <- delta/2
vars <- 3
xk1 <- seq(min(x1)-0.5, max(x1)+0.5, 0.5)
xk2 <- seq(min(x2)-0.5, max(x2)+0.5, 0.5)
xk3 <- seq(min(x
Hi,
this might also work for You:
> points(example.df$StartDate[ (row(example.df)%%5)==0 ],
example.df$DSR2[ (row(example.df)%%5)==0 ], type="p", pch=3)
> points(example.df$StartDate[ (row(example.df)%%5)==0 ],
example.df$DSR2[ (row(example.df)%%5)==0 ], type="p", pch=3)
Kind regads,
Kimmo
Je
Hi,
sorry, the correct commands should look like this:
> plot(example.df$StartDate[ (row(example.df)%%5)==0 ], example.df$DSR1[
(row(example.df)%%5)==0 ], type="p", ylim=c(0.3,0.9))
> points(example.df$StartDate[ (row(example.df)%%5)==0 ],
example.df$DSR2[ (row(example.df)%%5)==0 ], type="p", pc
R-users,
I have two vectors (of timestamps)
d1 <- as.POSIXct(strptime("2.2.2002 07:00", format="%d.%m.%Y %H:%M"))
d2 <- as.POSIXct(strptime("4.2.2002 07:00", format="%d.%m.%Y %H:%M"))
seq1 <- seq(d1, d2, "hours")
seq1
d3 <- as.POSIXct(strptime("2.2.2002 15:22", format="%d.%m.%Y %H:%M"))
d4 <- as
Dear R users,
i am fairly new to R and am having trouble creating code to solve a problem.
I've searched the list, combed Crawley's 'R book' and several others, but
can't quite find what i want.
I want to generate permutations of various 'blocks' of 14 numbers. Each
number within a block is a ch
Since both sequences are in hourly steps, there is a fairly easy way to
do this:
> before <- colSums(outer(seq1, seq2, "<"))
> sort(c(seq1[before], seq1[before+1]))
This uses the fact that both sequences are in hourly time steps, so the
time stamp 'just after' the member of seq2 is the next one
Hi, I would like to ask here one stat related question. Suppose Z ~
Skew-Normal(0,1,1). Now I want to find a variable f: Z -> Y which has Z ~
Skew-Normal(0,1,lambda) distribution. Can anyone give me some light how to do
that?
Regards,
-
[[
Hi, I would like to ask here one stat related question. Suppose Z ~
Skew-Normal(0,1,1). Now I want to find a variable f: Z -> Y which has Y~
Skew-Normal(0,1,lambda) distribution. Can anyone give me some light how to do
that?
Regards,
-
[[a
75 matches
Mail list logo