Dear All,
For the following C code:
SEXP testR(SEXP rho) {
SEXP evalStr,evalRes;
Char cmdstr[1024];
SEXP val;
/* Get the value of variable 'val' defined already in the R
environ */
PROTECT(val = findVar(install("val"),
On Wed, 8 Sep 2004, Niggley, Jason wrote:
> As I am installing R for windows, I get the following error:
>
> "C:\ProgramFiles\R\rw1091\library\stats\chtml\stats.chm
Is that really not Program Files?
> An error occurred while trying to copy a file:
>
> The source file is corrupted."
>
> Can yo
Thnks to Prof. Frank E Harrell Jr , Prof. Bernardo Rangel Tura, and Prof.
Thomas Lumley for their response.
Tomas Karpati (MD)
The Michaelson Institute for the prevention of Blindness
Hadassah Medical Org.
email: [EMAIL PROTECTED]
Phone: +972-2-6256458, fax: +972-2-6232895
On Tue, 07 Sep 2004 1
On Thu, 9 Sep 2004, Erich Neuwirth wrote:
> The simple answer to my problem (are the values of a vector
> numeric or not) is is.numeric, and that is enough for
> what I need right now.
> But this way I do not get an answer discriminating between
> integers and and doubles. What is the canonical wa
On Wed, 8 Sep 2004, Erich Neuwirth wrote:
> The function I need is
> valtype<-function(x)
> typeof(ifelse(is.factor(x),levels(x),x))
>
> It is easy enough to write.
> Are there any other special cases where the values
> and the storage mode differ?
All classed objects are more than the int
Note that I(v2) stores v2 as type character but not as class character.
For example,
R> DF <- data.frame(x = c("a", "b"), y = I(c("a", "b")), z = I(c("a", "b")))
R> class(DF$z) <- "character"
R> sapply(DF, typeof) # y and z do have the same type
x y z
"integer"
On Wednesday 08 September 2004 23:18, Leon Barmuta wrote:
> Dear all,
>
> I wish to generate a lattice boxplot which skips an empty cell in a
> design. I have trawled r-help, scruitinized xyplot(lattice) help
> page, and merrily reproduced examples of using skip from a couple of
> previous r-help q
ucalgary.ca> writes:
: source vector = (1,2)
: the length of the target vector = 3
:
: solution2: as.matrix(expand.grid(1:2, 1:2, 1:2)) almost implements what I
: need.
:
: However, in my case, the length of the target vector is not fixed in
: advance. For example, the output might be
Dear all,
I wish to generate a lattice boxplot which skips an empty cell in a design.
I have trawled r-help, scruitinized xyplot(lattice) help page, and merrily
reproduced examples of using skip from a couple of previous r-help queries
and the example given in Pinheiro & Bates. But I must be mis
Doran, Harold wrote:
Thank you. Quick clarification. isoMDS only works with dissimilarities.
Converting my similarity matrix into the dissimilarity matrix is done as
(from an email I found on the archives)
d<- max(tt)-tt
Mardia, kent & Bibby defines the "standard transformation" from a
Hi,
Loren Grimes wrote:
I realize that this is pretty basic, and I should be able to figure this out: but, how do I write a function [with a text editor] and then load it into an interactive R session?
Thanks
Try ?source
HTH,
Kevin
--
Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its
I realize that this is pretty basic, and I should be able to figure this out: but, how
do I write a function [with a text editor] and then load it into an interactive R
session?
Thanks
--
___
Sign-up for Ads Free at Mail.com
http://promo
> n <- 2
> p <- 5
> m <- do.call("expand.grid", data.frame(matrix(rep(1:n, p), n, p)))
> do.call("paste", c(m, sep=""))
[1] "1" "2" "12111" "22111" "11211" "21211" "12211" "22211" "11121"
"21121"
[11] "12121" "22121" "11221" "21221" "12221" "1" "2" "21112" "12112"
"22112"
[21] "112
combinat<-function(els,len){
if (len==1) (return(as.character(els)))
else return(as.vector(t(outer(combinat(els,len-1),as.character(els),
function(x,y)paste(x,y,sep="")
}
combinat(1:2,3)
does what you want
[EMAIL PROTECTED] wrote:
Thanks David first.
Probably, David misunderstood my points
Hi all,
source vector = (1,2)
the length of the target vector = 3
My expected "complete" output should be:
111, 112, 121, 122, 211, 212, 221, 222 (they are Not numerical numbers, they
are equivalent to abc and aab etc.).
Not perfect solutions suggested by others so far:
solution1: sample(c(
As I am installing R for windows, I get the following error:
"C:\ProgramFiles\R\rw1091\library\stats\chtml\stats.chm
An error occurred while trying to copy a file:
The source file is corrupted."
Can you help me?
Jason
[[alternative HTML version deleted]]
___
The simple answer to my problem (are the values of a vector
numeric or not) is is.numeric, and that is enough for
what I need right now.
But this way I do not get an answer discriminating between
integers and and doubles. What is the canonical way of getting the
type of the values of a vector?
Is t
> Therefore, I would like to know if there are other types of variables
> (besides factors) which give a misunderstandable answer about
> the type
> of their values when asked typeof.
Your question is a bit combative, don't you think? R performs as documented,
so I think your characterization is
Try:
> m <- as.matrix(expand.grid(1:2, 1:2, 1:2))
> x <- m[,1] * 100 + m[,2] * 10 + m[,3]
> x
1 2 3 4 5 6 7 8
111 211 121 221 112 212 122 222
Note that if the `source vector' is not 1:k for some integer k, you need to
coerce the output of expand.grid, as that returns a data fram
You should be able to make small modifications to the ci.lme function
provided in the gregmisc/gmodels package.
-Greg
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Spencer Graves
> Sent: Friday, September 03, 2004 11:58 AM
> To: [EMAIL PROTECTED]
>
Thanks David first.
Probably, David misunderstood my points.
source vector = (1,2)
the length of the target vector = 3
My expected "complete" outputs should be:
111, 112, 121, 122, 211, 212, 221, 222.
sample(c(1,2),3,replace=TRUE) just gives me one "randomly sampled"
combination at a time. How
Jan Wantia wrote:
Dear all,
I have a problem with adding columns to a data structure, using 'cbind':
I create an array, to which I want to cbind one new colum for every
iteration of a loop. Without the loop, the code works and looks like this:
> Min<- array(0,c(129,0))
> Min
[1,]
[2,]
[3,]
The function I need is
valtype<-function(x)
typeof(ifelse(is.factor(x),levels(x),x))
It is easy enough to write.
Are there any other special cases where the values
and the storage mode differ?
The background for all this is that I am transferring data
from R to Excel with VBA and I have to
Dear all,
I have a problem with adding columns to a data structure, using 'cbind':
I create an array, to which I want to cbind one new colum for every
iteration of a loop. Without the loop, the code works and looks like this:
> Min<- array(0,c(129,0))
> Min
[1,]
[2,]
[3,]
[4,]
etc..
> file
[EMAIL PROTECTED] wrote:
Hi all,
I have two questions stated below:
1. How to draw an observation uniformly from a given data?
For example, I have a dataset (or dataframe) with 10 observations (with a
set of variables) and I want to "uniformly" select an observation from this
given dataset, that
On Wed, 8 Sep 2004 [EMAIL PROTECTED] wrote:
> Hi all,
>
> I have two questions stated below:
>
> 1. How to draw an observation uniformly from a given data?
>
> For example, I have a dataset (or dataframe) with 10 observations (with a
> set of variables) and I want to "uniformly" select an observat
Hi all,
I have two questions stated below:
1. How to draw an observation uniformly from a given data?
For example, I have a dataset (or dataframe) with 10 observations (with a
set of variables) and I want to "uniformly" select an observation from this
given dataset, that is, the probability of
On Wed, 8 Sep 2004, Erich Neuwirth wrote:
> typeof applied to a factor always seems to return "integer",
> independently of the type of the levels.
typeof is telling you the internal structure. From ?factor
'factor' returns an object of class '"factor"' which has a set of
integer codes
R/S-plus Course***In Princeton & Boston,***R/Splus Fundamentals
and Programming Techniques, september - October, 2004
XLSolutions Corporation (www.xlsolutions-corp.com) is proud to
announce 2-day "R/S-plus Fundamentals and Programming
Techniques".
Princeton,NJ
In some cases it makes sense to store "character" variables as factors
(integers with labels) since this can take up much less memory. If
you really want to store `v2' as character, just do
data.frame(v1, I(v2))
-roger
Erich Neuwirth wrote:
typeof applied to a factor always seems to return "int
?data.frame says:
Details:
A data frame is a list of variables of the same length with unique
row names, given class '"data.frame"'.
'data.frame' converts each of its arguments to a data frame by
calling 'as.data.frame(optional=TRUE)'. As that is a generic
function, met
typeof applied to a factor always seems to return "integer",
independently of the type of the levels.
This has a strange side effect.
When a variable is "imported" into a data frame,
its type changes.
character variables automatically are converted
to factors when imported into data frames.
Here is
Haven't you sent this before?
d_sign is part of the Fortran runtime support. Since you are running
sunperf, you should not have been building libRlapack at all.
Please don't try to outsmart R, but let it decide what configuration to
try. Once that works, feel free to try to improve it. My gue
You should be able to get the behavior you want using the fit.glh() (short
for fit general linear hypothesis) function from the gregmisc/gmodels
package.
-G
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Fernando Henrique
> Ferraz P. da Rosa
> Sen
I have just installed R 1.9.1 on an old Sun Sparc
with the following specs:
version
Machine hardware: sun4u
OS version: 5.6
Processor type: sparc
Hardware: SUNW,Ultra-4
The following components are installed on your system:
Sun Visual WorkShop C++ 3.0
Sun WorkShop C
Thank you. Quick clarification. isoMDS only works with dissimilarities.
Converting my similarity matrix into the dissimilarity matrix is done as
(from an email I found on the archives)
> d<- max(tt)-tt
Where tt is the similarity matrix. With this, I tried isoMDS as follows:
> tt.mds<-isoMDS(d)
On my computer, it seems that (binary?) packages installed through the
GUI in RAqua are not used available to the command line version of R,
while (source) packages installed with R CMD INSTALL are available to
both. This is a problem when I run R CMD CHECK on a package that I am
creating that dep
Thanks Marta (and Andy). Between the two of you I think I got the result I
was looking for. I ended up doing the following:
heatmap(x, distfun=function(x) as.dist(x))
Thanks again.
> -Original Message-
> From: Marta Rufino [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 08, 2004
Prof Brian Ripley wrote:
Well, we don't know what you are doing! RODBC does work with system DSNs,
but did you try odbcDriverConnect? Let me read the help page for you
odbcDriverConnect("DSN=foo") works, but odbcConnect("foo") fails as
described earlier. Is this as intended?
This seems weird, be
Hi,
I'm looking for pointers/references on calculating den DF's for fixed
effects when using crossed random effects. Also, is there an implementation
of simulate.lme that I could use in lme4?
Thanks,
Elizabeth Lynch
Douglas Bates wrote:
Alexandre Galvão Patriota wrote:
Hi, I'm having some proble
Hi Adele,
The Matlab code at http://www.cs.toronto.edu/~roweis/lle/code/lle.m seems
fairly straightforward to translate to R, so that would be the first thing
I'd try. However, one can obviously use better algorithms for sub-tasks
within that code, e.g., for finding k-NNs.
Best,
Andy
> From: Ad
This worked very well for me:
do.call("[", c(list(a), jj))
What about you?
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin
Sent: Wednesday, September 08, 2004 7:08 AM
To: [EMAIL PROTECTED]
Subject: [R] do.call("[", ...) question
Hi a
Is anyone working on interfacing local linear embedding (Saul and Roweis) to
R?
The only mention I found was in the article "Dimension Reduction for Data
Mapping" (Edwards and Oman) in RNews 3/3.
Adele
__
[EMAIL PROTECTED] mailing list
https://stat.et
I don't understand.
If isoMDS does not work with distances, why does the help for isoMDS
indicate that the "Data are assumed to be dissimilarities or relative
distances" ?
Equally confusing is the loose use of the terms dissimilarities and
distances in the literature. As you point out in your book
Hi!
I observed it also. There are cases where it is not desirable. It will be quite
helpfull, if possible, to have a parameter that allows one to switch of removing the
#comments.
/E
*** REPLY SEPARATOR ***
On 9/6/2004 at 1:30 PM Thomas Petzoldt wrote:
>>>Hello,
>>>
>>>I tr
On Wed, 8 Sep 2004, Hanke, Alex wrote:
> Distances cannot always be constructed from similarities. This can be done
> only if the matrix of similarities is nonnegative definite. With the
> nonnegative definite condition, and with the maximum similarity scaled so
> that s_ii=1, d_ik=(2*(1-s_ik))^-.
Robin Hankin <[EMAIL PROTECTED]> writes:
> Hi again everyone
>
> I have an arbitrarily dimensional array "a" and a list "jj" of length
> length(dim(a)).The elements of jj are vectors of indexes.
>
> How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ?
>
>
> Toy example fo
Distances cannot always be constructed from similarities. This can be done
only if the matrix of similarities is nonnegative definite. With the
nonnegative definite condition, and with the maximum similarity scaled so
that s_ii=1, d_ik=(2*(1-s_ik))^-.5
Check out the vegan package.
Alex
-Origi
Hi Robin,
you could try the following:
lis <- lapply(seq(1, length(dim(a))+1), function(x,a.,jj.) if(x==1) a.
else jj.[[x-1]] ,a.=a, jj.=jj)
do.call("[",lis)
I hope this helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic Universi
Hi again everyone
I have an arbitrarily dimensional array "a" and a list "jj" of length
length(dim(a)).The elements of jj are vectors of indexes.
How do I use do.call() to extract a[ jj[[1]], jj[[2]], jj[[3]], ...] ?
Toy example follows:
a <- matrix(1:30,5,6)
jj <- list(5:1,6:1)
I want the foll
Ich werde ab 09/08/2004 nicht im Büro sein. Ich kehre zurück am
09/27/2004.
Ich werde Ihre Nachricht nach meiner Rückkehr beantworten.
Ursprüngliches Thema: R-help Digest, Vol 19, Issue 8
[[alternative HTML version deleted]]
__
[EMAIL PRO
On Wed, 8 Sep 2004, Doran, Harold wrote:
> 1)Can isoMDS work only with dissimilarities? Or, is there a way
> that it can perform the analysis on the similarity matrix as I have
> described it?
Yes. The method, as well as the function in package MASS. All other
MDS packages are doing a conv
Try setting something like "cex=0.5" in the plot. It works for at least
hclust. Here is a quick example using hclust to show how you can get
away with set the colours.
data(USArrests)
hc <- hclust(dist(USArrests), "ave")
plot(hc, hang=-1, cex=0.5)
labels <- rownames(USArrests)[ hc$order]; n <- le
Hi All,
I am in the middle of doing an analysis of a Case-Cohort design. I had three questions
about the analysis:
a) Does any one know of some public code for developing the patient risk sets (indexed
by failure time) or is there a better way to organize the data?
b) I was planning to use th
Dear List:
I have a question regarding an MDS procedure that I am accustomed to
using. I have searched around the archives a bit and the help doc and
still need a little assistance. The package isoMDS is what I need to
perform the non-metric scaling, but I am working with similarity
matrices, not
Hi all,
We have a genuine requirement for
Statistical Programmer with experience and knowledge of:
. R programming, and
. Oracle data base
This is to work on an a short term project for a research centre in italy.
If anyone would like further information, please feel free to email
On Wed, 8 Sep 2004, Jason Liao wrote:
> Thank you very much, Profs. Ripley and Peng! It corrected a big
> misconception in my mind.
>
> By the way, does the Sun Forte 7 compiler produce faster R than the GCC
> 3.4.1 compiler (which we use)?
Not in my experience, although libsunperf helps a lot
Thank you very much, Profs. Ripley and Peng! It corrected a big
misconception in my mind.
By the way, does the Sun Forte 7 compiler produce faster R than the GCC
3.4.1 compiler (which we use)?
Jason
--- Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
> On Tue, 7 Sep 2004, Roger D. Peng wrote:
>
Dear R-users,
I would like to change the labels size and format in the node ends of a dendrogram,
how can I do it?
How can I use different symbols/colors in each node ends ?
I manage to do it with plot.cluster, but heat map uses plot.dendrogram.
Can anyone help me please?
thank you
Marta
Thanks Rolf and Thomas,
> It looks to me like what you are doing is trying to judge
> significance of differences by non-overlap of single-sample
> confidence intervals. While this is appealing, it's not quite
> right.
Yes, this is what I am trying to do. Apparently, when the replicates are
th
Hello,
I was just doing heatmaps myself ;-) and I had the same problem. It would be
nice to have such an example in the help file because it is not clear (thank
you).
you use (for example... this is my case, which I am doing the distance
matrix using vegdist function with Bray curtis similarity):
On 8 Sep 2004, Peter Dalgaard wrote:
> Kevin Wang <[EMAIL PROTECTED]> writes:
> > On Tue, 7 Sep 2004, Kathy DeRiemer wrote:
> > > I downloaded version 1.9.1 WinZip file, 9.367 bytes (so I can update my R
> >
> > Uit doesn't sound right, 9 bytes
>
> Or 9K ? Still not making sense.
R
Kevin Wang <[EMAIL PROTECTED]> writes:
> Hi,
>
> On Tue, 7 Sep 2004, Kathy DeRiemer wrote:
>
> > Hi there,
> >
> > I downloaded version 1.9.1 WinZip file, 9.367 bytes ( so I can update my R
>
> Uit doesn't sound right, 9 bytes
Or 9K ? Still not making sense. The windows install fil
63 matches
Mail list logo