[Cross-posted to R-SIG-robust,
the Special Interest Group (mailing list) on Robustness and R]
BertG == Berton Gunter [EMAIL PROTECTED]
on Mon, 28 Nov 2005 11:42:45 -0800 writes:
BertG Note: As I believe Brian Ripley pointed out in his
BertG MASS book, loess may not be as
Hello,
I like to use the package kinship (R version 2.2.0). After loading
this package the operator %*% doesn't work.
Example:
R library(kinship)
R a - cbind(1:2,rnorm(2))
R a%*%a
Error message:
Fehler in a %*% a : keine anwendbare Methode für %*%
The Message in English: Error in a %*% a: no
I am interested in being able to use R in my own libraries, written in C++.
I have seen that in the past several people have asked about this
possibility. In the book Programming in S it is stated that it is possible
to call R functions from a C++ called from R. Also, it seems it is possible
to do
[EMAIL PROTECTED] wrote:
Hello,
I like to use the package kinship (R version 2.2.0). After loading
this package the operator %*% doesn't work.
Example:
R library(kinship)
R a - cbind(1:2,rnorm(2))
R a%*%a
Error message:
Fehler in a %*% a : keine anwendbare Methode für %*%
The
Dear List
Apologies for such a simple question:
I have a vector of 738 elements, coded with values between 1 and 16 (but
not containing 7, 10, 11 or 13) and wish to recode value 14 to 1, 4 to 2, 1
to 3, 2 to 4 and all other values to 5. I've been trying to use the
replace function (in base) and
Hi,
Is there any R implementation of logit-t algorithm
described in A high performance test of differential
gene expression for oligonucleotide arrays, (Genome
Biology 2003, 4:R67) ? If not, is it worth
implementing it in R?
Thanks in Advance.
Regards,
Ezhil
Hi
On 29 Nov 2005 at 9:42, Roy Sanderson wrote:
Date sent: Tue, 29 Nov 2005 09:42:12 +
To: r-help@stat.math.ethz.ch
From: Roy Sanderson [EMAIL PROTECTED]
Subject:[R] Reclassifying values within a vector to several
other
On Tue, 29 Nov 2005, Roy Sanderson wrote:
Dear List
Apologies for such a simple question:
I have a vector of 738 elements, coded with values between 1 and 16 (but
not containing 7, 10, 11 or 13) and wish to recode value 14 to 1, 4 to 2, 1
to 3, 2 to 4 and all other values to 5. I've been
I have the following matrix:
1 234 5
2 0.7760856
3 2.016 1.6907899
4 0.6148687 0.2424415 1.593916
5 3.0227028 2.3636083 1.512634 2.426591
6 3.2104434
I run the following code and got a wrong message. Anyway to transform test1 to
a 6 by 6 matrix? many thanks!
test1
1 23 4 5 6
1 0.000 0.7760856 2.02 0.6148687 3.0227028 3.2104434
2 0.7760856 0.000 1.690790 0.2424415 2.3636083
On 11/29/05 6:46 AM, Robert [EMAIL PROTECTED] wrote:
I run the following code and got a wrong message. Anyway to transform test1 to
a 6 by 6 matrix? many thanks!
test1
1 23 4 5 6
1 0.000 0.7760856 2.02 0.6148687 3.0227028 3.2104434
2
Use as.matrix() :
m - round( as.dist( cor( matrix( rnorm(600), nc=6 ) ) ), 2 )
m
1 2 3 4 5
2 -0.05
3 0.01 0.03
4 0.00 0.05 0.00
5 0.20 0.07 0.09 -0.07
6 0.03 0.02 0.11 -0.15 -0.11
as.matrix( m )
1 23 4 5 6
1 0.00 -0.05 0.01 0.00
Hello
I am using R 2.2.0 with Windows XP.
I've got a five element list object, each element containing two
dataframes of equivalent size.
str(mylist)
List of 1
$ data1:List of 2
..$ data1a :`data.frame':77 obs. of 63 variables:
.. ..$ var1: num [1:77] 0.41375 0.00056
Here is another approach using recode() in the car package:
library(car)
x - 1:16
recode(x, 14=1; 4=2; 1=3; 2=4; else=5)
[1] 3 4 5 2 5 5 5 5 5 5 5 5 5 1 5 5
Roy Sanderson wrote:
Dear List
Apologies for such a simple question:
I have a vector of 738 elements, coded with values
You could also use plot(matrix,type=n) to avoid overplot.
-Original Message-
From: Petr Pikal [mailto:[EMAIL PROTECTED]
Sent: November 29, 2005 3:05 AM
To: Robert; r-help@stat.math.ethz.ch
Subject: Re: [R] label point
Hallo
On 28 Nov 2005 at 21:33, Robert wrote:
Date sent:
On Thu, 28 Jul 2005, Eric Lecoutre wrote:
Hi there,
I often do receive some mails about this piece of code regarding
Cochran-Armitage or Mantel Chi square.
This is a very late reply but maybe still interesting. The
conditional version of the Cochran-Armitage test for trend
for proportions
Christian Bieli wrote:
Hello
I am using R 2.2.0 with Windows XP.
I've got a five element list object, each element containing two
dataframes of equivalent size.
str(mylist)
List of 1
$ data1:List of 2
..$ data1a :`data.frame':77 obs. of 63 variables:
.. ..$ var1:
Sean Davis [EMAIL PROTECTED] wrote: On 11/29/05 6:46 AM, Robert wrote:
I run the following code and got a wrong message. Anyway to transform test1 to
a 6 by 6 matrix? many thanks!
test1
1 2 3 4 5 6
1 0.000 0.7760856 2.02 0.6148687 3.0227028 3.2104434
2 0.7760856 0.000
On 11/29/05 7:42 AM, Robert [EMAIL PROTECTED] wrote:
Sean Davis [EMAIL PROTECTED] wrote:
On 11/29/05 6:46 AM, Robert wrote:
I run the following code and got a wrong message. Anyway to transform test1
to
a 6 by 6 matrix? many thanks!
test1
1 2 3 4 5 6
1 0.000 0.7760856 2.02
Sean Davis [EMAIL PROTECTED] wrote: On 11/29/05 7:42 AM, Robert wrote:
Sean Davis wrote:
On 11/29/05 6:46 AM, Robert wrote:
I run the following code and got a wrong message. Anyway to transform test1
to
a 6 by 6 matrix? many thanks!
test1
1 2 3 4 5 6
1 0.000 0.7760856
Hi,
I have an R programming problem and I havent found anything in the
documentation yet:
I have a data matrix, in which two neighbouring columns represent
replicates of the same experiment, e.g. something like this:
A A B B C C
row1 1 1 1 2 2 2
row2 1 1 1 1 1 2
I would like to
On 11/29/05 7:47 AM, Robert [EMAIL PROTECTED] wrote:
Sean Davis [EMAIL PROTECTED] wrote:
On 11/29/05 7:42 AM, Robert wrote:
Sean Davis wrote:
On 11/29/05 6:46 AM, Robert wrote:
I run the following code and got a wrong message. Anyway to transform test1
to
a 6 by 6 matrix?
Well, it ´s not the output table that I need to share
with SPSS, but the working data file itself. It
contains labeled variables and values and the labels
are important to me. That seems to be a problem since
as you say at least read.spss ignores the labels.
If I should ever have very very
=== 2005-11-29 21:13:14 您在来信中写道:===
Well, it �s not the output table that I need to share
with SPSS, but the working data file itself. It
contains labeled variables and values and the labels
are important to me. That seems to be a problem since
?as you say ?at least read.spss ignores the
On 11/28/05 12:47 PM, Georg Otto [EMAIL PROTECTED] wrote:
Hi,
I have an R programming problem and I havent found anything in the
documentation yet:
I have a data matrix, in which two neighbouring columns represent
replicates of the same experiment, e.g. something like this:
A A B
Peter Dalgaard wrote:
[EMAIL PROTECTED] writes:
Duncan asks:
Did we get mentioned somewhere (e.g. Slashdot), or was someone just
experimenting with some automated downloading?
R was mentioned in last week's (I think) O'Reilly newsletter, which
included a link to a short article showing how
Hello,
Following should work.
m - matrix(round(runif(16,0,2)),nrow=2)
colnames(m) - c(A,A,B,B,C,C,D,D)
m2 - m #matrix(, nrow=dim(m)[1], ncol=dim(m)[2]/2)
z - 1
ss - seq(1,dim(m)[2],2)
for(j in ss){
for(i in 1:dim(m)[1]){
m2[i,j] - substring(m[i,ss[z]] == m[i,ss[z]+1],1,1)
}
z - z + 1
Hallo
On 28 Nov 2005 at 18:47, Georg Otto wrote:
To: r-help@stat.math.ethz.ch
From: Georg Otto [EMAIL PROTECTED]
Date sent: Mon, 28 Nov 2005 18:47:38 +0100
Subject:[R] combine two columns
Hi,
I have an R programming problem
Here are just some (probably not very coherent) rambling:
It's not very clear to me what you are looking for. Are you looking for a
tool that compile R code into a stand-alone application? That's what the
Matlab compiler does for Matlab code, but AFAIK is _not_ what C++/Connect or
Java/Connect
Yet another way...
a-matrix(c(1,1,1,1,1,1,2,1,2,1,2,2),nr=2)
x-c(A,B,C)
colnames(a)-sort(rep(x,2))
compare-function(x,a){all(a[1,colnames(a)==x]==a[1,x][1])}
v-function(y,x,compare,a){sapply(x,compare,a=a[y,,drop=F])}
t(sapply(1:nrow(a),v,x,compare,a))
--Bill
-Original Message-
From:
Dear all;
I'm looking for some help in translating the following SAS code to R. The code
represents a
factorial design plus 1 control plot (2 x 2 + 1). The data is the following
BLOCK FA FB FC Y
1 0 0 0 15.33
1 1 0 0
Try this:
is.odd - !array(0:1, ncol(mat))
mat[,is.odd] == mat[,!is.odd]
A B C
row1 TRUE FALSE TRUE
row2 TRUE TRUE FALSE
On 11/28/05, Georg Otto [EMAIL PROTECTED] wrote:
Hi,
I have an R programming problem and I havent found anything in the
documentation yet:
I have a
Duncan == Duncan Murdoch [EMAIL PROTECTED] writes:
Then I looked at this graph:
http://mirrors.pair.com/freebsd/stats/cran-ip.png
and saw that this is likely due to a huge spike in traffic
between Nov 16 and 20.
FWIW, apache shows a similar spike:
I'm having difficulty figuring out how to implement the
following set of constraints in Quadprog:
1). x1+x2+x3+x4=a1
2). x1+x2+x5+x6=a2
3). x1+x3+x5+x7=a3
4). x1+x2=b1
5). x1+x3=b2
6). x1+x5=b3
for the problem: MIN (x1-c1)2+(x2-c2)2+...+(x8-c8)2.
As far a I understand, solve.QP(Dmat, dvec,
Hi every body ,
I simply want to calculate the 2th power of a vector without changing the
sign of values. How it is possible in R ?
Thanks a lot for any idea.
Amir
-
[[alternative HTML version deleted]]
Amir Safari wrote:
I simply want to calculate the 2th power of a vector without changing the
sign of values. How it is possible in R ?
I'm not quite sure what you mean, but maybe:
x
[1] -4 -3 -2 -1 0 1 2 3 4
x^2
[1] 16 9 4 1 0 1 4 9 16
- that obviously makes
?sign
x - rnorm(20)
x
[1] 0.42775501 0.77370847 -2.39860006 1.75882148
[5] -0.08231117 -0.11121029 0.93786747 -1.73588115
[9] 0.92659445 -0.59913052 0.16399931 -1.08586327
[13] 0.30092859 -0.30683075 -0.87974642 1.65483615
[17] -0.05118100 0.70005335 1.86429650 1.12937824
Hi all,
I need to plot a dendrogram, but I built a hclust object. Follow the code
lines:
dendObject-list(merge=merge,height=height,order=order,labels=labels,call=hclust(d=d),method=complete,
dist.method=euclidean)
class(dendObject)-hclust
plclust(dendObject,axes=FALSE)
Error in cl[[2]] :
BaRow == Barry Rowlingson [EMAIL PROTECTED]
on Tue, 29 Nov 2005 16:30:11 + writes:
BaRow Amir Safari wrote:
I simply want to calculate the 2th power of a vector
without changing the sign of values. How it is possible
in R ?
BaRow I'm not quite sure what you
Andy,
What I tried with my previous email was to give an idea for future
development of R. I would love to be able to do the C++ / R compiler by
myself, but unfortunately for me, I do not have the technological knowledge
to put it into practice.
Of course, I am really grateful to all R
Happy New Year
XSolutions Corp (www.xlsolutions-corp.com) is proud to announce
a 2-day Advanced R/Splus programming taught by R Development
Core Team Guru.
*San Francisco - January 09-10,2006
*Seattle January 12-13,2006
*New York
Hi,
New to R on Windows and also someone trying to learn how
to use R in batch. My apologies if this posting is a little long
but users may better understand the problems I'm having
if I explain what I'm doing.
Goal: use R to look at seasonality on a daily level, where I have
15 years of daily
Hi all,
I'm fitting GLM's using the step or stepAIC procedures and I would
like to save the AIC of the intermediate models. I would appreciate
very much information about how todo this.
Best wishes
Germán López
__
R-help@stat.math.ethz.ch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Prof Brian Ripley wrote:
My ultimate goal is to best fit time series by comparing AICs and
BICs (as in Bayesian) from arima() and nnet().
Whoa! nnet() does not do maximum likelihood fitting so AIC and BIC
are not even defined. On the other hand,
Dear Group,
I have a machine which has a 64bit Intel® Xeon
Processor 3.00GHz, 2MB L2 Cache 6T302N - [ 221-7984 ]
processor.
(Dell Precision Workstation 670n Intel® Xeon
Processor)
The OS is RedHat Enterprise Linux version 4 (for
64bit).
I went to /bin/linux/redhat/el4/i386 on CRAN FTP
Dear friends, I was drawing a circle with centrum in (1,-1) and
radius 5 to show my girl that the line y=3*x+1 goes through (1,4) and
(-2,-5) of the circle, but on Windows XP, R 2.20 the drawing was not
good at all, and the known solutions were not shown in the graph. I
guess I got it wrong?
List,
I'd like to plot a filled.contour() plot, but exclude the color key that
is printed on the left side. I understand that the key.axis argument
allows for control of the axes around the key, but there doesn't seem to
be an argument that eliminates it all together. I have looked in the
You're not telling us something or there's a problem with your R build: a
3960 element vectors of integer is tiny and will not cause R to crash.
Regarding your regression model. You do **not** need dummy variables in R.
Please read the docs (e.g. AN INTRODUCTION TO R) and help files on lm() and
On Tue, 29 Nov 2005, Jake Michaelson wrote:
I've got some image plots on which I'd like to include some gene information
(in the margins using mtext). Unfortunately, the description is rather long
and will need to be wrapped to fit on several lines. From what I know about
mtext, it's really
?symbols says
inches: If 'inches' is 'FALSE', the units are taken to be those of
the x axis.
Note, 'the x axis' and you have not ensured the x and y axes have the same
scale. Try
plot(c(-10,10), c(-10,10), asp=1, type=n)
symbols(x=1,y=-1,circles=5,inches=FALSE, add=TRUE
Hi
Troels Ring wrote:
Dear friends, I was drawing a circle with centrum in (1,-1) and
radius 5 to show my girl that the line y=3*x+1 goes through (1,4) and
(-2,-5) of the circle, but on Windows XP, R 2.20 the drawing was not
good at all, and the known solutions were not shown in the
Troels Ring wrote:
Dear friends, I was drawing a circle with centrum in (1,-1) and
radius 5 to show my girl that the line y=3*x+1 goes through (1,4) and
(-2,-5) of the circle, but on Windows XP, R 2.20 the drawing was not
good at all, and the known solutions were not shown in the graph. I
Thanks a lot, Paul!
Best wishes
Troels
At 20:05 29-11-2005, you wrote:
Hi
Troels Ring wrote:
Dear friends, I was drawing a circle with centrum in (1,-1) and
radius 5 to show my girl that the line y=3*x+1 goes through (1,4)
and (-2,-5) of the circle, but on Windows XP, R 2.20 the drawing
was
You don't seem to know your OS spec, so how can we guess?
You chip can run various different OSes. RH claim to have
RHEL4 for AMD64/EM64T, but not `for 64bit'.
Use uname -a. If it mentions ix86 (for x=3,4,5,6 or perhaps 7) use that
RPM. I expect it will mention x86_64. In that case you may
Dear List:
We are generating data such that students are clustered in schools for
some item response data for a simulation study. One component of our
simulation is to generate measurement error from a logistic distribution
with a mean of 0 and standard deviation of 1.7 to match the logistic
On Mon, 28 Nov 2005, Claus Atzenbeck wrote:
I read a book about statistics in psychology. The authors use SPSS. They
talk about post hoc tests after ANOVA finds significant effects:
- Gabriel's procedure (for equal or slightly different sample sizes)
- Hochberg's GT2 (for different
Hi all,
I have data which is represented as a histogram and want to add more
data / another histogram to this plot using another color. That is I
need to superimpose multiple histograms.
But have no idea how to do this.
Can anybody please give me a hint?
Thanks,
Andreas
--
Andreas Wilm
And here is one minor variation of this:
odd - seq(1, ncol(mat), 2)
mat[,odd] == mat[,odd+1]
On 11/29/05, Gabor Grothendieck [EMAIL PROTECTED] wrote:
Try this:
is.odd - !array(0:1, ncol(mat))
mat[,is.odd] == mat[,!is.odd]
A B C
row1 TRUE FALSE TRUE
row2 TRUE TRUE FALSE
See
library(R.basic)
example(plot.histogram)
x1 - rnorm(1000, 0.4, 0.8)
x2 - rnorm(1000, 0.0, 1.0)
x3 - rnorm(1000, -1.0, 1.0)
hist(x1, width=0.33, offset=0.00, col=blue, xlim=c(-4,4),
main=Histogram of x1, x2 x3,
xlab=x1 - blue, x2 - red, x3 - green)
hist(x2,
Dear All,
Is this right?
floor((5.05-floor(5))*100)
[1] 4
I would expect 5, or am I wrong?
Thanks and regards,
W
-
[[alternative HTML version deleted]]
__
G'day Werner,
WB == Werner Bier [EMAIL PROTECTED] writes:
floor((5.05-floor(5))*100)
WB [1] 4
WB I would expect 5, or am I wrong?
You are wrong. :)
Consider:
(5.05-floor(5))*100
[1] 5
(5.05-floor(5))*100 - 5
[1] -1.776357e-14
and read FAQ 7.31
Cheers,
Berwin
I believe this is a FAQ.
Examine:
format((5.05-floor(5))*100, nsmall=16)
[1] 4.9822
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Werner Bier
Sent: Tuesday, November 29, 2005 3:35 PM
To: r-help@stat.math.ethz.ch
Subject: [R] floor()
Yep! You are right I am going through it right now
Thanks
W
Austin, Matt [EMAIL PROTECTED] wrote:
I believe this is a FAQ.
Examine:
format((5.05-floor(5))*100, nsmall=16)
[1] 4.9822
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
On 29-Nov-05 Werner Bier wrote:
Dear All,
Is this right?
floor((5.05-floor(5))*100)
[1] 4
I would expect 5, or am I wrong?
Thanks and regards,
W
It may seem reasonable to expect it, but in the case of R
(and most other computer languages) you would be wrong.
___
Well, first the variance of a logistic distribution with scale parameter
s is not s^2, but (pi^2 * s^2)/3 (see ?rlogis). So if you want the
distribution to have a variance of .25, this implies s should be
library(R.basic)
example(plot.histogram)
x1 - rnorm(1000, 0.4, 0.8)
x2 - rnorm(1000, 0.0, 1.0)
x3 - rnorm(1000, -1.0, 1.0)
hist(x1, width=0.33, offset=0.00, col=blue, xlim=c(-4,4),
main=Histogram of x1, x2 x3,
xlab=x1 - blue, x2 - red, x3 - green)
hist(x2,
I want to retrieve data row wise from a data frame. My data frame is as
below:
data-read.table(table.txt, header=TRUE)
how can i get row-wise data?
Thanks,
Vasu.
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
Vasundhara Akkineni wrote:
I want to retrieve data row wise from a data frame. My data frame is as
below:
data-read.table(table.txt, header=TRUE)
how can i get row-wise data?
Examples:
data[1,]
data[2,]
for (rr in 1:nrow(data))
data[rr,]
rows - c(1, 5:8, 3)
data[rows,]
/Henrik
Have you considered the pastecs package
(http://finzi.psych.upenn.edu/R/library/pastecs/html/00Index.html)?
This was the first of 2 hits for RSiteSearch(space-time
interpolation). Alternatively, have you considered the locfit
package, mentioned in 2 of the 5 hits to
I just did RSiteSearch(poisson time series). The second and third
of 75 hits seemed relevant to your question. (e.g.,
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/58054.html) Some of the
other responses did not seem relevant, but I didn't look at all of them.
This response
Dear RNetCDF developers,
I haven't been able to load RNetCDF in R for a while. I wonder if this
is a bug or a problem with my installation.
I'm using Debian testing.
library(RNetCDF)
Segmentation fault
5:01pm(dongda)~R --version
R 2.2.0 (2005-10-06).
Copyright (C) 2005 R Development Core
Hi, Does anyone know which function in R can compute cross-spectrum of
two time series, and what lib is needed? I found ccf, which only gives
cross-correlation. I need to carry that further by doing a Fourier
transform.
Thanks,
Ling
__
Hello,
Sorry to bother the list but I am wondering how to mark the X/Y axes with
the column/row names of the data but not the raw index numbers, in a plot
generated by function plot(), or more generally, through which way can I
assign a string array to either of the X/Y axis as the data
Xiaofan Li would like to recall the message, String values as data marks on
X/Y axes?.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hello,
Sorry to bother the list but I am wondering how to mark the X/Y axes with
the column/row names of the data but not the raw index numbers, in a plot
generated by function plot(), or more generally, through which way can I
assign a string array to either of the X/Y axis as the data
On Tue, 29 Nov 2005, Ling Jin wrote:
Hi, Does anyone know which function in R can compute cross-spectrum of
two time series, and what lib is needed? I found ccf, which only gives
cross-correlation. I need to carry that further by doing a Fourier
transform.
?spectrum: Remmeber R has
This is not the address for the `RNetCDF developers': see the DESCRIPTION
file for the maintainer's address.
Note that this package does pass the CRAN dailiy testing (on Debian Linux)
so it looks like your own problem rather than a general one:
Hello!
I am running analysis on the data from 4 experiments, with approximately
4600 rows (cases). My working model is:
fitA1 = lme(RT~F1+F2+L,random=~1|Experiment/Subject,data=data)
Model works very fine, but if I try to check whether the effect of L
depends on Experiments/Subjects with:
fitA2 =
78 matches
Mail list logo