Dear list,
I just tried to do the same thing, and did not find anything on a
weighted qqplot. My weights are actually counts (positive integers).
Here is a modification of qqplot, following Duncan Murdoch's
suggestion. Any feedback would be welcome!
Thanks,
Jean-Christophe
weighted.qqplot <- func
Kindly provide a reproducible example.
2011/9/1 Jim Maas :
> Intermittently I'm getting this error from the geweke.diag function of the
> coda package. Would anyone be kind enough to enlighten me as to the
> possible source of such an error, or how to debug/locate it?
>
> Error in { : task 22 fai
I just tried
library(MASS)
rlm(1:12+rnorm(12),1:12)
it seems it works on vectors too, but maybe I miss something.
2011/9/6 Bos, Roger :
> All,
>
> I have a function that runs a set of regressions (using the rlm
> function) and I notice that it run much slower on my 64-bit R than it
> does on my 3
Hi there,
in the third case you get sample(5) which is exactly what you asked for.
from ?sample:
"If x has length 1, is numeric (in the sense of is.numeric) and x >=
1, sampling via sample takes place from 1:x. Note that this
convenience feature may lead to undesired behaviour when x is of
varying
2011/9/6 Jean-Christophe BOUËTTÉ :
you could tapply
function(x) if(length(x)==1) x else sample(x)
or something like this
>
> 2011/9/6 Jean-Christophe BOUËTTÉ :
>> Hi there,
>> in the third case you get sample(5) which is exactly what you asked for.
>>
>> from ?sam
have a look at ?formula and the examples
2011/9/8 Bos, Roger :
> I have a matrix called mat and y is the column number of my response and
> x is a vector of the column numbers of my terms. The variable name of y
> can change, so I don't want to hardcode it. I can find out the name as
> follows:
Is your "data" supposed to be observations, or values of the density
of the underlying law?
Also, could you explain the rationale behind :
sum(a$y)*(a$x[1]-a$y[2])
because it is not immediately clear to the reader.
2011/9/8 Gonçalo Ferraz :
> Hi, I have a vector 'data' of 58 probability values (b
Both ??radar and ??spider return ?stars.
2011/9/8 XINLI LI :
> Dear R Group:
>
> Based on the following data, how to do a great Spider (Radar) Plot? Any
> advice is greatly appreciated.
>
> HospID Rate Age Charlson NIHSS 1 0.2 49 3.5 0 2 0.1 48 1.8 12 3 0.4 56
> 2.1 5 4 0.3 77 0 7 5 0.2 67 6
Hi there,
It seems you got no answer. Maybe providing a reproducible example
would help, as well as expressing your problem in more general terms.
I am not an expert in sampling, but I would suggest (as does the help
for sample) that you take a look at the sampling package, available on
CRAN, and t
Hi there,
library(lattice)
equal.count(x,number=4,overlap=0)
JC
2011/9/9 Martin Batholdy :
> Hi,
>
> is there a function or an easy way to convert a variable with continuous
> values into a categorial variable (with x levels)?
>
> here is what I mean:
>
>
> I want to transform x:
>
> x <- c(3.2
so what about :
library(ggplot2)
z <- breaks(x,equal=NULL,nbins=4)
a <- cut(x,z,include.lowest = TRUE)
it works for me !
JC
2011/9/9 Martin Batholdy :
> Thanks for the suggestions!
>
> However all these functions don't produce exactly what I want
> (at least with my actual data).
>
>
> I need a sp
The examples in ?t.test and ?formula will help you.
Don't forget "An Introduction to R" too to import your data in a data
frame first...
2011/9/9 Mihovil Pletikos :
> hi
> i am new to r and i would like to how could i do something like this in
> spss:
>
> T-TEST GROUPS=who('1' '2')
> /MISSING=ANA
Hello,
you would get more answers if you code had proper indentation and comments.
Also, please provide a meaningful topic. You should also explain how
this is an R question and not just a "debug my code" request. What are
are you trying to achieve? Which of the numerous variables you
declared shou
Hi there,
did you try saving your graph directly as pdf with R, using ?pdf
What you're describing seems more a Word problem.
JC
2011/9/13 Jin Minming :
> Hi all,
>
> I copy metafile boxplot from R to Word. Then save as Pdf file. But I found
> there are some unexpected black lines in some plots wit
And you can easily get these predictions using the following code :
A <- B
;-)
JC
2011/9/13 John Fox :
> Dear Ross,
>
> lm(y ~ 0 + offset(x)) will do the trick, but the resulting model has no
> coefficient estimates and thus can't be used with abline(). You can, e.g.,
> get predictions from the m
I suggest changing
Documents and Settings Administrator
to
Documents and Settings\\Administrator
...
JC
2011/9/13 dbonneau :
> Hi, I am trying to read a text file located in following paths. I am getting
> error if I try to read from long directory.. But if I place the file right
> under C, It r
Hi henri,
R is open source, so you should be able to download the source code of
the package from CRAN.
JC
2011/9/13 Henri Mone :
> Dear R users and experts,
>
> I need to modify an exisiting R function from a package. The function/
> variable is inside a namespace and I have problems accessing i
And a final word of advice: be lazy, and use
file.choose()
to get the string that R expects as a filename. This will help avoid such typos!
JC
2011/9/13 Mikkel Grum :
> You are missing \\ between Documents and settings and Administrator.
>
>
> - Original Message -
> From: dbonneau
> To:
Hi,
You might want to take a look at ?glm with logit link function.
JC
2011/9/14 Adam Copella :
> Dear All,
>
> Is there any function in R for fitting linear probability model, as my
> response variable is a uniformly distributed.
>
> Regards,
> Adam
>
> [[alternative HTML version deleted]]
portfolio.optim {tseries} means this function is in the tseries package...
2011/9/14 James Splinter :
> Hello,
>
> After installing and loading the package "portfolio", I tried to run the
> example code provided, and it would not run.
>
> this is the link:
> http://rss.acs.unt.edu/Rdoc/library/tse
Hi,
it is not clear to me what your exact request is.
If you want to integrate R code in a presentation, using sweave with
the beamer class is an option.
2011/9/15 John Clark :
> R experts:
>
> I want to prepare a demo (that will play sequentially in clicks) for a
> presentation tutorial...Can some
Hi,
you did not supply a reproducible example. We do not know what your
data nor your code looks like.
Please follow the recommandations found at the bottom of this email!
You're more likely to get a quick and meaningful reply.
JC
2011/9/16 Samir Benzerfa :
> Hi everyone,
>
>
>
> I've got a questi
looking at the code of example I found that:
oldask <- grDevices::devAskNewPage(ask = TRUE)
x <- rnorm(1000)
hist(x)
plot(x)
plot(x^2)
grDevices::devAskNewPage(oldask)
which will do what you want in terms of displaying plots with a pause.
2011/9/16 John Clark :
> My question was not related to e
> 14.01.1980 0 0
> 15.01.1980 -0.006371182 -0.009760568
> 16.01.1980 0.007424018 0.00393059
> 17.01.1980 0.007299239 0.001952035
> 18.01.1980 -0.008352074 -0.001952035
>
>
>
> -Ursprüngliche Nachricht
This is want you want:
op <- as.vector(t(test))
JC
2011/9/16 Chris82 :
> Dear R users,
>
> I guess, I have a quit simple problem, but I'm not getting the solution.
>
> I create a matrix like this:
>
> test <- matrix(seq(1,3,1),ncol=5,nrow=3)
>
> then I want to create one vector, consisting of eve
Hi there,
Assuming you would prefer to have only one min per row:
apply(dat,1,which.min)
there is a link to this function in the help page for ?min.
JC
2011/9/16 marlene marchena :
> Hi,
>
> I need to repor the index of a min value of each row in a matrix, but I
> don't know how to do that when
Hi,
X = 0
Y =12
works for me.
If you judge my answer as too vague, please reread your original post
and kindly post the code you used to define the objects you are
mentioning.
Thanks,
JC
2011/9/19 arunkumar :
> Hi
>
> I have a variable str = " X", "Y" and values ("0","12")
>
> i want to set v
an autoregressive model to my data.
>
> Do you understand my intention?
>
> THX, SB
>
> -----Ursprüngliche Nachricht-
> Von: Jean-Christophe BOUËTTÉ [mailto:jcboue...@gmail.com]
> Gesendet: Freitag, 16. September 2011 17:31
> An: Samir Benzerfa
> Cc: r-help@r-p
Hi,
It's hard to provide you with working code when you don't provide a
reproducible example, but do you really need to create variables? What
about (untested):
for (i in 1:2) {
first <-cbind(first, result.fun[[i]])
}
you will then have to look at
names(first)
and change the last part of it to
On how to use named vs. positional arguments, you can also have a look
at section 2.3 of "an introduction to R".
2011/9/22 Jean-Christophe BOUËTTÉ :
> Hi,
> It's hard to provide you with working code when you don't provide a
> reproducible example, but do you really n
Hello,
You can check ?model.frame.
I do not know however to extract only the right-hand of left-hand part
of a formula.
JC
2011/9/22 trekvana :
> Hello all,
>
> So I am using the (formula entry) method for randomForests:
>
> randomForest(y~x1+x2+...+x39+x40,data=xxx,...) but the issue is that som
Also, if your formula is really of the form y ~x1+...+xn
you can have a look at the last example for ?formula for a simple way
to generate the formula.
HTH,
JC
2011/9/23 Helios de Rosario :
> To separate the parts of a formula, use as.character
> (check the examples in ?character)
>
> Helios
>
> 2
Hi,
did you try
load(file="D:/Simulation Results/sim 9-23-11 deta")
without the assignment ?
look at ?load
2011/9/23 Downey, Patrick :
> Hello,
>
> I created an array to hold the results of a series of simulations I'm
> running:
>
> d.eta <- array(0,dim=c(3,3,200))
>
>
>
> Then I tried to save th
Hi there,
an answer from someone who's not an expert in the field but used to
play around with time series:
The action of simulating a process using with input parameters then
estimating the parameters is not an invariant, especially when the
process involves nonlinearities.
Did you try increasing
Please refer to this similar thread:
https://stat.ethz.ch/pipermail/r-help/2009-February/188445.html
JC
2011/9/29 upananda pani :
> Dear All,
>
> Can you please guide me how to check the outliers in the data set in R. It
> would be great if you can give some examples of methods.
>
> With regards,
Hi, are you looking for
# reproducible example
x <- 1:1000
dim(x)<-rep(10,3)
# code
apply(x,1:2,sum)
note that ?apply works with many functions...
2011/10/5 Martin Batholdy :
> Dear R-group,
>
>
> is there a way to perform calculations that are defined in a string format?
>
>
> for example I h
Hi,
this should work:
as.vector(rbind(x,x+1,x+2))
2011/10/7 Martin Batholdy :
> Dear R-List,
>
>
> I have the following problem:
>
> I have a vector that looks like this:
>
> x <- c(3, 8, 14, 24, 34, 40)
>
>
> And I would like to make a sequence out of every element, starting at the
> value of th
Or a more general form:
n <- 3
as.vector(matrix(rep(x,each=n),nrow=n)+0:(n-1))
2011/10/7 Jean-Christophe BOUËTTÉ :
> Hi,
> this should work:
> as.vector(rbind(x,x+1,x+2))
>
> 2011/10/7 Martin Batholdy :
>> Dear R-List,
>>
>>
>> I have the following prob
Hi, let's say
x <- c(1,.5,.3,.1)
I assume you tried:
plot(x)
You can try:
plot(seq(x)-1,x)
Also take a look at ?acf
JC
2011/10/7 Chuse chuse :
> dDear all,
>
> I have calculated a vector of autocovariances. When I plot it, the
> variance appears at x-tick 1. How can i change the x-axis so that
39 matches
Mail list logo