Hi,
There are several things that would be helpful for us to help you.
First off, please do read the posting guide:
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
a reproducible example will do wonders for your chances of getting a
clear, easy to understand respon
Hi Alex,
Michael is correct that vectorizing this is the way to go. Since this
is for class and vectorizing requires a bit of thought, I am not going
to demonstrate it with your function; however, here are some very
minor changes you can make that give fairly substantial performance
increases. I
Hi Colin,
I have never heard of a binomial distribution z statistic with (or
without for that matter) a continuity correction, but I am not a
statistician. Other's may have some ideas there. As for other ways
to analyze the data, I skimmed through the article and brought the
data and played arou
Hi, I'm trying to run a ICC calculation on a data frame. I get the following
error message:
Error in data.frame(x.s, subs = rep(paste("S", 1:n.obs, sep = ""), nj)) :
arguments imply differing number of rows: 1700, 1750
I've looked at the data in the file and it seems to be okay. Any thoughts
w
Also, vectorize this puppy - that's how you really get the best performance out
of R, but in this case it will easily get rid of your problem.
Michael
On Nov 19, 2011, at 11:31 PM, Peter Langfelder
wrote:
> Well, you assign numeric(0) or numeric(0)+1, which is still
> numeric(0). No wonder t
Hi,
x1 <- c(as.Date("20110101","%Y%m%d"),as.Date("2012-01-01","%Y-%m-%d"));
x2 <- c("1","2");
ddf <- data.frame(x=x1,y=x2);
ddf[["y"]] <- as.factor(ddf[["y"]])
write.arff(ddf, file="D:/ddf.arff")
Content of ddf.arff is
@relation ddf
@attribute x numeric
@attribute y {'1','2'}
@data
2011
Well, you assign numeric(0) or numeric(0)+1, which is still
numeric(0). No wonder the return value is always numeric(0).
You probably need to replace numeric(0) simply by 0. Numeric(0) does
not mean 0, it means a numeric vector of length zero (i.e., empty).
HTH,
Peter
On Sat, Nov 19, 2011 at 6:
On 20/11/11 16:27, Carl Witthoft wrote:
This question attacked me as I was thinking about matrix value updates.
I probably will never need to do this, but wanted to ask if there are
efficient methods to perform the for-loop in the following sequence.
%xymat<-matrix(rep(0,100) nr=10,nc=10) #
Though it seems a pity to even hint, what value have you assigned to "phat"
and what is the value returned when the function runs?
On Saturday, November 19, 2011 18:52:20 alex_janssen wrote:
> Hi,
>
> I am trying to code buffons needle in R for a class
>
> This is my code w/ output from R, if a
This question attacked me as I was thinking about matrix value updates.
I probably will never need to do this, but wanted to ask if there are
efficient methods to perform the for-loop in the following sequence.
%xymat<-matrix(rep(0,100) nr=10,nc=10) # empty matrix
%x<-1:10
%y<-sample.int(10,1
I think the function you're looking for is
fitdistr
in the MASS package. You can find most MLEs there.
--
View this message in context:
http://r.789695.n4.nabble.com/Fitting-a-Weibull-Distribution-tp892609p4087698.html
Sent from the R help mailing list archive at Nabble.com.
__
Hi,
I am trying to code buffons needle in R for a class
This is my code w/ output from R, if anyone could tell me why this is
happening it would be amazing,
I can generate correct results without putting the steps into a function but
alas that is the assignment.
> buffon = function(n){
+ x = NUL
Hi,
I am not clear what your goal is. There is a variety of data there.
You could look at t-test differences in preIntensity broken down by
sex, you could use regression looking at postIntensity controlling for
preIntensity and explained by age, you could
Why are you analyzing data from an a
Dear R-List,
Is there any way to handle NA's within tree objects themselves in
terms of the predict.tree( )? I understand that if there is an NA at a
split in a certain variable, the prediction is classified at that node and
not dropped further down the tree. Are there any other and possibly
Dear R experts,
I am trying to analyze data from an article, the data looks like this
Patient Age Sex Aura preCSM preFreq preIntensity postFreq postIntensity
postOutcome
1 47 F A 4 6 9 2 8 SD
2 40 F A/N 5 8 9 0 0 E
3 49 M N 5 8 9 2 6 SD
4 40 F A 5 3 10 0 0 E
5 42 F N 5 4 9 0 0 E
6 35 F N 5 8 9 12
Inline below. -- Bert
On Sat, Nov 19, 2011 at 1:06 PM, David Winsemius wrote:
>
> On Nov 19, 2011, at 1:15 PM, Bert Gunter wrote:
>
>> Folks:
>>
>> David: I believe your approach needs to be modified to accommodate
>> hundreds of matrices per the OP's specification.
>
> I suggested that my approa
No, you use it once and it does the whole vector at once.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
L
Ah,
so that's how ifelse gets used...
Presumably if I had more than 2 non-missing values in the
control variable, I could use it several times.
Thank you very much, for a really useful answer, and thanks
for getting back so quickly!
All the best,
Anthony Staines
On 11/19/11 23:55, David Wi
On Nov 19, 2011, at 6:31 PM, Anthony Staines wrote:
Dear colleagues,
I would be very grateful for your help with the following. I have
banged my head off this question several times in the past, and
repeatedly over the last week. I have looked in the usual places and
found no obvious sol
Dear colleagues,
I would be very grateful for your help with the following. I
have banged my head off this question several times in the
past, and repeatedly over the last week. I have looked in
the usual places and found no obvious solution. I fear that
this just means I didn't recognize it,
Another few data points, just for the heck of it. This is on a 2.66GHz
Intel Core Duo iMac.
Rgames> system.time(plot(runif(1e6),runif(1e6)))
user system elapsed
34.405 0.079 34.432
Rgames> system.time(plot(runif(1e6),runif(1e6),pch='.'))
user system elapsed
12.602 0.032 12.596
The trailing space (instead of '0') in the
third line of the printout of z, the fact that
the decimal points are not aligned in the columns,
and the left- justification of the column labels
are hints that z is not a matrix of numbers, but just
prints something like one.
*> z*
* [,1] [,2]
Your call to persp() is fine, and works just fine for me.
Obviously there is something funny about your data
(x, y, and z). They must not be numeric (despite appearances).
There is something you haven't told us here; how did you
obtain/construct x, y, and z?
Try the following:
x <- y <- 5*(0:
Dear mailing list,
I'd like to inform you about XIII Meeting GRASS and GFOSS, that will take place
from 15th to 17th February 2012 at University of Trieste (edificio H3, aula
magna) in Trieste (Italy).
The meeting will involve both GRASS users both open source software and data
users.
More in
On Nov 19, 2011, at 3:19 PM, John Benning wrote:
Hi, and thanks in advance for any assistance,
I'm new to R and to this mailing list, and am having trouble with
the *
persp()* function. I've got a matrix (z) of values for various
combinations
of x and y, each of which is a set of (0, 5, 10
On 19.11.2011 22:21, Erin Hodgess wrote:
Dear R People:
There is a regression data set in which there are 4 sets of data and
the x values are the same in all 4. The y values change somewhat.
I thought it was the Longley data set, but that is US economic data.
Does anyone know the name of th
Dear R People:
There is a regression data set in which there are 4 sets of data and
the x values are the same in all 4. The y values change somewhat.
I thought it was the Longley data set, but that is US economic data.
Does anyone know the name of that other set, please?
Thanks,
Erin
--
Eri
Hi, and thanks in advance for any assistance,
I'm new to R and to this mailing list, and am having trouble with the *
persp()* function. I've got a matrix (z) of values for various combinations
of x and y, each of which is a set of (0, 5, 10, 15, 20). But when I try *
persp(x,y,z)*, I get an "*inv
Then see the latter part of my note. I think also that, at least for the
median, the survival package will compute it more quickly for inclusion in a
bootstrap loop. Note that you forgot to state require(survival) or
library(survival) below.
Frank
swatch110362 wrote:
>
> Thanks for your help.
On Nov 19, 2011, at 1:15 PM, Bert Gunter wrote:
Folks:
David: I believe your approach needs to be modified to accommodate
hundreds of matrices per the OP's specification.
I suggested that my approach was most applicable if the questioner had
his matrices already in a list. (He didn't say,
Uwe,
thanks it worked just fine.
I think I was confused by the fact that .Rprofile sets the library path
properly when I use R interactively or it BATCH mode but I need to set my
R_LIBS (in .Renviron worked for me) when I use "R CMD build".
In any case it fixes my problem so many thanks again,
V
On 19.11.2011 20:19, avinash barnwal wrote:
Hi,
Thanks for realizing my mistakes
Sorry for the typo mistakes, first i m storing the array then doing the
operations. But that is not my issue, i m suppose to fill the area of plot
wherever a2>a3 . May be through polygon it would be tough to compl
Hi,
Thanks for realizing my mistakes
Sorry for the typo mistakes, first i m storing the array then doing the
operations. But that is not my issue, i m suppose to fill the area of plot
wherever a2>a3 . May be through polygon it would be tough to complete .
Looking for some hep through ggplot2
2011
1. Perhaps it is easier to explain what the result should be than
explaining your algorithm. There may be an easier approach to it.
2. Your code is not reproducible for us, since we do not have the full
data nor disc, radius, .
Uwe Ligges
On 18.11.2011 02:20, ftonini wrote:
Ok guys, a
On 18.11.2011 18:06, Karl Weinmayer wrote:
Hi,
I am looking to build even quintiles for a set of data. I managed to get it
done, but I would like to know if there is a more direct way to write the
data from my loop output x in the bottom of the code into the "empty" matrix
p1, which I filled w
On 18.11.2011 23:48, avinash barnwal wrote:
Hi,
I am looking forward to fill the plot using conditions on variables a2 and
a3. Whenever variable(a2) goes above variable(a3) i fill it with some color
.
I am storing the coordinates of a2 and a3 in x and y as well as time where
it is occurring .
Folks:
David: I believe your approach needs to be modified to accommodate
hundreds of matrices per the OP's specification.
However, I would say that this is exactly the situation in which
arrays should be used. Not only does it appear simpler, but it also
could be faster since once the array is c
On 19.11.2011 00:14, Vincent Plagnol wrote:
Dear colleagues,
I am having issues trying to build a R package I recently wrote.
I am using R 2.14.0 and my package depends on another package called aod.
Running:
R CMD Sweave vignette.Rnw
is perfectly fine and the vignette compiles properly.
but
Thanks for your help.
But I need to estimator the standard error of the quantile in "survival
analysis", because my data is censored.
For example~
T<-c(84,240,261,332,348,437,521,565)
S<-c(0,1,1,0,1,0,1,0) ##0 for censoed; 1 for event
G<-rep(1,8)
ori_s.surv<-survfit(Surv(T,S)~G)
--
View this
First of all, thank you for the reply to my topic.
Anova summary has shown no significative difference into Treatment (Pr
0.374), otherwise LSD Test has shown difference between 2 Treatment.
I suppose that's something strange.
Roberto
--
View this message in context:
http://r.789695.n4.nabble
On Nov 19, 2011, at 9:32 AM, R. Michael Weylandt wrote:
Here's one approach:
A=matrix(1:15,5)
B=matrix(15:29,5)
C=matrix(30:44,5)
do.call(cbind, lapply(c("A","B","C"),function(x) get(x)[c(1,5),1]))
Also:
sapply( list(A,B,C), function(x) do.call("[", list(x, c(1,5))) )
Notice that this ac
In small to moderate sample sizes, the Harrell-Davis quantile estimator is
more accurate than the ordinary sample quantile, and there is a good
standard error estimator for it using U-statistics. See the hdquantile
function in the Hmisc package.
Frank
swatch110362 wrote:
>
> hi~
> I need to esti
As I believe I've said to you before, please cc the list in your replies.
And as Ted said:
So, Gyanendra, what *exactly* is the question? Then it would perhaps
be possible to locate the source of the error message. Or, if the
question was indeed as I originally assumed it to be, what was the
expr
Hi Syrvn,
On 11/19/2011 03:08 PM, syrvn wrote:
does anybody know whether it is possible to create its own code formatting
rules?
Defining rules under Eclipse -> Preferences -> R Code Formatting is so
limited.
There is a dedicated mailing list for StatET here
http://lists.r-forge.r-project
Here's one approach:
A=matrix(1:15,5)
B=matrix(15:29,5)
C=matrix(30:44,5)
do.call(cbind, lapply(c("A","B","C"),function(x) get(x)[c(1,5),1]))
Michael
On Thu, Nov 17, 2011 at 9:44 PM, .Jpg wrote:
> Hi everyone, I tried to solve this problem but I could not find the
> solution. I have about 105
Roberto,
Please be more specific. What are the differences between ANOVA and LSD that
give you concern?
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GREC
I don't either.
You might have better luck communicating with the developers through their
website, the one you likely downloaded RStudio from.
---
Jeff NewmillerThe . . Go Live...
D
Hello,
does anybody know whether it is possible to create its own code formatting
rules?
Defining rules under Eclipse -> Preferences -> R Code Formatting is so
limited.
Cheers,
Syrvn
--
View this message in context:
http://r.789695.n4.nabble.com/Eclipse-StatET-create-own-code-formatting-tp
Dear Julia,
One approach would be to fit a combined model for the two samples, with a
factor (say, sample) and all interactions between sample and the other
predictors -- something like rq(y ~ sample*(x1 + x2 + etc.)) -- and then
compare via anova() to the additive model rq(y ~ sample + x1 + x2 +
Dear all,
concerne to my issue, I obtained different results between ANOVA and LSD
TEST (agricolae package), and I ask me why
>anova <- aov(SS ~ Treatment*Lot)
>summary(anova)
DfSum Sq Mean Sq F value Pr(>F)
Treatment 7 0.534 7.622e-06 1.107 0.374
Lo
Dear all,
I am trying to compare the estimated coefficients of a quantile regression
model between two different samples. It is a Wald test, but I cannot find one
way to do that in R.The samples are collected conditional on a specific
characteristic and I would like to test whether such charact
Hi there,
I have a experimental design as following:
P A B Y
1 1 1 1 -0.18524045
2 1 1 2 -1.64226232
3 2 2 1 -0.51342697
4 2 2 2 -0.29684874
5 3 3 1 0.71566733
6 3 3 2 -1.06097480
7 4 4 1 0.05772670
8 4 4 2 0.99316677
9 5 1 1 -0.61860414
10 5 1 2 0.50257548
1
Thanks again Gavin!,
this is very clear and enlightening,
vegan is an amazing package! It's a pleasure to use it.
the best,
René
--
Dr. René Mayer Email: ma...@psychologie.tu-dresden.de
Research Assistant Phone: +49-351-463-34568
Department of Psychology
You are correct, Michael! I had (rashly) assumed that Gyanendra's
error message was the result of asking for the factorial of a
number which was too large, without checking it against the limits.
I then embarked on a discussion of large-nymber problems in R as
relevant to his type of query.
My fin
Hi all R users:
I am a freshman in R. Recently,we are using our clinical data to
externaly validate two exist nomograms.We would like to use decision curve
and net benefits to distinguish which is more efficient,but we donot know
how to produce a program for it.So I require help for the prog
Thank you to all who have made great suggestions. Both Gabor and David's
methods work well for me. I see now where I was going wrong with this, I
wasn't loading it to a function. I also did not know expression could be
used in that way.
Thank you very much for your help!
Katrina
On Fri, Nov 18,
Dear all,
I download RStudio and install it,but I donnot know why I cannot see the upload
icon in the Files window? Could you please help me?
Thank you.
Xiaocong
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https
57 matches
Mail list logo