Hi Phil,
Thanks for the reply, but I don't think you have
explained where the decimal part is coming from
...Tao
- Original Message -
From:Phil Spector spec...@stat.berkeley.edu
To:Shi, Tao shida...@yahoo.com
Cc:r-h...@stat.math.ethz.ch
Sent:Friday, October 29, 2010 5:04:23
Hi Ben,
That must be the case! In fact if I do:
difftime(strptime(24NOV2004, format=%d%b%Y),
strptime(13MAY2004,format=%d%b%Y), units=days, tz=GMT)
Time difference of 195 days
which supports your claim.
Can someone from the R development team confirm this?
Thanks!
...Tao
-
On Fri, Oct 29, 2010 at 11:02 PM, Shi, Tao shida...@yahoo.com wrote:
Hi Ben,
That must be the case! In fact if I do:
difftime(strptime(24NOV2004, format=%d%b%Y),
strptime(13MAY2004,format=%d%b%Y), units=days, tz=GMT)
Time difference of 195 days
which supports your claim.
Can someone
On Sat, 30 Oct 2010, Gang Chen wrote:
Hi,
I'm trying to install the gsl wrapper source code
(http://cran.r-project.org/src/contrib/gsl_1.9-8.tar.gz) on a Linux
system (OpenSuse 11.1), but encountering the following problem. I've
already installed 'gsl' version 1.14
You nailed it, Prof. Ripley! Thanks a lot...
Gang
On Sat, Oct 30, 2010 at 2:58 PM, Prof Brian Ripley
rip...@stats.ox.ac.uk wrote:
On Sat, 30 Oct 2010, Gang Chen wrote:
Hi,
I'm trying to install the gsl wrapper source code
(http://cran.r-project.org/src/contrib/gsl_1.9-8.tar.gz) on a Linux
I have set of n coordinates xc, yc (but not a grid!) and n observations obs
at these points.
Where to find a simple plot function (3D perspective) that plots a polygon
(alternative: just segmented points over a map, as eg in library maps).
rgl.surface(xc,yc,obs) is not working.
Thanks
W.Polasek
Hello everyone.
I have written quite a big function that at the end correctly returns the
values
I want. I found a rare exception that I want to cover also. The easier for me
would be to write something like that
function(){
if (rare exception happened)
return that value
# The
On Sat, Oct 30, 2010 at 11:09 AM, Alaios ala...@yahoo.com wrote:
Hello everyone.
I have written quite a big function that at the end correctly returns the
values
I want. I found a rare exception that I want to cover also. The easier for me
would be to write something like that
function(){
Hi
I would like to transform a data frame like
SubjectItem Score
Subject 1 Item 1 1
Subject 1 Item 2 0
Subject 1 Item 3 1
Subject 2 Item 1 1
Subject 2 Item 2 1
Subject 2 Item 3 0
*to *
Subject Item1 Item2 Item3 .Item N
Subject1 1 0 1
Subject2
On Oct 29, 2010, at 11:16 PM, Dennis Murphy wrote:
Hi:
x - matrix(20:35, ncol = 1)
u - c(1, 4, 5, 6, 11) # 'x values'
m - c(1, 3, 1, 1, 0.5)
# Function to compute the inner product of the multipliers with the
extracted
# elements of x determined by u
f - function(mat, inputs, mults)
An interesting exchange.
The package has some installation tips in Misc.Rd, but
perhaps these are not sufficiently prominent. I think it'd
be a good idea to include a READ.ME file in
inst/doc with installation information,
and include a pointer to this
in the DESCRIPTION file; I'll adapt parts
David Winsemius wrote:
On Oct 29, 2010, at 12:08 PM, David Winsemius wrote:
On Oct 29, 2010, at 11:37 AM, dpender wrote:
Apologies for being vague,
The structure of the output is as follows:
Still no code?
I am using the Clusters function from the evd package
$ cluster1 :
A more usable problem input would definitely help ... use dput to send a
reproducible sample to the group
Think the below should solve your problem
read.csv(Book1.csv)
Subject Item Score
1 Subject 1 Item 1 1
2 Subject 1 Item 2 0
3 Subject 1 Item 3 1
4 Subject 2 Item 1 1
5
On 30.10.2010 13:50 (UTC+1), Santosh Srinivas wrote:
A more usable problem input would definitely help ... use dput to send a
reproducible sample to the group
Think the below should solve your problem
read.csv(Book1.csv)
Subject Item Score
1 Subject 1 Item 1 1
2 Subject 1 Item 2
David Winsemius dwinsem...@comcast.net writes:
Aha.. thankyou, I was not aware of that.
Now you have changed plotting functions from plot and barplot over to
barchart (a Lattice function) and were not aware of FAQ 7.22:
On Oct 30, 2010, at 7:49 AM, dpender wrote:
David Winsemius wrote:
On Oct 29, 2010, at 12:08 PM, David Winsemius wrote:
On Oct 29, 2010, at 11:37 AM, dpender wrote:
Apologies for being vague,
The structure of the output is as follows:
Still no code?
I am using the Clusters
On Fri, Oct 29, 2010 at 6:54 PM, M.Ribeiro mresende...@yahoo.com.br wrote:
So, I am having a tricky reference file to extract information from.
The format of the file is
x 1 + 4 * 3 + 5 + 6 + 11 * 0.5
So, the elements that are not being multiplied (1, 5 and 6) and the elements
before
How can I overload the [ and [- operators using S3 classes?
Something like '['.{class} did not work or at least I do not know how to define
it properly.
For S4 it is straightforward:
setMethod([, signature(x = myClass, i = numeric),
function (x, i, j, ..., drop){
...
Thanks a lot :)
From: Liviu Andronic landronim...@gmail.com
Cc: Rhelp r-help@r-project.org
Sent: Sat, October 30, 2010 11:31:35 AM
Subject: Re: [R] one function with 2 returnh points
Hello everyone.
I have written quite a big function that at the end
On Sat, Oct 30, 2010 at 9:03 AM, Mark Heckmann mark.heckm...@gmx.de wrote:
How can I overload the [ and [- operators using S3 classes?
Something like '['.{class} did not work or at least I do not know how to
define it properly.
For S4 it is straightforward:
setMethod([, signature(x =
Another way:
x - list(c(9, 5, 7, 2, 14, 4, 4, 3), c(3, 6, 25, 2, 14, 3, 3, 4),
c(28, 4, 14, 3, 14, 2, 4, 5), 28)
apply(array(unlist(lapply(x, '[', 1:max(sapply(x, length, dim = c(1, 8,
4)), 1:2, mean, na.rm = TRUE)
or
rowMeans(as.data.frame(lapply(x, '[', 1:max(sapply(x, length,
On Oct 30, 2010, at 8:42 AM, Gabor Grothendieck wrote:
On Fri, Oct 29, 2010 at 6:54 PM, M.Ribeiro
mresende...@yahoo.com.br wrote:
So, I am having a tricky reference file to extract information from.
The format of the file is
x 1 + 4 * 3 + 5 + 6 + 11 * 0.5
So, the elements that are not
Hi,
I was trying to solve for m such that,
choose(n-1,k-1)+choose(n-2,k-1)+...+choose(n-m+1,k-1) - ck=0
ck is calculated by the way given in the code. Now I solved for m using uniroot
but the error messages appeared.
n-30
k=3
alpha-0.05
nk-choose(n,k);
On Sat, Oct 30, 2010 at 9:43 AM, David Winsemius dwinsem...@comcast.net wrote:
On Oct 30, 2010, at 8:42 AM, Gabor Grothendieck wrote:
On Fri, Oct 29, 2010 at 6:54 PM, M.Ribeiro mresende...@yahoo.com.br
wrote:
So, I am having a tricky reference file to extract information from.
The format
On 10-10-30 02:02 AM, Shi, Tao wrote:
Hi Ben,
That must be the case! In fact if I do:
difftime(strptime(24NOV2004, format=%d%b%Y),
strptime(13MAY2004,format=%d%b%Y), units=days, tz=GMT)
Time difference of 195 days
which supports your claim.
Can someone from the R development
On Oct 30, 2010, at 9:22 AM, Ben Bolker wrote:
On 10-10-30 02:02 AM, Shi, Tao wrote:
Hi Ben,
That must be the case! In fact if I do:
difftime(strptime(24NOV2004, format=%d%b%Y),
strptime(13MAY2004,format=%d%b%Y), units=days, tz=GMT)
Time difference of 195 days
which supports
On 10/29/2010 05:41 AM, Dennis Murphy wrote:
Hi:
Make grade an ordered factor:
grade - factor(grade, levels = c('G', 'VG', 'MVG'))
as.numeric(as.character(grade)) will convert to numeric scores 1, 2 and 3,
respectively, corresponding to the numerical codes of the ordered levels.
Not quite:
Friends -
I am pretty excited for the following talk and I was wondering
if there is a similar solution for C#. I googled but didn't find a
good solution. Previously, I let C# to send R code to Rscript.exe.
But it is not an integrated solution.
Integrating R with C++: Rcpp, RInside, and
On 10/29/2010 06:24 AM, Steven McKinney wrote:
wilcox.test(as.integer(grade) ~ sex, data = gradesbysex)
Wilcoxon rank sum test with continuity correction
data: as.integer(grade) by sex
W = 4.5, p-value = 0.2695
alternative hypothesis: true location shift is not equal to 0
Hi,
Suppose I want to compare the results of two clustering methods, what
is the best way to do it? Thanks
Regards,
-k
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Hi listers,
I am trying to plot some confidence intervals. The function FORESTPLOT,
would work, but I need something more simple. I dont need to define the text
labels. Is there another function that I can plot some confidence intervals.
Thanks in advance,
Marcio
--
View this message in context:
Subject: plot
Your recent reply has got me underway. However the savePlot command is not
working.
I am following refman example. Any thoughts?
I am on a new windows 7 os. I am not sure how to open a new device (output
graphic
window). I wonder if that could be the problem?
R Code
Here is one example:
I have three vectors (mean,lower interval, upper interval)
mean-c(2,4,6,8)
l-c(1,2,3,4)
u-c(4,8,12,16)
How would I plot that if I want to use the FORESTPLOT function. I dont need
to use the TABLETEXT option.
I am working in something like this:
tabletext-c(NA,NA,NA,NA,NA)
On 30.10.2010 17:23, mms...@comcast.net wrote:
Subject: plot
Your recent reply has got me underway. However the savePlot command is not
working.
I am following refman example. Any thoughts?
I am on a new windows 7 os. I am not sure how to open a new device (output
graphic
window). I
On Oct 30, 2010, at 9:55 AM, Shant Ch wrote:
Hi,
I was trying to solve for m such that,
choose(n-1,k-1)+choose(n-2,k-1)+...+choose(n-m+1,k-1) - ck=0
ck is calculated by the way given in the code. Now I solved for m
using uniroot
but the error messages appeared.
n-30
k=3
alpha-0.05
Just starting on my journey to learn R and the book I am using is Using R for
Introductory Statistics
One of the problems (page 15, 1.10) goes as follows:
The monthly sales fig for 2002 were (2700, 2600, 3050, . . ). Using diff() find
the month with greatest increase from prev month.
I
Hi Sudhakar,
Take a look at ?which.max
msales - c(2700, 2600, 3050)
names(msales) - c(Jan, Feb, Mar)
names(which.max(diff(msales)))
# [1] Mar
HTH,
Jorge
On Sat, Oct 30, 2010 at 12:27 PM, Sudhakar Kumar wrote:
Just starting on my journey to learn R and the book I am using is Using R
for
Hi all,
how can i make the following loop faster?
vv[20001,22]=v[20001,22]
for(k in 21:1) {
for(j in 20001:2) {
vv[j-1,k+1]=min(xx[j-1]*v[j-1,k+1],vv[j,k+1])
v[j,k]=h[1,k]+vv[j-1,k+1]
}
vv[20001,k]=v[20001,k]
}
Thanks
Lorenzo
--
Caselle da 1GB, trasmetti allegati fino a 3GB
Thanks Jorge. That is very helpful. Hadnt seen 'which' yet.
So it is a matter of combining functions if I wanted both the value and the
month?
From: jorgeivanve...@gmail.com
Date: Sat, 30 Oct 2010 12:33:12 -0400
Subject: Re: [R] Using names function
To: ksudha...@live.com
CC:
On Oct 30, 2010, at 12:27 PM, Sudhakar Kumar wrote:
Just starting on my journey to learn R and the book I am using is
Using R for Introductory Statistics
One of the problems (page 15, 1.10) goes as follows:
The monthly sales fig for 2002 were (2700, 2600, 3050, . . ). Using
diff() find
Hi Sudhakar,
Use
diff(msales)[which.max(diff(msales))]
HTH,
Jorge
On Sat, Oct 30, 2010 at 12:38 PM, Sudhakar Kumar wrote:
Thanks Jorge. That is very helpful. Hadnt seen 'which' yet.
So it is a matter of combining functions if I wanted both the value and the
month?
From:
Date: Sat,
Let's assume that according to Anova(lm(y~a*b, data=d)) the a:b interaction is
significant, and I would like to know if there are specific combinations of a
and b levels that differ from the control group. Are there any caveats against
simply looking at the p-values in the output generated by
HI,
I am using lmer() for a simple mixed effects model. The model is of the form
logit(y)~ x + (1|z), where x is an indicator variable and z a multi-level
factor.
I would like an estimate of the response variable (either y or logit y) with
an associated confidence interval for a given value of
Hi, All
I got trouble on installing the qvalue package. Error message: package
'tcltk' does not have a name space
[cch...@ibibmem Yale_CB]$ R CMD INSTALL qvalue.tar.gz
* installing to library '/cchome/cchen1/R/x86_64-unknown-linux-gnu-library/2.10'
* installing *source* package 'qvalue' ...
**
Peter Dalgaard pda...@gmail.com [2010.10.30] wrote:
I wouldn't bother with that. The p-value is based on the correct
covariance matrix of the rank sums, tie-breaking just adds noise to the
analysis.
Good to know.
If you really want an exact p-value, package exactRankTests is
In this case I
Hi,
I know this is probalby a very trivial thing to do for most of the R users, but
since I just strated using it I have some problems
I have a data.frame with a field called razred. This field has values from 1
up to 15.
Is it possible to create a for loop that would create a new
Brian Willis brian.willis at manchester.ac.uk writes:
I am using lmer() for a simple mixed effects model. The model is of the form
logit(y)~ x + (1|z), where x is an indicator variable and z a multi-level
factor.
I would like an estimate of the response variable (either y or logit y) with
On Oct 30, 2010, at 2:07 PM, Matevž Pavlič wrote:
Hi,
I know this is probalby a very trivial thing to do for most of the R
users, but since I just strated using it I have some problems
I have a data.frame with a field called razred. This field has
values from 1 up to 15.
Is it
Hi Matevž,
Perhaps split() is what you are looking for:
# some data
x - rep(rpois(5, 10), 4)
y - rnorm(20)
d - data.frame(x, y)
d
split(d, x)
See ?split and ?strsplit for more information.
HTH,
Jorge
On Sat, Oct 30, 2010 at 2:07 PM, Matevž PavliÄ wrote:
Hi,
I know this is
On Oct 30, 2010, at 11:33 AM, Brian Willis wrote:
HI,
I am using lmer() for a simple mixed effects model. The model is of
the form
logit(y)~ x + (1|z), where x is an indicator variable and z a multi-
level
factor.
I would like an estimate of the response variable (either y or logit
y)
Let's say I've run Anova(lm(y~a*b)) and found the a:b interaction to be
significant. Now I'm interested in which specific level combinations of
a and b significantly differ from the control group. Can I use the
t-tests from summary(lm(y~a*b)) to answer that question?
I saw no mention of
Hi List,
Is there any way to pass on directly VBA variable content into a R variable?
on windows XP using R 2.12.0
I have installed RExcel addin (with associated D(COM))
It function fine when trying to pass Excel Range to R but I failed (sorry if
it is only my own limitation, search
Just one more thing...
I get a list with 15 data.frames :
List of 15
$ 1:'data.frame': 7 obs. of 9 variables:
..$ vrtina : Factor w/ 6 levels T1A-1,T1A-2,..: 1 1 2 2 5 5 5
..$ globina.meritve: num [1:7] 7.6 8.5 10.4 17.4 12.5 15.5 16.5
..$ E0 : num [1:7] 4109 2533
On Oct 30, 2010, at 3:00 PM, Matevž Pavlič wrote:
Just one more thing...
I get a list with 15 data.frames :
List of 15
$ 1:'data.frame': 7 obs. of 9 variables:
..$ vrtina : Factor w/ 6 levels T1A-1,T1A-2,..: 1 1 2 2
5 5 5
..$ globina.meritve: num [1:7] 7.6 8.5 10.4 17.4
Look at the macro
RInterface.PutArrayFromVBA
documented in the RExcel help file.
Please send followup questions on RExcel and statconnDCOM to
the mailing list at
statconnDCOM, rcom, and RExcel server related issues
rco...@mailman.csd.univie.ac.at
Rich
On Sat, Oct 30, 2010 at 1:44 PM, julien
Hi Ben and Josh,
No, I don't think that there is a bug. It's just due to my lack of knowledge
on Date class, I was simply amazed that it has the daylight saving time built
in at first. But on the second thought, it really should.
Thank you all for the explanations!
...Tao
From: Ben
I think this demonstrate on of the differences between Class 'Date' and
'POSIXlt'. Thanks, Marc!
...Tao
From: Marc Schwartz marc_schwa...@me.com
To: Ben Bolker bbol...@gmail.com
Cc: Shi, Tao shida...@yahoo.com; r-h...@stat.math.ethz.ch
r-h...@stat.math.ethz.ch
Sent: Saturday, October 30,
Check this out:
http://www.rforge.net/doc/packages/NCStats/compSlopes.html
However, it looks like one need to install NCStats
(http://www.rforge.net/NCStats/files/).
Or is there a more mainstream method of running multiples
comparisons among slopes?
Dimitri
On Sat, Oct 30, 2010 at 1:20 PM,
Dear all,
I am doing
library(survival)
fit - coxph(Surv(futime,fustat) ~ rx, ovarian)
plot(survfit(fit,newdata=ovarian),col=c(1,2))
legend(bottomleft, legend=c(rx = 0, rx = 1),
lty=c(1,2),col=c(1,2))
Is this correct to compare these two groups? Is the 0.31 the p-value that
the median f
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of govin...@msu.edu
Sent: Friday, October 29, 2010 11:56 AM
To: r-help@r-project.org
Subject: Re: [R] doubt in climate variability analysis in R! - code
included!
the
On 10/30/2010 03:34 PM, Dimitri Liakhovitski wrote:
You are asking a statistics question, not an R question. R-list people
never react to such posts.
Or they give you a nasty reply of the type: Do you homework first,
and then ask questions here.
Good point. I thought it was an R question
---BeginMessage---
I am sorry, i think the link was broken..! here is the correct one!!![1]
http://www.4shared.com/file/4zV0g3JR/RF_80-85.htmlÂ
--
Regards,
Mahalakshmi
Graduate Student
#20, Department of Geography
Michigan State University
East Lansing, MI 48824
Here is a small function for forest plots in R, with an example:
http://biostatmatt.com/wiki/r-credplot
-Matt
On Sat, 2010-10-30 at 11:40 -0400, Mestat wrote:
Here is one example:
I have three vectors (mean,lower interval, upper interval)
mean-c(2,4,6,8)
l-c(1,2,3,4)
u-c(4,8,12,16)
How
Then look at that package I referred in the other e-mail. It does
exactly what you need - I am just not sure if it's still available.
The author's e-mail is there, though - you can ask.
Good luck.
Dimitri
On Sat, Oct 30, 2010 at 5:04 PM, Alex Bokov bo...@uthscsa.edu wrote:
On 10/30/2010 03:34
On Oct 30, 2010, at 4:36 PM, cheba meier wrote:
Dear all,
I am doing
library(survival)
fit - coxph(Surv(futime,fustat) ~ rx, ovarian)
plot(survfit(fit,newdata=ovarian),col=c(1,2))
legend(bottomleft, legend=c(rx = 0, rx = 1),
lty=c(1,2),col=c(1,2))
Is this correct to compare these
It depends on how your clustered objects are stored.
As written here: http://www.statmethods.net/advstats/cluster.html
The function *cluster.stats() *in the
*fpchttp://cran.r-project.org/web/packages/fpc/index.html
* package provides a mechanism for comparing the similarity of two cluster
I can't see how to vectorized your code, maybe it's possible.
That leaves you with either using parallel processing (for example using the
foreach package)
Or, If you know C, you could put that calculation into a C code inside the R
code using Rcpp.
There was a recent video on the topic on a
Hi,
In general, the way to speed up for loops in R is to avoid them. It
looks like some of the operations could be vectorized (e.g., h[1,k] +
vv[j-1,k+1] looks like you could just add entire columns at once). If
you provide sample data for all the variables in your loop, it will be
possible to
Hi,
is it possible to easily change the return value for the grep function
for cases where there is no match, for example the value 0 or No
instead of integer (0) )?
Thanks, Uli
__
R-help@r-project.org mailing list
On Oct 30, 2010, at 10:51 PM, Ulrich wrote:
Hi,
is it possible to easily change the return value for the grep
function for cases where there is no match, for example the value 0
or No instead of integer (0) )?
Seems like is should be pretty easy. Test for length(grep(...)) == 0
or
Hi:
If your objective is to make 15 plots, one for each level of razred, then
you don't need to make 15 individual data frames first. The lattice and
ggplot2 packages allow conditioning plots. You haven't mentioned what types
of plots you're interested in getting, but if it's something simple
On Sat, Oct 30, 2010 at 10:51 PM, Ulrich ulrich.schle...@stanford.edu wrote:
Hi,
is it possible to easily change the return value for the grep function for
cases where there is no match, for example the value 0 or No instead of
integer (0) )?
Try this:
Find(length, list(grep(X, letters),
On Oct 30, 2010, at 11:13 PM, David Winsemius wrote:
On Oct 30, 2010, at 10:51 PM, Ulrich wrote:
Hi,
is it possible to easily change the return value for the grep
function for cases where there is no match, for example the value 0
or No instead of integer (0) )?
Seems like is
From: Abhijit Dasgupta adasgu...@araastat.com
Date: October 31, 2010 1:30:02 AM EDT
To: Matt Shotwell shotw...@musc.edu
Subject: Re: [R] ForestPlot or similar
I just did something very similar using ggplot's pointrange geom. In the
following, I'm plotting hazard ratios, for which the
74 matches
Mail list logo