Wen Zhang wrote:
I have three files of data which are available at http://zhangw.com/
R/, varied at the number of data. I tried to use R to analyze using
shapiro.test, ks.test, and t.test. t.test ran as expected, however,
when I run shapiro.test and ks.test commands, error message always
Wendy Peng wrote:
Hi there,
I am trying to perform different normality tests in R. I have no problem
when I use Shapiro.test( ). However, when I try to use any normality
tests from the Nortest package, I kept getting this error Error in
read.table(source, header = T, fill = T) :
Thanks for the answer.
The problem we are facing is that we dev.copy to a pdf device and then,
the
legend doesn't look the same: numbers overlap a little lines.
I suspect that this is what you are
experiencing.
yes it seems to be
If you want to end up with a PDF plot, use pdf() and
TEMPL Matthias wrote:
Use \setkeys{Gin} to modify figure sizes or use explicit
\includegraphics commands in combination with Sweave option
include=FALSE.
Or use \documentclass[nogin,...]{...}. Then the 'Gin' will have no
effect, and the size of the plots in the document will not be changed
On Fri, 18 Nov 2005, Juni Joshi wrote:
I need to fit a number of models with different number of predictors
in each model. Say for example, I have three predictors: x1, x2, x3
and I want to fit three models:
lm(y~x1+x2)
lm(y~x2+x3)
lm(y~x1+x2+x3)
Instead of typing
On Thu, 17 Nov 2005, Leaf Sun wrote:
Dear all,
I'd like to change a point pattern to a grid of cells and use one of the
variables as the output.
e.g. The point pattern is of a window of (500*500) and several features
such as pH, SoilType etc. I like to divide it into a grid with cell
try :
my_formula = as.formula(paste(y~,xxx))
lm(my_formula)
note that you can play with substr in paste to change your formula
paste(y~,substr(xxx,1,5))
[1] y~ x1+x2
paste(y~,substr(xxx,4,8))
[1] y~ x2+x3
furthermore, with 10 predictors x1 x2 ...x10 for instence, you can
create 2 array of
On 11/17/05, Prof Brian Ripley [EMAIL PROTECTED] wrote:
That's why we recommend that you do not use dev.copy but replot on the
target device.
as I plot the graph in the postscript device, and then want to save it into
both pdf and png files, I prefer using dev.copy because it allows me to
On Thu, 17 Nov 2005, Serryn Eagleson wrote:
Hello,
I am interested in using Morans I for different time intervals to detect
disease clusters.
Ultimately I would like to use CUSUM - or similar monitoring statistic
to monitor the results of Morans I - similar to the work by Rogerson
Hi,
I have a tricky problem with composing a name that should represent an
object:
I want to pass a data frame and a string that contains a column name to
a function, e.g.:
check(testFrame, seconds)
The function should now divide the testFrame into two subsets and call a
t-test on the
Hi
I have a list of vectors, each one of which should be a subset of the
previous one.
How do I check that this property actually holds?
Toy problem follows with a list of length 4 but my list can be any
length
subsets - list(
l1 = 1:10 ,
l2 =
On Fri, 18 Nov 2005, Claus Atzenbeck wrote:
How can I get R to change earlySessions$column to whatever was passed
as string, in the above example earlySessions$seconds?
In the meanwhile I received a solution: earlySessions[[column]]
Claus
__
Dear Claus
You can write
earlySessions[,seconds] instead of earlySessions$seconds and
with that syntax you can also use:
col1 - seconds
earlySessions[,col1]
and you will get what you are looking for.
Best regards,
Christoph Buser
Robin Hankin [EMAIL PROTECTED] writes:
Hi
I have a list of vectors, each one of which should be a subset of the
previous one.
How do I check that this property actually holds?
Toy problem follows with a list of length 4 but my list can be any
length
subsets - list(
Robin Hankin wrote:
check.for.inclusion - function(subsets){
out - rep(FALSE,length(subsets)-1)
for(i in 1:(length(subsets)-1)){
out[i] - all(subsets[[i+1]] %in% subsets[[i]])
}
return(all(out))
}
how to do it elegantly and/or quickly?
My first thought was to
Whoops
The code I just posted only tested if all the subsequent elements were
subsets of the first, it didn't check all the sequential subsets!
Too cold to think straight here today...
Baz
__
R-help@stat.math.ethz.ch mailing list
Hi Seth,
Thank you very much! (and thanks to Matthias Kohl and Sean Davis)
My first problems in building a minimal S4-class package are solved with
the help of your hints.
Especially making R CMD INSTALL before trying R CMD check was a very
good idea!
Matthias
Hi Matthias,
On 17 Nov 2005,
The article on BMA (Bayesian model averaging) presents most valuable tools for
model selection, but I find one detail confusing in Example 1. In page 4 of
RNews 5/2, second paragraph says that the probability of Time variable not
being in the model is 0.445. It seems to me that the figure
The article on BMA (Bayesian model averaging) presents most valuable tools for
model selection, but I find one detail confusing in Example 1. In page 4 of
RNews 5/2, second paragraph says that the probability of Time variable not
being in the model is 0.445. It seems to me that the figure
Spencer;
Thanks for your suggestions. I found the problem is in the library nlme. If
you define phi1~factor(trt1)+factor(trt2) instead of phi1~trt1+trt2 the
augPred function works. A bug? I don't know.
Christian
Spencer Graves [EMAIL PROTECTED] on 17-11-2005 20:19:32
To:Christian
Warning: non-expert thoughts to follow.
When passing an object to a predict method, the method looks at (a copy) of
the original information from the dataframe that was used in the fit. Your
original data contains information on trt1 and trt2, but factor(trt1) and
factor(trt2) cannot be found
Yes, I agree. But if you define at the beginning of the code:
data$trt1-as.factor(data$trt1)
data$trt2-as.factor(data$trt2)
being trt1 and trt2 dummy variables with values 0 or 1, and then run the
model, for instance:
fit_1-nlme(Y~b0/(1+exp((b1-X)/b2)),fixed=b0+b1+b2~trt1+trt2,
Bjørn-Helge Mevik wrote:
Or use \documentclass[nogin,...]{...}. Then the 'Gin' will have no
effect, and the size of the plots in the document will not be changed
from the size given as ...,height=??,width=?? (i.e. the size
produced by R).
A small correction: using the 'nogin' doesn't make
Juni Joshi wrote:
I need to fit a number of models with different number of predictors
in each model. Say for example, I have three predictors: x1, x2, x3
and I want to fit three models:
lm(y~x1+x2)
lm(y~x2+x3)
lm(y~x1+x2+x3)
Stepwise variable selection has so many
Hello,
I wonder if
image(t(x)[ncol(x):1, ])
can do the job correct!
perhaps this does the job better:
image(t(x)[,nrow(x):1])
Björn
From: Prof Brian Ripley ripley_at_stats.ox.ac.uk
Date: Fri 27 Aug 2004 - 06:43:50 EST
On Thu, 26 Aug 2004, Glynn, Earl wrote:
Start with:
x - c(1:7,1)
Hi,
I'm attempting a comparative analysis using the function compare.gee,
package (ape), which uses phylogeny as a correlation matrix in gee
(package gee), in R version 2.2.0 on a Windows XP PC. I'm looking to
model the relationship between a continuous explanatory variable and a
binary
Dear R experts,
I have defined a class myclass and would like the slots to be extractable
not only by @ but also by $. I now try to write a method for $ that
simply executes the request [EMAIL PROTECTED], whenever someone calls
object$slotname for any object of class myclass.
I don't manage to
Hi all,
I am trying to display a matrix of plots(images), for example a 3*3 matrix
of 9 image plots, such that when a user clicks on a image i can show the
enlarged plot. I tried the multiple graphic device(using mfcol=c(3,3) and
mfg), but it creates multiple plots in a single image file. So, i
x-1
f-function(){
x-3
eval(substitute(x+y,list(y=10)))
}
f() #13
x-1
f-function(){
x-3
eval(substitute(x+y,list(y=10)), envir = sys.frame(sys.parent()))
}
f() #11
x-1
f-function(){
x-3
eval.parent(substitute(x+y,list(y=10)))
}
f()#11
the help page says:
If 'envir' is
not specified,
On Fri, 18 Nov 2005, ronggui wrote:
x-1
f-function(){
x-3
eval(substitute(x+y,list(y=10)))
}
f() #13
x-1
f-function(){
x-3
eval(substitute(x+y,list(y=10)), envir = sys.frame(sys.parent()))
}
f() #11
x-1
f-function(){
x-3
eval.parent(substitute(x+y,list(y=10)))
}
f()#11
the
Hello to everybody!
I want to run R in batch mode but it doen't work (Error: syntax error)
I've found this in R help:
R CMD BATCH [options] infile [outfile]
I have tried differents commands:
(I have been working in the same directory I have test.txt file and
test2.txt would be the output file)
On Fri, 18 Nov 2005, Beatriz wrote:
I want to run R in batch mode but it doen't work (Error: syntax error)
I've found this in R help:
R CMD BATCH [options] infile [outfile]
I have tried differents commands:
(I have been working in the same directory I have test.txt file and
test2.txt
This peice of very useful getcell() function was posted for me on this
list by Duncan Murdoch (Thanks again Duncan). It allows the
identification of a particular plot in a matrix of plots. All you need
to do then is use this information to identify the original plot which
you can then re-plot.
On 11/18/2005 10:20 AM, Beatriz wrote:
Hello to everybody!
I want to run R in batch mode but it doen't work (Error: syntax error)
I've found this in R help:
R CMD BATCH [options] infile [outfile]
I have tried differents commands:
(I have been working in the same directory I have
On Fri, 18 Nov 2005, ronggui wrote:
x-1
f-function(){
x-3
eval(substitute(x+y,list(y=10)))
}
f() #13
x-1
f-function(){
x-3
eval(substitute(x+y,list(y=10)), envir = sys.frame(sys.parent()))
}
f() #11
x-1
f-function(){
x-3
eval.parent(substitute(x+y,list(y=10)))
}
f()#11
the
I've only wirtten
library(limma)
in my test.txt file and I've tried with test.R and test.r too
I' don't know the problem
Thank you
Paul Roebuck wrote:
On Fri, 18 Nov 2005, Beatriz wrote:
I want to run R in batch mode but it doen't work (Error: syntax error)
I've found this in R help:
R
Hello to all,
I don't know almost nothing about Tcl/TK. I have the follow code:
Name - tclVar()
insert.Name -tkentry(window1,width=20,objectvariable=Name)
tkplace(tklabel(window1,text= Enter the matrix name:),x=0,y=0)
tkplace(insert.Name,x=175,y=0)
So, I need to pass the variable Name like
On Fri, 18 Nov 2005, Beatriz wrote:
Paul Roebuck wrote:
On Fri, 18 Nov 2005, Beatriz wrote:
I want to run R in batch mode but it doen't work (Error: syntax error)
[SNIP]
I don't know what is wrong. Could you help me, please?
Isn't it possible that it is working just fine and you
Dear R users,
Can anyone tell me how the medians in survfit() are computed? I´ve
looked it up in the source code (print.survfit.s version 4.19 07/09/00),
but I´m not a programmer...;-)
Especially, I´d like to know what the pfun() function inside
print.survfit.s() works.
The help file does
Ulrike Grömping wrote:
Dear R experts,
I have defined a class myclass and would like the slots to be extractable
not only by @ but also by $. I now try to write a method for $ that
simply executes the request [EMAIL PROTECTED], whenever someone calls
object$slotname for any object of
Hi,
I need to run a Fisher's exact test on thousands of 2x2 contingency tables, and
repeat this process several thousand times (this is a part of the permutation
test for a genome-wide association study).
How can I run this process most efficiently? Is there any way to optimize R
code?
I have
Dear R-list
I have been trying to make survreg fit a normal regression model with left
truncated data, but unfortunately I am not able to figure out how to do it.
The following survreg-call seems to work just fine when the observations are
right censored:
library(survival)
n-10
#censored
On 11/18/2005 11:25 AM, Beatriz wrote:
I write
R CMD BATCH test.R
in my R console
I have send you an image (RunBatch.jpg) of my console and the test.R file
I don't think the jpg made it to R-help, but I saw it. You tried to run
R CMD BATCH test.R from within R. That's meant to be a
Setting conf.int=FALSE will help. Looking at the code of fisher.test and
extracting just the bit you need will help more.
Do you actually need a two-sided test? Fisher did not, and if not, the
computations can be reduced to a call to phyper which is vectorized.
On Fri, 18 Nov 2005, Anna
Ulrike == Ulrike Grömping [EMAIL PROTECTED]
on Fri, 18 Nov 2005 15:37:58 +0100 writes:
Ulrike Dear R experts,
Ulrike I have defined a class myclass and would like the
Ulrike slots to be extractable not only by @ but also by $.
hmm, I know this is not what you've asked for, but
Anna Pluzhnikov [EMAIL PROTECTED] writes:
Hi,
I need to run a Fisher's exact test on thousands of 2x2 contingency tables,
and
repeat this process several thousand times (this is a part of the permutation
test for a genome-wide association study).
How can I run this process most
Uwe,
thank thank you very much for your suggestion. This does in fact work, if I
define
$.myclass-function(x,slotname){slot(x,slotname)}
which solves my immediate need.
However, the setMethod version
setMethod($, signature(x=myclass), function(x,slotname){
slot(x,slotname)
}
)
still
I believe that a recommended S4 convention is simply to write methods for
slot extraction with the same name as the slot. Thus, for an object,x of
class 'myclass'
slotname(x)
would give [EMAIL PROTECTED] This is a more natural interface than either @ or $
(and I am not sure that methods for $
I have had that thought myself as well, but don't see any harm in my particular
application. I describe in general terms what I'm trying to do: I have defined
a class for the output of a function that does various calculations. The reason
for this is that I want methods for plotting and
What about trying a qqplot to see how the distribution fits...
For the normal distribution thta is very stright forward, use qqnorm.
To test gamma distribtution (or any other) do some thing like this
n-length(data)
for(i in 1:n){
prob-(i-1/3)/(n1/3)
}
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ulrike Grömping wrote:
Uwe,
thank thank you very much for your suggestion. This does in fact work, if I
define
$.myclass-function(x,slotname){slot(x,slotname)}
which solves my immediate need.
However, the setMethod version
I'm working on a Latex document with lots of R code in it, so naturally
enough it would be a good idea to use SWeave. But then I don't get to
see the output as I'm editing.
Or do I? Is there a tool to process a .Rnw file and incorporate the
output from the commands into it (in a form that is
-- Original Message ---
From: Duncan Temple Lang [EMAIL PROTECTED]
To: Ulrike Grömping [EMAIL PROTECTED]
Cc: Uwe Ligges [EMAIL PROTECTED], r-help@stat.math.ethz.ch
Sent: Fri, 18 Nov 2005 10:26:51 -0800
Subject: Re: [R] Method for $
-BEGIN PGP SIGNED MESSAGE-
Hash:
Berton, thanks for your code, it does work on my problem. However, I do want
the $ do work the extraction, and it does if I do it right (see answer from
Duncan Temple Lang).
Regards, Ulrike
-- Original Message ---
From: Berton Gunter [EMAIL PROTECTED]
To: 'Uwe Ligges' [EMAIL
Sorry, trying to change the unicode.
Dear R-list
I have been trying to make survreg fit a normal regression model with left
truncated data, but unfortunately I am not able to figure out how to do it.
The following survreg-call seems to work just fine when the observations are
right censored:
Hi,
I am using function wireframe from package lattice to draw a 3D surface.
I would like to add a few points on the surface. I read in a post from
Deepayan Sarkar that To do this in a wireframe plot you would probably
use the panel function panel.3dscatter. Does someone have an example?
When
Hi all,
I am new in R tool. I would like to plot two dataset in in fig.
Here is what I did for both a and b data sets
jpeg(file=a.jpeg)
dat-read.table('a', header=F, sep=',')
dim(dat)
y-dat[,1]
y-y[!is.na(y)]
plot(y);lines(lowess(y, f=0.05), col =
(red), lwd=5)
dev.off
Two questions:
1. How
Hi Roger,
Thanks again for your kind help.
Yes, I still use the 200K points data applying this program but the good thing
is I found it finished in no time.
The questions again here are:
1) try0 - lapply(split(as(df1, data.frame), res), mean)
When I tried to replace mean to sum, error
Sean == Sean Davis [EMAIL PROTECTED] writes:
Sean Have you tried just grabbing the whole column using dbGetQuery?
Sean Try doing this:
Sean
Sean spams - dbGetQuery(con,select unixtime from email limit
Sean 100)
Sean
Sean Then increase
If I understand your question, to superimpose two lines in a same plot, in
the first call to plot() you want to set the plot(ylim) argument with a
range that will fit both of your lines. Then use lines() to add the second
lowess line on the plot. Or matplot() will automate the process for
On Fri, 18 Nov 2005, Leaf Sun wrote:
Hi Roger,
Thanks again for your kind help.
Yes, I still use the 200K points data applying this program but the good
thing is I found it finished in no time.
The reply is on R-sig-geo.
The questions again here are:
1) try0 -
Eric Eide wrote:
Sean == Sean Davis [EMAIL PROTECTED] writes:
Sean Have you tried just grabbing the whole column using dbGetQuery?
Sean Try doing this:
Sean
Sean spams - dbGetQuery(con,select unixtime from email limit
Sean 100)
Sean
Sean
I ran into an interesting problem that I think I have solved. I ran a batch job
as --no-save, electing only to save all objects there before the job started
and
one reasonably small object created as the result of the job, ( ~ 19K ).
During the
course of the job several large objects are
Hi,
can anybody tell me how to contact the maintainer of the
concord package? The address given in the help file is not
valid anymore.
,
| help(package=concord)
|
| Information für Paket 'concord'
|
| Description:
|
| Package: concord
| Version: 1.4-2
| Date:
On Sat, 2005-11-19 at 00:37 +, Patrick Drechsler wrote:
Hi,
can anybody tell me how to contact the maintainer of the
concord package? The address given in the help file is not
valid anymore.
,
| help(package=concord)
|
| Information für Paket 'concord'
|
|
Marc Schwartz wrote on 19 Nov 2005 02:07:09 MET:
On Sat, 2005-11-19 at 00:37 +, Patrick Drechsler wrote:
can anybody tell me how to contact the maintainer of the
concord package? The address given in the help file is not
valid anymore.
[...]
A quick search of this month's r-help
66 matches
Mail list logo