Hi all,
I would appreciate your advice how to model the survival model for the
following data, especially if it can be modeled in one model or if I should
(have to) break it up (i.e. assume that some events are independent of each
other, etc.). Data is on an experimental stock market simulation.
Hi,
I was wondering if I might be able to ask some advice about doing residual
plots for the lmer function in the lme4 package.
Our group's aim is to find if the expression staining of a particular gene
in a sample (or core) is related to the pathology of the core.
To do this, we used
On Wed, 15 Aug 2007, Moshe Olshansky wrote:
Thank you - I wasn't aware of this function.
One can even use lchoose which allows really huge
arguments (more than 2^1000)!
Using dbinom() for binomial probabilities would be even better,
and that has a log=TRUE argument to return results on
On 15/08/07, Ted Harding [EMAIL PROTECTED] wrote:
So you if you want the density plot, you would need to calculate
this for yourself. E.g.
H1$density - counts/sum(counts)
plot.histogram(H1,freq=FALSE)
Oddly, plot.histogram doesn't work in my version of R (which is 2.5.1), even
though R can
Dear list,
I am looking for a function/way to get the array coordinates of given
elements in an array. What I mean is the following:
- Let X be a 3D array
- I find the ordering of the elements of X by ord - order(X) (this
returns me a vector)
- I now want to find the x,y,z coordinates of each
Hi all -
I'm on R 2.5.1 for XP.
in the systemfit package, the summary is set to print the McElroy's
measure of fit unless it's NULL. When the option saveMemory = TRUE,
the McElroy isn't included, instead it defaults to NA. Thus I am
unable to use summary.systemfit.
library(systemfit)
Hi,
Sorry if this is a repost. I searched but found no results.
I am wondering if it is an easy way to construct the following matrix:
r 1 0 00
r^2 r 1 00
r^3 r^2 r 10
r^4 r^3 r^2 r1
where r could be any number. Thanks.
Wen
[[alternative
list(...),
I am working with environmental time series (eg rainfall, stream flow)
that have attached quality codes for each data point. The quality
codes have just a few factor levels, like good, suspect, poor,
imputed. I use the quality codes in plots and summaries. They are
carried through when
On 16-Aug-07 03:10:17, [EMAIL PROTECTED] wrote:
Hi,
Sorry if this is a repost. I searched but found no results.
I am wondering if it is an easy way to construct the following matrix:
r 1000
r^2 r100
r^3 r^2 r10
r^4 r^3 r^2 r1
where r
?toeplitz
?lower.tri
since it is the lower triangle of a Toeplitz matrix (or drop the top row)
r - 0.95
R - toeplitz(r^(0:4))
R[upper.tri(R)] - 0
R[-1,]
On Thu, 16 Aug 2007, [EMAIL PROTECTED] wrote:
Hi,
Sorry if this is a repost. I searched but found no results.
I am wondering if it is an
On Thu, 16 Aug 2007, Felix Andrews wrote:
list(...),
I am working with environmental time series (eg rainfall, stream flow)
that have attached quality codes for each data point. The quality
codes have just a few factor levels, like good, suspect, poor,
imputed. I use the quality codes in plots
Hi all,
I'm wanting to be able to find and store the z-score of coxph below: -
modz=coxph(Surv(TSURV,STATUS)~RAGE+DAGE+REG_WTIME_M+CLD_ISCH+POLY_VS,
data=kidneyT,method=breslow)
I know summary(modz) will give me this, but how do i extract the
standard error or z-score values in a similar way
Hi R-users,
Could someone help me to combine bwplot and srt option (exemple srt = 45
degree or srt 90 degree)? My graphic contains 146 boxplots, I would like
to label all of them. As you know, labels are not readable.
Thank you for your help in advance!
Lassana KOITA
Chargé d'Etudes de
Thank you.
I will try to get the book, althoug I am not sure if I with my tiny
knowledge of mathematics will be able to digest it.
Meanwhile I tried to make 7 min average and then to reanalyze by spectrum,
but the output was not very convincing.
Regards
Petr Pikal
[EMAIL PROTECTED]
Rolf
KOITA Lassana - STAC/ACE lassana.koita at aviation-civile.gouv.fr writes:
Could someone help me to combine bwplot and srt option (exemple srt = 45
degree or srt 90 degree)? My graphic contains 146 boxplots, I would like
to label all of them. As you know, labels are not readable.
You
Daniel Lakeland dlakelan at street-artists.org writes:
We have used the lmer package to fit various models for the various
experiments that she has done (random effects from multiple
measurements for each animal or each trial, and fixed effects from
developmental stage, and genotype etc).
Remember that polynomials of the form
y = b1*x + b2*x^2 + ... + bm*x^m
fit the linear regression equation form
Y = beta_1*x_1 + beta_2*x_2 + ... + beta_m*x_m
If one sets (from the 1st to the 2nd equation)
x - x_1
x^2 - x_2
x^3 - x_3
etc.
In R this is easy, just use the identity operator
Thank you for you quite and useful explanation. And do know how to sort
them by median?
best regargs
Lassana KOITA
Chargé d'Etudes de Sécurité Aéroportuaire et d'Analyse Statistique /
Project Engineer Airport Safety Studies Statistical analysis
Service Technique de l'Aviation Civile (STAC)
Hi all,
Hope you people do not feel irritated for repeatedly sending mail on Time
series.
Here I got another problem on the same, and hope I would get some answer from
you.
I have following dataset:
data[,1]
[1] 4.96 4.95 4.96 4.96 4.97 4.97 4.97 4.97 4.97 4.98 4.98
Hi All,
I have 2 data frames as follows:
abc
1 NA 1
2 NA 2
NA 3 3
So a, b are the input values and c is the output which I am interested
in.
NA - Missing values. I used rbind, but its not working.
Let me know if anyone can help me
Thanks,
Hi R user,
I am new to R, and I have a very simple question for you. I have two matrix
A and B, with internally redundant rownames (but variables are different).
Some, but not all the rownames are shared among the two matrix. I want to
create a greater matrix that combines the previuos two, and
Thank you. Hereby I send you the return to sessionInfo(). I have
meanwhile updated to 2.5.1.
R ist ein Gemeinschaftsprojekt mit vielen Beitragenden.
Tippen Sie 'contributors()' für mehr Information und 'citation()',
um zu erfahren, wie R oder R packages in Publikationen zitiert werden
können.
Hi
for this particular task
rowSums(cbind(a,b), na.rm=T)
gives you c column
Petr
[EMAIL PROTECTED]
[EMAIL PROTECTED] napsal dne 16.08.2007 13:03:51:
Hi All,
I have 2 data frames as follows:
abc
1 NA 1
2 NA 2
NA 3 3
So a, b are the input values and c
I have 2 data frames as follows:
abc
1 NA 1
2 NA 2
NA 3 3
So a, b are the input values and c is the output which I am
interested in.
NA - Missing values. I used rbind, but its not working.
Let me know if anyone can help me
What
Dear everybody,
I'm a new user of R 2.4.1 and I'm searching for information on improving
the output of regression tree graphs.
In the terminal nodes I am up to now able to indicate the number of
values (n) and the mean of all values in this terminal node by the command
text(tree, use.n=T,
Hallo everybody.
I want to build my own GO package using the function GOPkgBuilder of
AnnBuilder. It uses AnnBuilderSourceUrls to collect data from different ftp
sites. These data are not complete for my organism, so I would like to change
the ftp adresses to a local one. The changing itself
Hi Megh
i hope you have confused with 'what is my NULL hypothesis' ?
i suggest you to take any ideal dataset about which you know that whether
it is stationary or not ? apply the test to know what is the NULL
hypothesis
used in any software :)
usually in many softwares the NULL hypothesis is
Here are two solutions. In the first lo has TRUE on the lower diagonal
and diagonal. Then we compute the exponents, multiplying by lo to zero
out the upper triangle. In the second rn is a matrix of row numbers
and rn = t(rn) is the same as lo in the first solution.
r - 2; n - 5 # test data
lo
Hi wen,
I don't think it is easy to construct this matrix in a simple way. I
tried and found a way to do it. Try the following codes:
i-1:4
j-5
aa-matrix(0,4,5)
for (j in 1:5){aa[i,j]-(i+1-j)}
r-4 #r could be any number
bb-r^aa
bb[aa0]=0
bb
The matrix bb is what you want. Furthermore,I packaged
It is easier to use poly(raw=TRUE), and better to use poly() with
orthogonal polynomials.
The original poster shows signs of having read neither the help for
predict.lm nor the posting guide, and so almost certainly misused the
predict method.
On Thu, 16 Aug 2007, Jon Minton wrote:
In addition, we could create a function to.df which converts a zoo
object to a data frame assuming that any column that only contains
1:nlevels is a factor with the indicated level names. Use to.df just
before plotting:
library(zoo)
set.seed(1)
f - zoo(factor(sample(3, 10, replace = TRUE)))
x -
Has anyone implemented CCC statistic (Sarle, 1983) in R?
If so I would greatly appreciate the relevant script file.
Any help will be much appreciated
Best regards, Silvia
Mg. Silvia Graciela Valdano
Departamento de Ciencias Naturales
Facultad de Cs. Exactas, Físico-Químicas y Naturales
Hi
version
_
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
status
major 2
minor 5.1
year 2007
month 06
day27
svn rev42083
language R
version.string R
Dear Rainer,
Have you considered using Sweave?
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg /
Hi Gabor,
I am glad to see your answer,which gives a hope to resove this
question in an easy way. I replied to this question in a more
complex way before seeing your answer.
However,I think your code needs some revision, because the original
matrix is not a diagonal matrix. It has 4 rows and 5
let say something like this
a=matrix(1:25, nrow=5)
rownames(a)=letters[1:5]
colnames(a)=rep(A, 5)
a
A A A A A
a 1 6 11 16 21
b 2 7 12 17 22
c 3 8 13 18 23
d 4 9 14 19 24
e 5 10 15 20 25
b=matrix(1:40, nrow=8)
rownames(b)=c(rep(a,4),rep(b,4))
colnames(b)=rep(B, 5)
b
B B B
Hi, there:
It's my first time to post question in this forum, so thanks for your
tolerance if my question is too naive. I am using a nonparametric smoothing
procedure in sm package to generate smoothed survival curves for continuous
covariate. I want to truncate the suvival curve and only
Hi Thierry
ONKELINX, Thierry wrote:
Dear Rainer,
Have you considered using Sweave?
No - and I am sure it will do what I want, but I guess it might be an
overkill. These arew just draft outputs for myself for different
datasets which should be easy to compare. SO I guess that Sweave might
On Thu, 16 Aug 2007, Juergen Kuehn wrote:
Dear everybody,
I'm a new user of R 2.4.1 and I'm searching for information on improving
the output of regression tree graphs.
In the terminal nodes I am up to now able to indicate the number of
values (n) and the mean of all values in this terminal
Hi, I'm interested in using mtext(), but with the option of having multiple
colors in the same line of text.
For example, creating a line of text where:
Red is red and blue is blue
How do you create a text argument that lets you do this within mtext()?
Thanks,
Andrew
MGH Cancer Center
It was pointed out that the required matrix may not be square and
the superdiagonal was missing in my prior post. Here is a revision:
r - 2; nr - 4; nc - 5 # test data
x - matrix(nr = nr, nc = nc)
x - row(x) - col(x) + 1
(x = 0) * r ^ x
On 8/16/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
[Gianni Burgin]
let say something like this
a=matrix(1:25, nrow=5)
rownames(a)=letters[1:5]
colnames(a)=rep(A, 5)
a
A A A A A
a 1 6 11 16 21
b 2 7 12 17 22
c 3 8 13 18 23
d 4 9 14 19 24
e 5 10 15 20 25
b=matrix(1:40, nrow=8)
rownames(b)=c(rep(a,4),rep(b,4))
colnames(b)=rep(B, 5)
Hi Margaret,
Have a look at qqmath in the lattice package.
?qqmath
Hank
On Aug 16, 2007, at 2:45 AM, Margaret Gardiner-Garden wrote:
Hi,
I was wondering if I might be able to ask some advice about doing
residual
plots for the lmer function in the lme4 package.
Our group's aim is to
On 8/16/07, KOITA Lassana - STAC/ACE
[EMAIL PROTECTED] wrote:
Thank you for you quite and useful explanation. And do know how to sort
them by median?
See ?reorder.factor
Note that traditional practice with bwplot() is to have the
categorical variable on the y-axis, in which case the default
Dr. Stevens,
I've double-checked my variable lengths. All of my variables
(Total.vines, Site, Species, and DBH) came in at 549. I did correct
one problem in the data entry that had escaped my previous notice:
somehow the undergrad who entered all the data managed to make the
Acer
Hello,
I'm a bit new to the world of R so forgive my ignorance. I'm trying to do a
zero-inflated negative binomial regression and have received an error message
and i'm not sure what it means. I'm running R 2.5.1 on XP. I have just tried
a really simple version of the model to see if it
Hi folks,
I would like to trim the trailing spaces in my factor variables using lapply
(described in this post by Marc Schwartz:
http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22826.html) but the code is
not functioning (in this example there is only one factor with trailing
spaces):
y1 -
Working on modeling a wild animal population. Two data vectors: the herd
count from year to year (estimated by a
sampling procedure), and the number of animals killed by hunters. Task is
to find the natural growth rate of the herd
(A simplification, but preserves the essentials.)
My question
I'm a bit new to the world of R so forgive my ignorance.
That has nothing to do with the knowledge of R but with the model. Age
has only 2 different values: 0 and 1 and if it is 0 there is no scars,
so what exactly have you expected from the model?
I would say if you just want to prove that
I would say if you just want to prove that older deer have more scars
try the Mann Whitney non parametric test...
Forgive me but even that does not really make sense since the values are
all 0 so it is to obvious...
__
R-help@stat.math.ethz.ch
Hi Peter --
Here's my guess.
Ironically, adding things to broken code reduces the signal to noise
ratio. I ended up with
get.vars.for.cluster = function(
cluster,
genes=get.global(gene.ids ),
ratios=get.global(ratios))
{
cluster - cluster
rows - cluster$rows
cols -
On Thu, 16 Aug 2007, James R. Milks wrote:
Dr. Stevens,
I've double-checked my variable lengths. All of my variables
(Total.vines, Site, Species, and DBH) came in at 549. I did correct
one problem in the data entry that had escaped my previous notice:
somehow the undergrad who entered all
Thanks Marc! What would be the easiest way to coerce char-variables back to
factor-variables? Is there a way to prevent the coercion in d[] - lapply(d,
function(x) if (is.factor(x)) sub( +$, , x) else x) ?
-Lauri
2007/8/16, Marc Schwartz [EMAIL PROTECTED]:
On Thu, 2007-08-16 at 17:54 +0300,
I'm working with a very large matrix ( 22k rows x 2k cols) of RNA
expression data with R v.2.5.0 on a RedHat Enterprise machine, x86_64
architecture.
The relevant code is below, but I call a function that takes a cluster
of this data ( a list structure that contains a $rows elt which lists
On Thu, 2007-08-16 at 17:54 +0300, Lauri Nikkinen wrote:
Hi folks,
I would like to trim the trailing spaces in my factor variables using lapply
(described in this post by Marc Schwartz:
http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22826.html) but the code is
not functioning (in this
The easiest way might be to modify the lapply() call as follows:
d[] - lapply(d, function(x) if (is.factor(x)) factor(sub( +$, , x)) else x)
str(d)
'data.frame': 60 obs. of 3 variables:
$ x: Factor w/ 5 levels 1,2,3,4,..: 1 1 1 1 1 1 1 1 1 1 ...
$ y: num 7.01 8.33 5.48 6.51 5.61 ...
$ f:
Dear All:
Urgent help is needed.
I have a data set in matrix format of three columns: X, Y and index of four
groups (1,2,3,4). What I need to do is the following;
1- How I can subtract the sample mean of each group indexed 1,2,3,4 from the
corresponding data values of this group and
On Thu, 16 Aug 2007, Marc Schwartz wrote:
The easiest way might be to modify the lapply() call as follows:
d[] - lapply(d, function(x) if (is.factor(x)) factor(sub( +$, , x)) else
x)
str(d)
'data.frame': 60 obs. of 3 variables:
$ x: Factor w/ 5 levels 1,2,3,4,..: 1 1 1 1 1 1 1 1 1 1
On Thu, 2007-08-16 at 17:52 +0100, Prof Brian Ripley wrote:
On Thu, 16 Aug 2007, Marc Schwartz wrote:
The easiest way might be to modify the lapply() call as follows:
d[] - lapply(d, function(x) if (is.factor(x)) factor(sub( +$, , x))
else x)
str(d)
'data.frame': 60 obs. of 3
You can set up the 3 plots per page by using:
par(mfrow=c(3,1))
Then there are a couple of options for skipping the top graphics
position if the graph fails. If you know that the graph failed then you
can just use plot.new() (or frame()) to skip the top plot and plot the
next one in the 2nd
Oops, I read further down in your original post and see that you already
knew about par(mfg=c(2,1)). To get it to advance to page 2 for the 4th
plot try calling plot.new() which should move you to the next page, then
doing par(mfg=c(1,1)) should cause the next graph to be at the top.
Hope this
If the problem is with the levels of the factor, why not change
them directly?
d = data.frame(a=1:5,
+ b=c('one ','two','three ','three ','two'))
d$b
[1] onetwothree three two
Levels: one three two
levels(d$b) = sub(' +$','',levels(d$b))
d$b
[1] one two three three two
Leandra Desousa sousa at ims.uaf.edu writes:
I am using 'R' version 2.2.1 and 'S-PLUS' version 6.0; and I loaded the
MASS library in 'S-PLUS'.
I am running a logistic regression using glm:
summary(mydata.glm)
Call:
glm(formula = COMU ~ MeanPycUpT + MeanPycUpS, family = binomial,data =
try this:
t0 = read.table(datatest.txt, header=T)
X.mean = ave(t0[,1], as.factor(t0[,3]))
you do the rest of Y.mean and make them into a data.fame or whatever.
HTH,
Weiwei
On 8/16/07, AbouEl-Makarim Aboueissa [EMAIL PROTECTED] wrote:
Dear All:
Urgent help is needed.
I have a data set in
I want to build my own GO package using the function GOPkgBuilder of
AnnBuilder. It uses AnnBuilderSourceUrls to collect data from different ftp
sites. These data are not complete for my organism, so I would like to change
the ftp adresses to a local one. The changing itself is working but
For the 2nd item, perhaps:
by(df[,1:2], df$index, FUN=cor)
where df is your data.frame.
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 16/08/07, AbouEl-Makarim Aboueissa [EMAIL PROTECTED] wrote:
Dear All:
Urgent help is needed.
I have a data set in matrix
On Thu, 2007-08-16 at 12:33 -0400, AbouEl-Makarim Aboueissa wrote:
Dear All:
Urgent help is needed.
I have a data set in matrix format of three columns: X, Y and index
of four groups (1,2,3,4). What I need to do is the following;
1- How I can subtract the sample mean of each group
Hi Martin -
Thanks for the feedback. Right after I sent the email to the list last
night, I realized that I'd forgotten to clear the all the vars we
attach() to the environment before rm()'ing everything. Whoops.
However, I found that while doing this *does* reduce the memory stamp by
Thanks all.
it works.
Just one more thing: if you look to this out put,
by(data1[,2:3], data1[,4], cor)[1]
$`1`
XY
X 1.0000.4400451
Y 0.4400451 1.000
Q. How I can just pick the value of the correlation 0.4400451 from this output
Dear Friends,
I have been trying to learn how to use the derivative free optimization
algorithms implemented in the package RGENOUD by Mebane and Sekhon. However, it
does not seem to work for reasons best described as my total ignorance. If
anybody has experience using this package, it would
Hi, try this:
by(df[,1:2], df$index, FUN=function(x)cor(x[1],x[2]))
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 16/08/07, AbouEl-Makarim Aboueissa [EMAIL PROTECTED] wrote:
Thanks all.
it works.
Just one more thing: if you look to this out put,
I'd like to fit linear models on very large datasets. My data frames
are about 200 rows x 200 columns of doubles and I am using an 64
bit build of R. I've googled about this extensively and went over the
R Data Import/Export guide. My primary issue is although my data
represented in ascii form
Hi All,
Can somebody tell me how to use R to combine p values using Fisher's method?
thanks.
Jiong
The email message (and any attachments) is for the sole use of the intended
recipient(s) and may contain confidential information. Any unauthorized
review, use, disclosure or distribution is
hi,
i'm new to R and i'm trying to port a quattro pro spreadsheet into R.
spreadsheets have optional lower and upper limit parameters on the beta
distribution function. i would like to know how to incorporate this with R's
pbeta function.
thanks in advance,
mara.
No, zeroinfl() in pscl did not give me any errors when I ran the
model. So there may be a bug in zicounts. Only problem now is how
to interpret the zeroinfl model. Am I correct in my understanding
that zeroinfl runs both the poisson and binomial models without
interactions? I'm
Here are a couple of options that you could look at:
The biglm package also has the bigglm function which you only call once
(no update), you just need to give it a function that reads the data in
chunks for you. Using bigglm with a gaussian family is equivalent to
lm.
You could also write your
On Thu, Aug 16, 2007 at 03:24:08PM -0500, Alp ATICI wrote:
I'd like to fit linear models on very large datasets. My data frames
are about 200 rows x 200 columns of doubles and I am using an 64
bit build of R. I've googled about this extensively and went over the
R Data Import/Export guide.
On 08/16/07 12:50, Jiong Zhang, PhD wrote:
Hi All,
Can somebody tell me how to use R to combine p values using Fisher's method?
thanks.
This might get you started. It is for the sole purpose of combining
two two-tailed p-values for effects in the same direction. Thus, it
is not very
The option alternative in adf.test() takes the value 'stationary' or
'explosive'. The value 'explosive' is used to test if the series is
stationary about a linear time trend. This means that a constant and
trend are to be included in the DF or ADF test regression. In the
case here the series is
Its actually only a few lines of code to do this from first principles.
The coefficients depend only on the cross products X'X and X'y and you
can build them up easily by extending this example to read files or
a database holding x and y instead of getting them from the args.
Here we process incr
Hello R-help,
I am a recent convert to R from SAS and I am having some difficulty with
output of a for loop into a matrix. I have searched the help manuals and
the archives, but I can't get my code to work. It is probably a syntax
error that I am not spotting. I am trying to make a distance
Does a package exist to help compute sample size for censored data? I am
planning a study involving interval censored data.
I know that there exists functions in stata for this, so I was wondering if R
has similar facilities. So far I have not been able to find anything for R.
Thanks for any
On Thursday 16 August 2007 15:35, Ryan Briscoe Runquist wrote:
Hello R-help,
I am a recent convert to R from SAS and I am having some difficulty with
output of a for loop into a matrix. I have searched the help manuals and
the archives, but I can't get my code to work. It is probably a
This does not work in the general case. To see this,
try:
rownames(a}[5] - a
and see what happens then.
--- François Pinard [EMAIL PROTECTED] wrote:
[Gianni Burgin]
let say something like this
a=matrix(1:25, nrow=5)
rownames(a)=letters[1:5]
colnames(a)=rep(A, 5)
a
A A A A A
A not very good solution is as below:
If your array's dimensions were KxMxN and the linear
index is i then
n - ceiling(i/(K*M))
i1 - i - (n-1)*(K*M)
m - ceiling(i1/K)
k - i1 - (m-1)*K
and your index is (k,m,n)
I am almost sure that there is a function in R which
does this (it exists in Matlab).
See arrayIndex() in the R.utils package, e.g.
X - array((2*3*4):1, dim=c(2,3,4))
idx - 1:length(X)
ijk - arrayIndex(idx, dim=dim(X))
print(ijk)
[,1] [,2] [,3]
[1,]111
[2,]211
[3,]121
[4,]221
[5,]131
[6,]231
[7,]1
If I am correctly understanding the problem, I think that this is what
you want:
set.seed(1)
# Create a 3x3x3 array
ARR - array(sample(100, 27), c(3, 3, 3))
ARR
, , 1
[,1] [,2] [,3]
[1,] 27 89 97
[2,] 37 20 62
[3,] 57 86 58
, , 2
[,1] [,2] [,3]
[1,]6 61
Is there a function analogous to N.cohen.kappa (concord package) which computes
sample size needed for a Kappa statistic with polytomous outcomes?
I have just started using R and so far I am finding it is missing alot of
things that Stata has.
-
Try this. We convert to data frame placing the row names in column 1, do
the merge, remove column 1 and convert back to matrix:
# test input
a - matrix(1:25, nrow = 5,
dimnames = list(letters[1:5], rep(A, 5)))
b - matrix(1:40, nrow = 8,
dimnames = list(rep(letters[1:2], each = 4), rep(B,
[Ana Conesa]
I am looking for a function/way to get the array coordinates of given
elements in an array. What I mean is the following:
- Let X be a 3D array
- I find the ordering of the elements of X by ord - order(X)
(this returns me a vector)
- I now want to find the x,y,z coordinates
Get the indices using expand.grid and then reorder them:
set.seed(1); X - array(rnorm(24), 2:4) # input
X # look at X
do.call(expand.grid, sapply(dim(X), seq))[order(X),]
On 8/16/07, Ana Conesa [EMAIL PROTECTED] wrote:
Dear list,
I am looking for a function/way to get the array coordinates
Hi
i have two arrays of genes names,one with18 gene names and the other with
24000 gene names,I have to compare both of them for finding common names.
I have both the arrays in .csv format.i loaded the files and tried to compare
them using for and if loops
but I got the error Error in
Hi, All,
I am a beginner for R. Now I have installed R 2.5.1 in Window
environment. After I run a program such as gam I would like to display
a plot for the object. The following is an example. When I did this,
only the last plot was presented on my screen. How can I get a plot
before the last
Read them into 2 different vectors and then use 'intersect'.
On 8/17/07, ramakanth reddy [EMAIL PROTECTED] wrote:
Hi
i have two arrays of genes names,one with18 gene names and the other with
24000 gene names,I have to compare both of them for finding common names.
I have both the
Turn 'Recording on for the plots.
windows(record=TRUE)
or select from the GUI.
On 8/17/07, Brad Zhang [EMAIL PROTECTED] wrote:
Hi, All,
I am a beginner for R. Now I have installed R 2.5.1 in Window
environment. After I run a program such as gam I would like to display
a plot for the
95 matches
Mail list logo