name - c(a, b, a, c, d, a, b)
addr - c(10, 20, 10, 30, 40, 10, 20)
duplicated(name)
[1] FALSE FALSE TRUE FALSE FALSE TRUE TRUE
which(duplicated(name))
[1] 3 6 7
addr[ -which(duplicated(name)) ]
[1] 10 20 30 40
cbind( name, addr) [ -which(duplicated(name)), ]
name addr
[1,] a 10
[2,]
I am not sure if I understand your problem but I think you might be
close to the solution. Perhaps if you changed 'index' in your code to
'i', you might get the answer. Try this :
set.seed(1066)
m - matrix(rnorm(9), nc=3)
colnames(m) - paste(ratio, 1:3, sep=)
m
ratio1 ratio2
How about those e-mail which specify the problem in the subject line
only or does not use a subject line at all.
Is it practicable and desirable to simply bounce back an e-mail to the
sender with a message to read the posting guide if either the subject
line is empty or body is empty. Or this
One suggestion is to begin the posting guide with a few summary lines
(table of contents).
Here is a good example with an informative summary
http://archive.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimerAll.html
For R, we can have something like this (modified from the posting guide
according to
assign(dat, get(paste(dat, no, sep=)))
or simply
dat - get(paste(dat, no, sep=))
On Thu, 2004-08-19 at 15:15, Gudrun Jonasdottir wrote:
Dear R-Help list,
I have a problem with convertions of strings. I want to use the function
paste() to create an object name and then use that
Peri,
Please stop posting to both R-help and BioConductor simultaneously.
Please read the posting guide and decide which list is more appropriate.
http://www.R-project.org/posting-guide.html
On Thu, 2004-08-19 at 17:20, S Peri wrote:
Dear group,
Apologies for asking the most chomped
I am not sure what does an IDE consist besides syntax highlighting and
ability to parse lines from script into console. Nor am I familiar with
VIM but IMHO emacs with ESS is the best for R.
On Thu, 2004-08-19 at 19:13, S Peri wrote:
Hi,
Is there any IDE or any editor or any pice of code
for
What difficulties, instruction and operating system are you talking
about ?
1. Go to www.r-project.org
2. Click on CRAN under downloads
3. Choose a mirror
4. Go to pre-compiled binaries and select your OS
5. If windows, choose base and right click and save on the exe file
On Wed, 2004-08-18
Yes, make a local installation on your home directory or another machine
which you have write access to.
AFAIK, you cannot update R itself. You will need to install R-1.9.1 and
delete the old version as opposed to upgrading from it. You can try to
salvage the lib directory but it is much better
df[ df$rate==slow, ]
On Mon, 2004-08-16 at 18:48, Randy Zelick wrote:
Hello there,
Using 1.9.0 on WinXP...
I have a data frame, one column of which is named rate. The column has
text entries like fast, medium, slow, very slow, and so forth. I
have not tried to make them factors, but
?par
On Sun, 2004-08-15 at 00:14, Chuanjun Zhang wrote:
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
If understand you correctly, you have a variable that groups each
observations into one of eight categories. And there several hundred
observations from each category. Now, you want to sample only 100
observations from each category. It this is right, then the following
might help :
In short, merge with all=FALSE followed by removal of redundant columns might do the
trick.
If rownames serve as common key, use the argument by=0.
See http://tolstoy.newcastle.edu.au/R/help/04/07/1250.html and many
other hits on http://maths.newcastle.edu.au/~rking/R/
On Tue, 2004-08-10 at
You will have to sort out the list before assigning. I am not sure if
there is an auto-sort ability in any of the function. Try this :
list1 - list(x=2, y=3)
list2 - list(y=7, x=8)
out - data.frame( matrix(NA, nc=2, nr=5) )
colnames(out) - c(x, y)
out[1, ] - unlist( list1[ colnames(out) ] )
The first 2 solutions are vastly slower than the last 3 simply because
they use the for() loop. The vectorised versions are definitely faster.
# Solution 1 : list extraction operator
aa - rep(NA, n); bb - rep(NA, n)
system.time( for (i in 1:n) {
aa[i] - PatDay$Day[i] -
, 2004-07-30 at 20:28, Marc Schwartz wrote:
On Fri, 2004-07-30 at 18:30, Adaikalavan Ramasamy wrote:
There was a BioConductor thread today where the poster wanted to find
pairwise difference between columns of a matrix. I suggested the slow
solution below, hoping that someone might suggest
Gabor, thank you. This is very helpful.
On Mon, 2004-08-02 at 18:10, Gabor Grothendieck wrote:
Adaikalavan Ramasamy ramasamy at cancer.org.uk writes:
:
: Thank you to Marc Schwartz and Gabor Grothendieck for their responses.
: Both solutions are useful.
:
: It would be nice
-7-14 -7
g3 3 -1 -6 -4 -9 -5
g4 12 8 3 -4 -9 -5
g5 16 -3 8-19 -8 11
Regards,
--
Adaikalavan Ramasamy[EMAIL PROTECTED]
Centre for Statistics in Medicine http://www.ihs.ox.ac.uk/csm
m - matrix( 1:12, nc=3 )
m
[,1] [,2] [,3]
[1,]159
[2,]26 10
[3,]37 11
[4,]48 12
apply(m, 1, mean) # row means
[1] 5 6 7 8
apply(m, 2, mean) # column means
[1] 2.5 6.5 10.5
Replace 'mean' with 'var' if you want variances instead.
On Thu,
Do you mean something like
abs( my_vector[i] - my_vector[j] )
See if reading help(subset) helps.
On Wed, 2004-07-28 at 01:42, StephaneDemurget wrote:
Hi,
I'm trying to figure out how to properly construct a graph of
frequencies of a difference between 2 values, that is | i | - | j |.
Did you read the R data import/export manual or check the mail archives?
You could try to save the input file as comma or pipe separated.
Alternatively you can try this hack if all records are separated by a single space.
a - read.delim(file=tmp.txt, sep= , na.string=)
a
ID description
x - data.frame( 1:10, runif(10) )
y - data.frame( 6:10, runif(5) )
merge(x, y, by=1, all=TRUE)
X1.10 runif.10. runif.5.
1 1 0.4915303 NA
2 2 0.7108826 NA
3 3 0.5658456 NA
4 4 0.4201561 NA
5 5 0.9575464 NA
6 6 0.1650210
If memory serves, Fisher's Discriminant analysis produces the same
results as lda for two groups although the assumption and derivations
are different. Google search produces
http://www.statsoftinc.com/textbook/stdiscan.html
In the middle of page 347 of MASS 3 (sorry no latest copy here), it
I am not sure if I understand your question properly but try this
par(mfrow=c(1,3))
plot(1:10, 1:10, xlab=A very long label here)
plot(1:10, 1:10, xlab=A very long \n label here)
plot(1:10, 1:10, xlab=A very long \n label here, cex.lab=2)
Also have a look at help(par).
On Thu, 2004-07-22 at
I would try to construct the confidence intervals and compare them to
the value that you want
x - rnorm(20)
y - 2*x + rnorm(20)
summary( m1 - lm(y~x) )
snip
Coefficients:
Estimate Std. Error t value Pr(|t|)
(Intercept) 0.1418 0.1294 1.0950.288
x 2.2058
The question is poorly specified. I can only guess the problem much less
the answers, but try reading through
http://tolstoy.newcastle.edu.au/R/help/04/07/0443.html
http://tolstoy.newcastle.edu.au/R/help/04/07/0224.html
On Wed, 2004-07-21 at 00:41, Mike Prager wrote:
To get better help, I
The example in help(rq) works for me.
I presume the problem is not due to attach(forrq) as you get the
scatterplot. Why don't you try printing 'xx' and 'yy' inside the loop
and see what you get.
On Mon, 2004-07-19 at 14:53, [EMAIL PROTECTED] wrote:
I've been trying to draw quantile linear
Herman,
Just out of curiosity, have you tried Mike Eisen's software Cluster
(http://rana.lbl.gov/EisenSoftware.htm). Try version 2.12 instead as
version 2.20 appears to give wrong results.
I never tried with 32000 rows, but when I tried a 1 row last year it
seem to produce the results in a
# Blue - yellow
library(arrayMagic)
x - matrix( rnorm(1000*100), nc=100 )
plot.imageMatrix( x )
# Red - green
library(sma)
plot.mat(x)
Looking at the codes, the author utilise rgb(). Hope this helps.
Regards, Adai.
On Mon, 2004-07-19 at 20:27, F Duan wrote:
Dear All,
There is a
)) / table(factor(v2))
Error in table(factor(v1))/table(factor(v2)) :
non-conformable arrays
On Sun, 2004-07-18 at 16:39, Uwe Ligges wrote:
Adaikalavan Ramasamy wrote:
Please give a reproducible example. Here is one way :
# generate example
v1 - rep( c(0, 2, 10, 11, 13, 14, 15
I am must be a bigger/slower fool to have fallen for April fools trick
in the mid of July !
Sorry Greg for misleading you.
On Sat, 2004-07-17 at 11:43, Uwe Ligges wrote:
Adaikalavan Ramasamy wrote:
On Fri, 2004-07-16 at 23:18, Greg Adkison wrote:
I would be incredibly grateful
On Fri, 2004-07-16 at 23:18, Greg Adkison wrote:
I would be incredibly grateful to anyone who'll help me translate some
SAS code into R code.
Searching for SAS code OR script OR translate on
http://maths.newcastle.edu.au/~rking/R/ gives a few results, one of
which looks promising is
library(sm)
x - ask(Enter a number)
Enter a number: 5
x
[1] 5
On Thu, 2004-07-15 at 11:41, Paolo Covelli wrote:
Hi,
I wish build a R-script (or a R-function) that read a number from the keyboard and
then process it.
For example: from R I load the function X, that ask me the level of
If you want to fit y = a + bx, then you use lm(y ~ x) instead of lm(y ~ A + bx).
See the details section of help(formula).
x - 1:5
y - c(0, 1.0, 1.7, 2.0, 2.1)
lm(x ~ y)
Call:
lm(formula = x ~ y)
Coefficients:
(Intercept)y
0.6828 1.7038
PS : I think there is a typo
If you want to fit y = a + bx, then you use lm(y ~ x) instead of lm(y ~ A + bx).
See the details section of help(formula).
x - 1:5
y - c(0, 1.0, 1.7, 2.0, 2.1)
lm(x ~ y)
Call:
lm(formula = x ~ y)
Coefficients:
(Intercept)y
0.6828 1.7038
If A was already defined, and
If you want to fit y = a + bx, then you use lm(y ~ x) instead of lm(y ~ A + bx).
'A' is not a parameter but coefficient and you do not need to specify coefficients,
which is what the linear model is trying to do anyway !
See the details section of help(formula).
x - 1:5
y - c(0, 1.0, 1.7,
Yes, corporate firewall can be a real pain at times. Duncan does have a
point that many users (especially new ones) will not know what this is
for.
Would it be possible to test during the installation process if
--internet2 is suitable and ask for confirmation from the user. A
message as follows
I do not know anything about nls(), so apologies if I get it completely
wrong. help(AIC) says that AIC is defined to be
-2*log-likelihood + k*npar; where k = 2 by default.
I think you calculated -2*log-likelihood + k*(npar + 1) instead. Does
this help ?
On Fri, 2004-07-16 at 03:50, [EMAIL
Try read.table(choose.files(), row.names=NULL).
BTW, I think you might be using an older R version because in R-1.9.1,
the value for row.names is missing by default in read.table().
args(read.table)
function (file, header = FALSE, sep = , quote = \', dec = .,
row.names, col.names, as.is =
I think the issue here is in the two keywords - permutations or sample.
AFAIK, permutations should return all admissible (by some rule)
combinations. If this is a large number, as some have pointed out, then
one essentially takes a _sample_ of all admissible combinations. Since
you earlier
http://www.jiscmail.ac.uk/lists/ALLSTAT.html
On Wed, 2004-07-14 at 17:47, F Duan wrote:
Thank you for your reminding. Could you tell me the addresses of STAT-L and
ALLSTAT lists?
By the way, I found Cronbach's alpha suggested by Prof. Baron might be the
one I am looking for though it's not
I think I may know what you want. Try this :
# code
strata.restricted.sample - function( grp ){
K - length(unique(grp)) # number of levels
new.grp - sample(grp)
xtab- table(grp, new.grp)
propA - apply(xtab, 1, function(x) max(x) / sum(x))
no.A- sum( propA == 1 )
I remember doing this some time ago but forgot. Perhaps this might help
you
MASS:::predict.lda
On Tue, 2004-07-13 at 23:56, marzban wrote:
Hi.
I asked a question about lda() and got some answers. However, one
question remains (which is not independent of the earlier ones):
What output
Yes, I have source()-ed recursively without problems before. Try
sourcing the second script on its own and see what errors it has.
I have download lkpack.zip
(http://www.mep.ki.se/~yudpaw/likelihood/lkpack.zip)
and source(EX2-13.R) and source(li.r) which is called without
problem. The timestamp
What would be the purpose of a function/software to rewrite x1 in terms
of x2 ? Perhaps you could explain further how it might be of some use.
There is uniroot(), polyroot(), optimize(), nlm(), solve() and many
others that you want to look into.
On Fri, 2004-07-09 at 17:07, Stephane Dray wrote:
Do you by any chance have multiple versions of R installed ? The first
two lines of the header in the iESS buffer should give a clue. Example :
R : Copyright 2004, The R Foundation for Statistical Computing
Version 1.9.1 (2004-06-21), ISBN 3-900051-00-3
How does that compare to the header in
grp - rep(1:5, each=3)
resp - rnorm(15)
mu - tapply(resp, grp, mean)
s - tapply(resp, grp, sd)
stopifnot( identical( names(mu), names(s) ) )
LCL - mu - 2*s # lower confidence limit
UCL - mu + 2*s
Here I choose 2 as we expect 95% of the data to fall under 4 sd.
# Type 1
plot(names(mu), mu,
On Wed, 2004-06-23 at 13:53, Monica Palaseanu-Lovejoy wrote:
Hi Again,
First of all thank you for all the responses to my previous query.
Your answers were very helpful and I did the job ;-). Now I hope you
can answer as quick the following (sorry I am invading you with
trivial
See the example in help(cut). You will require the option right=FALSE
in cut() or you can try hist.
x - abs(rnorm(100))
table( cut(x, seq(0, max(ceiling(x)), by=0.5), right=FALSE ))
hist(x, breaks=seq(0, max(ceiling(x)), by=0.5), plot=FALSE)
On Mon, 2004-06-21 at 14:01, Silvia Kirkman wrote:
This has been discussed several times on this list. Note that line 2 of
paragraph 2 of help(if) says the following :
In particular, you should not have a newline between '}' and 'else' to
avoid a syntax error in entering a 'if ... else' construct at the
keyboard or via 'source'.
On Sun,
Try this :
silly.fn - function(x){ return( c(x^2, x^3) ) }
output - matrix( nr=100, nc=2 )
for(i in 1:100){
my.x - rnorm(1)
output[i, ] - silly.fn( my.x )
rownames(output)[i] - paste(Dataset, i, sep=)
}
colnames(output) - c(squared, cubed)
Notice that silly.fn returns a vector which is set
# Generate data
universe - c(0, 0.17, 0.5, 1, 2.5, 3, 4)
prob - c(94, 1, 1, 1, 1, 1, 1)/1000
tab - list(NULL)
for(i in 1:6){ tab[[i]] - table(sample(universe, 218, prob=prob,
rep=TRUE)) }
# Re-table
all - unique(unlist(sapply(tab, function(x) names(x
retab - t(sapply( tab, function(x)
On Wed, 2004-06-09 at 15:36, Paulo Nuin wrote:
Hello everyone
This is my first message to the list and I believe the question I am
including is a simple one.
I have a matrix where I need to calculate ANOVA for the rows as the
columns represent a different treatment. I would like to know
Try renaming (or moving or deleting) the .Rdata file.
The .Rdata could be in somewhere like c:\Program Files\R\rw1090\. It
is be considered a hidden file, so you may not be able to see it.
Go to Tools-Folder Options-View and select show hidden files and
folders or use dos prompt.
On Mon,
Possible something like this ?
grp - factor(rep(c(odd, even), 3)); val - c(1,2,3,4,5,6)
data.frame(grp, val)
grp val
1 odd 1
2 even 2
3 odd 3
4 even 4
5 odd 5
6 even 6
( newval.list - tapply(val, grp, sample) )
$even
[1] 6 4 2
$odd
[1] 3 1 5
for(i in
1. There should have been warning or error when using _ as it is
depreceated. Use - instead.
2. There is an extra ]
3. Could it be that after removing all the cases with NA, you do not
have sufficient observations. Example :
j - c(NA, 2, NA, 4, NA)
k - c(1, NA, 3, NA, 5)
(m - match(data1a, map1[ ,1]))
[1] 2 3 4 5 2 2 2 2
map1[m ,2] # to return labels
[1] label1 label2 label3 label4 label1 label1 label1
label1
On Mon, 2004-04-19 at 11:34, Stefann Jonsso wrote:
Hello R community.
Can anyone inform me how to solve this short problem? I
Also check out bplot() function in the library fields.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Chuck Cleland
Sent: 30 March 2004 20:07
To: Carlos J. Gil Bellosta
Cc: [EMAIL PROTECTED]
Subject: Re: [R] BoxPlots, 1 Way ANOVA and
Try plot( sales[ 13:24, serial ], sales[ 13:24, i ], xlab=Month No,
ylab=No/month)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Pete Phillips
Sent: 06 March 2004 09:53
To: [EMAIL PROTECTED]
Subject: [R] how to loop through names ?
Hi
I'm sure
1. Section 2.6 Character Vectors of R-intro (www.r-project.org - Manual -
Introduction to R)
2. Search the archives https://www.stat.math.ethz.ch/mailman/listinfo/r-help
which is appended as footnote on every R-help mail
3. help(paste)
-Original Message-
From:
[EMAIL PROTECTED]
I like the previous suggestion of counting the number of unique e-mails in
the archive.
Another useful thing would be to count and plot the growth of number of R
(and Bioconductor) packages over the years. I know not all packages are
created equal.
Regards, Adai.
-Original Message-
?data.frame
data.frame( table(cut(x, seq(0, 1, by=0.1))) )
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Kai Hendry
Sent: 17 March 2004 14:55
To: [EMAIL PROTECTED]
Subject: [R] Frequency table
This must be FAQ, but I can't find it in archives
PROTECTED] Behalf Of Prof Brian Ripley
Sent: 16 March 2004 07:13
To: Adaikalavan Ramasamy
Cc: [EMAIL PROTECTED]
Subject: Re: [R] make check on Solaris 8 fails due to plot
See the R-admin manual: this happens for certain broken versions of
Solaris-sparc gcc. If that is not the cause we would need
paste(c:/Rfigures/plot, i, .ps, sep=)
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: 15 March 2004 11:37
To: [EMAIL PROTECTED]
Subject: [R] creating a ps. file
Dear all
I wrote a routine. At the end of each cycle of the
with no
success. Can anyone kindly help me fix the problem or at least show me how
to get more information about the error.
Thank you.
--
Adaikalavan Ramasamy[EMAIL PROTECTED]
Medical Statistician
Centre for Statistics in Medicine http://www.ihs.ox.ac.uk/csm/
Medical Statistics
of set number and observation in set
number.
--
Adaikalavan Ramasamy
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Renaud Lancelot
Sent: Wednesday, December 24, 2003 5:00 PM
To: Pravin
Cc: [EMAIL PROTECTED]
Subject: Re: [R] coding logic and syntax in R
If your dataset contains integer or limited possible unique numbers only I find the
following more concise.
m - matrix( rpois(60, 5), nc=6 )
apply( m , 2, function(x) table( factor(x, levels=0:max(m))) )
If your dataset has continous or lots of unique numbers you may wish to consider only
li - list(1, 2, 3)
li
[[1]]
[1] 1
[[2]]
[1] 2
[[3]]
[1] 3
paste(unlist(li), collapse= )
[1] 1 2 3
length( paste(unlist(li), collapse= ) )
[1] 1
--
Adaikalavan Ramasamy
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Christopher Brown
Sent
If you want to generate a p-value, what is the null hypothesis ?
--
Adaikalavan Ramasamy
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Uwe Ligges
Sent: Wednesday, December 10, 2003 3:43 PM
To: Maya Sanders
Cc: [EMAIL PROTECTED]
Subject: Re: [R
sd - sqrt(var(x)) # standard deviation
cv - sd / mean(x) # coefficient of variation
ss - mean( x^2 ) # sum of squares - definitions vary !
If these are the statistics you are going to be using, it might be more
efficient to code it directly.
--
Adaikalavan Ramasamy
-Original Message
be to use hclust(), select a
similarity/dissimilarity cutoff to create groups. Then from each group
you can either choose the average profile or randomly select one column
to represent the group.
--
Adaikalavan Ramasamy
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED
The examples in help(hist) and help(barplot) uses the argument col='gray' etc to set
the color of the barplots/histograms. As for grids, the following may help
tN - table(Ni - rpois(100, lambda=5))
r - barplot(tN, col=gray, xaxt=n) # alternatively hist(Ni, col=gray,
freq=T)
abline(
See the Manual or Publications under http://www.r-project.org/. Books with ref [4]
and [9] under publications might be of interest.
-Original Message-
From: [EMAIL PROTECTED] on behalf of Aaron Snail:Lewis Dinkin
Sent: Sun 11/16/2003 1:04 PM
To:
in their mailbox.
--
Adaikalavan Ramasamy
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, November 15, 2003 8:31 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [R] A suggestion regarding multiple replies
On 14-Nov-03
You can try the following commands, which I have not tested extensively,
m - data.frame( object=c(1,2,3,4,5), group=c(1,2,1,1,3) )
tab - table(m)
out - tab %*% t(tab)
The above is OK if every object belongs to one group only. But if it does not, say as
in m2 - rbind(m, c(1,3)), the values
help(sample)
-Original Message-
From: [EMAIL PROTECTED] on behalf of Rajarshi Guha
Sent: Tue 11/11/2003 12:28 AM
To: R
Cc:
Subject: [R] shuffling a vector
Hi,
I'me trying to write a function that
Genome Institute of Singapore (GIS)
Biostatistics Group
The Genome Institute of Singapore ( http://www.gis.a-star.edu.sg
http://www.gis.a-star.edu.sg ) is looking for statisticians who are interested in a
wide range of biomedical probems.
We are especially interested in hearing from senior
What was the command that caused the problem (reproducible example please).
What was the error message ?
Try the same command with R 1.7.1 and see if you get the same error.
-Original Message-
From: Janusz Kawczak [mailto:[EMAIL PROTECTED]
Sent: Thu
.
Since you are doing large enough times it might be wise to code in C. My
C version of this is at least 20-40 times faster than the one in R but
like the one above it does not return p-values.
--
Adaikalavan Ramasamy
-Original Message-
From: Uwe Ligges [mailto:[EMAIL PROTECTED]
Sent
, it might just be easier to code the missing values when
reading in. Try read.table( file=lala.txt, na.strings = -999.00).
--
Adaikalavan Ramasamy
-Original Message-
From: Laura Quinn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 07, 2003 8:04 PM
To: [EMAIL PROTECTED]
Subject: [R
it as a
fundamental type and not as an ESS type. There might be ways to
associate Rdata files with ESS. But other people might not consider
reading your *.Rdata files.
--
Adaikalavan Ramasamy
-Original Message-
From: Federico Calboli [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 7
scales up the sum of squares of difference to account for
the missing pair.
Hope this helps.
--
Adaikalavan Ramasamy
Dear Sir,
This is Ms. Setsuko Kinoshita writing from Japan.
I have a question about missing value in Hierarchical Clustering.
Hierarchical Clustering was not available
We can try a to approximate the area under the curve using Trapezoidal rule on the
plotting coordinates that density() produces.
nbin - 1024 # number of bin
d - density( rnorm(5), n=nbin)
totalArea - 0
for(i in 1:(nbin-1) ){
xxx - d$x[i+1] - d$x[i] # width of
mean(list(m1, m2)) will not work.
mylist - list(m1, m2)
sapply( mylist, FUN=mean ) gives will give you the mean of m1 and m2
sapply( mylist, FUN= function(x) apply(x, 2, mean) ) will give you the
column means of m1 and m2 in a matrix format. Double check the resulting
dimension.
Here are
boxplot(), scale(), hist() ... But this largely depends on what ascpect
of the data you want to compare and why.
-Original Message-
From: Junwen wang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 11:41 PM
To: [EMAIL PROTECTED]
Subject: [R] normalize data
Hi,
I have two
If we are going to use unix tools to create a new dataset before calling
into R, why not simply use
cat my_big_bad_file | tail +1001 | head -100
to read lines 1000-1100 (assuming one header row).
Or if you have the shortlisted rownames in one file, you can use join
after sort. A working
Why should it take months to get these installed ?
Both R and emacs are simple and free to install. If high speed internet access is a
problem, you can always download these from some Internet Café or a friend, burn it
into CD and install onto the machines.
If you have red tapes on installing
Would a simple ifelse() do ?
a - ifelse( a 10, a^2, a )
On Thu, 17 Jul 2003, Torsten Hothorn wrote:
On Thu, 17 Jul 2003, Angel wrote:
Hi,
How can I remove elements from a vector and them put them back in place??
An example (very simple, my vector/operations are much
This really depends on what you want to do. I will try to give some
example below.
1. Coding the missing values
But you definitely do not need to delete observations BEFORE loading
them into R.
By default any empty cells or NA is treated as NA, when you load the
data using read.delim(). You
The row.names argument (if present) defines which column is to be used
as the row names. The default in read.table() is missing row.names and
hence row.names is not detected. The row names (if present) need to be
unique.
Giving us your code would have been helpful, but I am guessing you have
set
This really depends on what your output is. As previously suggested
save() and write() are excellent suggestions.
for(ii in 1:1000){
out - cor( x[ii, ], y[ii, ] ) # or whatever
cat(ii, \t, out, \n, append=TRUE, file=output.txt)
}
This method is really not worth it for small
1) Calculating a 121 x 121 correlation matrix and then extracting the relevant
correlating is extremely inefficient and slow. Instead try this :
data - as.matrix( data ) # data is your 91 x 121 matrix or
dataframe
colInterest - data[ ,1]
apply( data, 2, function(x)
How about pdf(), jpeg() or png() ?
-Original Message-
From: Philippe Glaziou [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 05, 2003 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: [R] the huge postscript plot
Yongchao Ge [EMAIL PROTECTED] wrote:
I'm just wondering how I can do to make a
You can use save(object1, file=lalala.1), save(object1,
file=lalala.2), ... and the use load() to restore the object1 and
object2. Or if you have many objects in a simulation to save, you can
save all objects using save.image(sim1.result.R).
Another option is to use write.table or zz -
As Prof.Ripley has kindly pointed out, bitmap and Xvbf are possible
solutions.
See also replies from vfasciani on
Tuesday, March 18, 2003 5:32 PM
Wednesday, March 19, 2003 6:36 PM
You might also want to check out the e-mail from Steve Chen regarding R
and PHP on
Friday, June 13, 2003 2:36 AM
Dear all,
I am trying to compile the package e1071 (version 1.3-11) with R CMD
INSTALL. I tried with R 1.7.0 on Redhat Linux 2.4.7-10 and R 1.6.2 on
Linux 2.4.9-34smp but keep getting the same error message during
configure :
WARNING: g++ 2.96 cannot reliably be used with this package. Please
Yes there is.
x - c(Bob, loves, Sally)
paste(x, collapse= )
[1] Bob loves Sally
-Original Message-
From: John Miyamoto [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 7:54 AM
To: R discussion group
Subject: [R] Combining the components of a character vector
Dear Help,
Please ignore this mail. I don't remember sending this mail for the
second time. Thanks to all those who replied.
-Original Message-
From: Adaikalavan Ramasamy
Sent: Monday, March 31, 2003 3:30 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [BioC] [R] SAM: Significance
Dear all,
I have been asked to compare the SAM method on some datasets I have.
Searching the archives and help files for SAM was not fruitful. As I
understand it is available as Excel add-in and not in R.
I am wondering if anyone has written this (in R or S-PLUS) and would be
willing to share
If I understand you correctly, you have the five number summary (min,
q1, median/mean, q3, max).
Have a look at the function bxp() where you can supply the summary
values as a list.
-Original Message-
From: John Borders [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 1:56 AM
301 - 400 of 412 matches
Mail list logo