Re: [R] converting to data frame

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, Murli Nair wrote:

> Is there a method that converts a csv file to a data frame ?

There are R _functions_, if that is what you are asking.  ("method" is 
a technical term in R.)  

Try help.search("csv"), which gives me one entry.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


Re: [R] swiss.x

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, T. Murlidharan Nair wrote:

> Is the swiss data set in R the same as S dataset swiss.x .

If that is meant to be a question, no.

> I was trying out some clustering by doing the following that I got from
> Venables and Ripley's book.

Not from the current edition, p. 317.

> h<-hclus(dist(swiss.x), method= "connected")
> plclust(h)
> cutree(h,3)
> plclust(clorder(h,cutree(h,3)))
> 
> I tried swiss instead of swiss.x, it doesnot seem happy.

If you want to use our book with R, please use the 2002 edition that
covers R. In the MASS package you will find R versions of the scripts for
(one of our books), as documented in the book and the book's website.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


Re: [R] Efficient Cartesian product of data.frames

2004-09-09 Thread Gabor Grothendieck
Timothy W. Victor  dolphin.upenn.edu> writes:

> I am looking for efficient code to produce the Cartesian product of two 
> or more data.frames. 


First create some test data consisting of a list of n=2 data frames.

   data(iris)
   L <- list(iris1 = iris[1:3,1:2], iris2 = iris[1:3,3:4])

Now calculate the cartesian product of the row indices, grid,
and, in the second line, cbind together the corresponding rows:

   grid <- expand.grid(1:nrow(L[[1]]), 1:nrow(L[[2]]))
   cbind(L[[1]][grid[,1],], L[[2]][grid[,2],])

Now generalize that to n >= 2 data frames:

   grid <- do.call("expand.grid", lapply(L, function(x) 1:nrow(x)))
   do.call("cbind", lapply(seq(L), function(i)L[[i]][grid[,i],]))

__
[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


[R] converting to data frame

2004-09-09 Thread Murli Nair
Is there a method that converts a csv file to a data frame ?
M
__
[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


RE: [R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread Adaikalavan Ramasamy
There is another issue to be considered. Currently you need to have the
relevant packages installed before help.search() bring it up. My work
around this is to install all available packages just in case the
function I need is nestled in some non-standard packages. I also update
them rather frequently. This is clearly unattractive to some, especially
busy system administrators.

For some suggestions to this problem, see my posting at
   https://stat.ethz.ch/pipermail/r-devel/2004-June/029763.html

Regards, Adai



On Fri, 2004-09-10 at 02:01, John Fox wrote:
> Dear Bert,
> 
> I believe that you've identified an important issue -- and one that's
> occasionally been discussed on this list previously -- but I'm not sure that
> another email list is a good solution. Some method of indexing functions in
> packages that would allow people to more easily locate them (e.g.,
> author-supplied [i.e., not simply standard] keywords for each public object
> in a package) seems to me a more promising approach.
> 
> Regards,
>  John
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Berton Gunter
> > Sent: Thursday, September 09, 2004 11:50 AM
> > To: [EMAIL PROTECTED]
> > Subject: [R] Proposal for New R List: Criticism? Comments?
> > 
> > Folks:
> >  
> > I would like to propose a new R list, tentatively labeled 
> > r-contents. I wish to briefly explain the purpose and format 
> > here and solicit public comments, pro or con, so feel free to 
> > criticize or suggest a better name and other improvements or 
> > alternatives.
> >  
> > R presently consists of a suite of about a dozen core 
> > recommended packages and several hundred contributed packages 
> > comprising thousands -- perhaps tens of thousands -- of 
> > functions. Hopefully, this will continue to grow rapidly. No 
> > one can possibly keep track of all of this, and it is 
> > therefore a daunting task for someone seeking specific 
> > functionality to find it, especially when they are relatively 
> > new to R. 
> >  
> > Of course, R and CRAN (and Google and ...)  have various 
> > search capabilities that help, but these are essentially 
> > keyword-based and so require the searcher to guess search 
> > terms that are at least reasonably close to function names 
> > and keywords. A lot of the time this works, but it can be 
> > tedious; some of the time one guesses wrong, and it doesn't work.
> >  
> > S-Plus and much other software addresses this by providing a 
> > semantically-based Contents Index (or something like it) in 
> > their Help functionality. I find this quite useful, but 
> > creating and maintaining such an index seems to me to be 
> > extremely labor intensive, fraught with its own issues (what 
> > heading should I look under?), and, I think, not a good fit 
> > to the spirit and dynamics of R anyway.
> >  
> > Not surprisingly, as a result, many of the questions 
> > addressed to r-help are of the form: "I want to do such and 
> > such. How do I do it?" While this certainly gives answers, I 
> > think the breadth of r-help and its etiquette and posting 
> > conventions result in an abruptness to many of our replies 
> > ("Read the posting guide! Read the Help files and do what 
> > they say!") that discourages many users -- especially casual 
> > ones -- from posting questions, and thus may thus discourage 
> > use of R. Clearly, if true, this is not a good thing; on the 
> > other hand, I think that given r-help's purpose and 
> > practices, many of these abrupt replies may well be 
> > appropriate (I'm a curmudgeon at heart!).
> >  
> > Hence, there is a mismatch between user needs and r-help 
> > services. To address this mismatch, I would like to propose a 
> > new list, r-contents, to essentially serve the same purpose 
> > as the S-Plus Contents index. Hence, it would serve as a 
> > place for users to post queries ** only ** of the form: "I 
> > want to do such and such. How do I do it?" and receive 
> > answers that would all be **single phrases ** of the form 
> > "package suchandsuch" or "?suchandsuchfunction." No further 
> > explanations regarding usage would be provided, though users 
> > would be free to follow up answers with private questions to 
> > the responder, although there should be no expectation of any 
> > response. Queries could be framed with as much or as little 
> > supporting detail as desired, with the obvious consequence 
> > that a more clearly framed question would be more likely to 
> > get a (better) response. No other posting conventions (aside 
> > from the usual ones regarding civility and adherence to
> > topic) would be expected.
> >  
> > My hope is that such a list would both reduce unnecessary 
> > traffic on r-help and satisfy a genuine need in a less 
> > threatening way. I can certainly see downsides (I often learn 
> > a lot from "How can I do this?" queries), but I think, on 
> > balance, this approach might be useful. So I would l

Re: [R] R conversion

2004-09-09 Thread Mark Strivens
Thanks John for the post - I had found factanal
However factanal it seems you have specify the number of factors to be
fitted
up front, whereas with the SAS procedure you don't - this is apparently
important
to the analysis!

Perhaps I could emulate this function by breaking it down using factor
extraction by principal component analysis and the doing the varimax
rotation second? If that makes
any sense?

__
[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


RE: [R] RDA file

2004-09-09 Thread Liaw, Andy
See ?save and ?load.

Andy

> From: T. Murlidharan Nair
> 
> What is an RDA file ? I was trying to work through a turorial 
> on cluster 
> analysis using R and bioconductor.
> The data files in the library are stored as RDA files. Its 
> part of the 
> golubEsets library.  
> Cheers ../Murli
> 
> __
> [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
> 
>

__
[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


RE: [R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread John Fox
Dear Bert,

I believe that you've identified an important issue -- and one that's
occasionally been discussed on this list previously -- but I'm not sure that
another email list is a good solution. Some method of indexing functions in
packages that would allow people to more easily locate them (e.g.,
author-supplied [i.e., not simply standard] keywords for each public object
in a package) seems to me a more promising approach.

Regards,
 John

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Berton Gunter
> Sent: Thursday, September 09, 2004 11:50 AM
> To: [EMAIL PROTECTED]
> Subject: [R] Proposal for New R List: Criticism? Comments?
> 
> Folks:
>  
> I would like to propose a new R list, tentatively labeled 
> r-contents. I wish to briefly explain the purpose and format 
> here and solicit public comments, pro or con, so feel free to 
> criticize or suggest a better name and other improvements or 
> alternatives.
>  
> R presently consists of a suite of about a dozen core 
> recommended packages and several hundred contributed packages 
> comprising thousands -- perhaps tens of thousands -- of 
> functions. Hopefully, this will continue to grow rapidly. No 
> one can possibly keep track of all of this, and it is 
> therefore a daunting task for someone seeking specific 
> functionality to find it, especially when they are relatively 
> new to R. 
>  
> Of course, R and CRAN (and Google and ...)  have various 
> search capabilities that help, but these are essentially 
> keyword-based and so require the searcher to guess search 
> terms that are at least reasonably close to function names 
> and keywords. A lot of the time this works, but it can be 
> tedious; some of the time one guesses wrong, and it doesn't work.
>  
> S-Plus and much other software addresses this by providing a 
> semantically-based Contents Index (or something like it) in 
> their Help functionality. I find this quite useful, but 
> creating and maintaining such an index seems to me to be 
> extremely labor intensive, fraught with its own issues (what 
> heading should I look under?), and, I think, not a good fit 
> to the spirit and dynamics of R anyway.
>  
> Not surprisingly, as a result, many of the questions 
> addressed to r-help are of the form: "I want to do such and 
> such. How do I do it?" While this certainly gives answers, I 
> think the breadth of r-help and its etiquette and posting 
> conventions result in an abruptness to many of our replies 
> ("Read the posting guide! Read the Help files and do what 
> they say!") that discourages many users -- especially casual 
> ones -- from posting questions, and thus may thus discourage 
> use of R. Clearly, if true, this is not a good thing; on the 
> other hand, I think that given r-help's purpose and 
> practices, many of these abrupt replies may well be 
> appropriate (I'm a curmudgeon at heart!).
>  
> Hence, there is a mismatch between user needs and r-help 
> services. To address this mismatch, I would like to propose a 
> new list, r-contents, to essentially serve the same purpose 
> as the S-Plus Contents index. Hence, it would serve as a 
> place for users to post queries ** only ** of the form: "I 
> want to do such and such. How do I do it?" and receive 
> answers that would all be **single phrases ** of the form 
> "package suchandsuch" or "?suchandsuchfunction." No further 
> explanations regarding usage would be provided, though users 
> would be free to follow up answers with private questions to 
> the responder, although there should be no expectation of any 
> response. Queries could be framed with as much or as little 
> supporting detail as desired, with the obvious consequence 
> that a more clearly framed question would be more likely to 
> get a (better) response. No other posting conventions (aside 
> from the usual ones regarding civility and adherence to
> topic) would be expected.
>  
> My hope is that such a list would both reduce unnecessary 
> traffic on r-help and satisfy a genuine need in a less 
> threatening way. I can certainly see downsides (I often learn 
> a lot from "How can I do this?" queries), but I think, on 
> balance, this approach might be useful. So I would like to 
> subject the idea to public scrutiny and criticism, as well as 
> the opportunity for improvement from suggested modifications 
> or alternatives. If it's useful, this will be recognized; if 
> it's not and/or no one is interested, that, too, will be made 
> manifest. I would be especially grateful for the opinions of 
> casual users or newbies, either publicly or privately.
>  
> Cheers,
>  
> -- Bert Gunter
> Genentech Non-Clinical Statistics
> South San Francisco, CA
>

__
[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


RE: [R] R conversion

2004-09-09 Thread John Fox
Dear Mark,

See ?factanal for a factor-analysis function, in the standard stats package
(though factanal does ML factor analysis and not principal axes). Note that
help.search("factor analysis") turns this up.

With respect to your last question, it's not possible to know the source of
the difference without knowing what the difference is. A guess is that
specifying proportion=0.9 in SAS causes the program to use communality
estimates rather than 1's on the diagonal of the correlation matrix.

I hope this helps,
 John

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark Strivens
> Sent: Thursday, September 09, 2004 7:26 PM
> To: [EMAIL PROTECTED]
> Subject: [R] R conversion
> 
> I am a newcomer to R trying to convert a SAS program to R.
> Does anyone know if there is a functional equivalent of the 
> SAS 'Factor' procedure?
> 
> For example in SAS:
> 
> proc factor DATA=cor method=principal rotate=varimax 
> proportion=0.9 scree
> 
> where 'cor' is a correlation matrix (as in the R 'cor' function)
> 
> This should get you a list of eigen values as well as a 
> factor pattern matrix.
> 
> Also why when I use the 'eigen' function in R does it seem to 
> give a subtly different answer to the eigen values generated 
> by the above program?
> 
> Many thanks for any help
> 
> Mark Strivens

__
[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


[R] Efficient Cartesian product of data.frames

2004-09-09 Thread Timothy W. Victor
Hello List,
I am looking for efficient code to produce the Cartesian product of two 
or more data.frames. I'd like to be able to do this without resorting to 
looping. I have searched the FAQ, web, etc without luck. That being 
said, the help page for merge says that the function can produce what 
I'm looking for if the by vectors are of zero length. Would someone be 
so kind as to provide me with a quick example of exactly how to do this?

Cheers,
Tim Victor
__
[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


[R] R conversion

2004-09-09 Thread Mark Strivens
I am a newcomer to R trying to convert a SAS program to R.
Does anyone know if there is a functional equivalent of the SAS 
'Factor' procedure?

For example in SAS:

proc factor DATA=cor method=principal rotate=varimax proportion=0.9 scree

where 'cor' is a correlation matrix (as in the R 'cor' function)

This should get you a list of eigen values as well as a factor
pattern matrix.

Also why when I use the 'eigen' function in R does it seem to give
a subtly different answer to the eigen values generated by the above
program?

Many thanks for any help

Mark Strivens
---
Dept. Molecular and Human Genetics
Baylor College of Medicine
Houston, USA
[EMAIL PROTECTED]
[[alternative HTML version deleted]]

__
[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


[R] swiss.x

2004-09-09 Thread T. Murlidharan Nair
Is the swiss data set in R the same as S dataset swiss.x .
I was trying out some clustering by doing the following that I got from
Venables and Ripley's book.
h<-hclus(dist(swiss.x), method= "connected")
plclust(h)
cutree(h,3)
plclust(clorder(h,cutree(h,3)))
I tried swiss instead of swiss.x, it doesnot seem happy.
Thanks ../Murli
__
[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


[R] RDA file

2004-09-09 Thread T. Murlidharan Nair
What is an RDA file ? I was trying to work through a turorial on cluster 
analysis using R and bioconductor.
The data files in the library are stored as RDA files. Its part of the 
golubEsets library.  
Cheers ../Murli

__
[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


RE: [R] Dyn.load of sharing object with GSL library

2004-09-09 Thread Liaw, Andy
As Prof. Ripley said, twice already: seek local expert help.  If you don't
know who that is, start with the person that setup your user account on that
machine.  Such system-specific problem is much easier to resolve that way,
instead of having others on the list guessing.

Andy

> From: Vicky Landsman
> 
> Dear Prof. Ripley,
> The GSL reference book explains that lm should be added as 
> well (as far as I
> understand, and this is what I saw when I run the file in C 
> in a standard
> way). No matter, with lm and without, I get the same picture.
> Here is what I get after R CMD SHLIB Example3.c
> 
> make: Warning: File `Makevars' has modification time 3.4e+03 
> s in the future
> gcc -I/usr/local/sbin/R-1.9/R-1.9.1/include  
> -I/usr/local/include   -fPIC  -
> g -O2 -c Example3.c -o Example3.o
> gcc -G -L/usr/local/lib -o Example3.so Example3.o
> -L/usr/local/lib/ -lgsl  -L/usr/local/lib/ -lgslcblas"
> make: warning:  Clock skew detected.  Your build may be incomplete.
> 
> Running ldd line as you stated, I get the following:
> libc.so.1 => /usr/lib/libc.so.1
> libdl.so.1 =>/usr/lib/libdl.so.1
> /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
> 
> Sorry for my ignorance in UNIX, where should I run the line
> export LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}:/usr/local/lib ?
> 
> Vicky.
> 
> 
> > On Thu, 9 Sep 2004, Vicky Landsman wrote:
> >
> > > Following the recommendation of Prof. Ripley, I have created the
> Makevars
> > > file with the line:
> > >
> PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl 
> -L/usr/local/lib
> > > /libgslcblas -lgslcblas"
> > > in the working directory.
> >
> > No, that's not what I recommended. -L/path/to/libgsl would 
> probably be
> > -L/usr/local/lib if libgsl is in /usr/local/lib.  And why 
> do you want -lm?
> >
> > Please consult your unstated OS's documentation for ld.
> >
> > > Now I have the code file Example3.c which computes the 
> Bessel function
> value
> > > (the example is taken from the GSL reference book).
> > > I am running:
> > > R CMD SHLIB Example3.c
> >
> 
> 
> > > and all looks good.
> > > The dyn.load("Example3.so") fails with the following 
> error message:
> > >
> > > Error in dyn.load(x, as.logical(local), as.logical(now)) :
> > > unable to load shared library
> > > "/fs/users1/guest/msvika/PhD/R_04/Example3.so":
> > >   ld.so.1: /usr/local/sbin/R-1.9/R-1.9.1/bin/R.bin: 
> fatal: relocation
> error:
> > > file /fs/users1/guest/msvika/PhD/R_04/Example3.so: symbol
> gsl_sf_bessel_J0:
> > > referenced symbol not found
> >
> > Try ldd /fs/users1/guest/msvika/PhD/R_04/Example3.so and get a local
> > expert to interpret it for you.
> >
> > You will need anything you had in -L in PKG_LIBS in your 
> library run path
> > as well.  You may need e.g.
> >
> > export LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}:/usr/local/lib
> >
> > and please check with a local expert about this.
> >
> > > What is wrong?
> > > Much thanks, Vicky.
> > >
> > > - Original Message - 
> > > From: "Vicky Landsman" <[EMAIL PROTECTED]>
> > > To: "r-help" <[EMAIL PROTECTED]>
> > > Sent: Thursday, September 09, 2004 6:18 PM
> > > Subject: Re: [R] Adding GSL library path to SHLIB
> > >
> > >
> > > > Dear Prof. Ripley,
> > > > We read the archive thread
> > > > http://maths.newcastle.edu.au/~rking/R/help/02b/0547.html
> > > > Thank you for your help, we will try to create the 
> Makevars file.
> > > > Vicky.
> > > >
> > > >
> > > >
> > > > - Original Message - 
> > > > From: "Prof Brian Ripley" <[EMAIL PROTECTED]>
> > > > To: "Vicky Landsman" <[EMAIL PROTECTED]>
> > > > Cc: "r-help" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > > Sent: Thursday, September 09, 2004 3:17 PM
> > > > Subject: Re: [R] Adding GSL library path to SHLIB
> > > >
> > > >
> > > > > On Thu, 9 Sep 2004, Vicky Landsman wrote:
> > > > >
> > > > > > Dear R-list people,
> > > > >
> > > > > > I asked a similar question a few hours before. I 
> will try to be
> more
> > > > > > specific.  We like to add the GSL library to the 
> file SHLIB in
> order
> > > to
> > > > > > make it possible to run the C code using GSL 
> functions from R.  We
> > > read
> > > > >
> > > > > Read where?  It's incorrect information and only used 
> for Fortran
> > > linking.
> > > > >
> > > > > > that the path to the libgsl.a should be added to the line
> > > shlib_libadd='
> > > > > > ' in the file SHLIB but it does not work on our 
> system. Dyn.load
> fails
> > > > > > with error "referenced symbol  not 
> found". What is
> wrong?
> > > > > > We will much appreciate any help on this.
> > > > > >
> > > > > > We are using R-1.9.1 on Unix.
> > > > >
> > > > > You should have a file called Makevars in the 
> directory from which
> > > > > you are doing the building, defining PKG_LIBS, maybe
> > > > >
> > > > > PKG_LIBS="-L/path/to/libgsl -lgsl"
> > > > >
> > > > > in the same way as you would for a package: see `Writing R
> Extensions'.
> > > > > I don't think that is documented anywere, th

Re: [R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread Jim Lemon
The number of help requests that could be answered by either:

1) A full text search of package INDEX files

or

2) A full text search of package documentation files

is certainly large. Professor Baron's search engine does this very well. Some 
time ago, I wrote a Tck-Tk program to perform this sort of search, so that I 
could enter any word and get a list of all files in the R documentation that 
contained that word. In general, it is about as comprehensive as the UPenn 
search engine. However, neither of these are on the CRAN site. It does not 
seem difficult to program such a search on CRAN, so that someone seeking a 
package dealing with, say, "goodness of fit" could enter it and have an HTML 
page served with a list of links to documentation files that contain that 
phrase. A lot easier than working one's way through the 350+ packages listed 
or attempting to divine what each package contains from their often whimsical 
names.

Yes, I would be happy to have a try.

Jim

__
[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


[R] Rslides.sty

2004-09-09 Thread Doran, Harold
I recently came across Rslides.sty during a web search and was not aware
of it. However, I can't seem to get it to actually work (I use miktex
and the texniccenter distribution for Windows). 

 

Does anyone have a sample tex file with this style to share? Second, I
looked around the R web site to see if other .sty files existed, but was
unsuccessful. Does anyone know if there is in fact a location with .sty
files specific for R type things online?

 

Thanks,

Harold 


[[alternative HTML version deleted]]

__
[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


[R] How to plot the estimated age-specific cumulative risk function?

2004-09-09 Thread wanr
The hypothetical data is displayed as follows.

ID   Age1   cens1 Age2cens2
1 81   0   85 1
2 42   1   48 0
3 37   1   55 0
4 54   0   56 0
5 35   0   37 0
6 38   0   38 1
7 29   0   30 0
8 40   0   40 1

where Age1 is the event time for a disease;
cens1 is the censor variable for the disease (1=hold the disease);
Age2 is the event time for death (in years);
cens2 is the censor variable for death (1=died).

First, I might use surv.obj <- survfit(); then I could get estimated 
cumulative risk function (cdf) by 1 - surv.obj$surv. 

However, it is tedious to plot this cdf in usual way. My question is whether 
there exit some specific functions to plot this cdf easily and whether I can 
set the horizontal axis as individul's age.

I am a beginner in survival analysis and I might not state my questions 
clear enough. Thanks for your understanding and help in advance.

Rui

__
[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


Re: [R] Blom's approximation to rankits?

2004-09-09 Thread Bob Wheeler
You need not use Blom's approximations. Exact values to several decimal 
places are given by normOrder() in SuppDists.

Lisa Wang wrote:
Hello,
My name is Lisa and I'm a statistician at Princess Margare Hospital. I
wonder if there is any function in R that calculate the Normal rankits
based on Blom's approximation?
Thank you very much
Lisa Wang Msc.
Princess Margaret hospital
Toronto, Ca
__
[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

--
Bob Wheeler --- http://www.bobwheeler.com/
ECHIP, Inc. ---
Randomness comes in bunches.
__
[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


Re: [R] GEE model

2004-09-09 Thread Wolski
Hi!

There is a package
geepack
on cran which my gues does what you ask for.

If you have a fast internet connection install all packages
under linux
install.packages(CRAN.packages()[,1])
to installs all of them

Under windows you can use the menu Packages.
And then you can use
help.search("GEE")

/E


*** REPLY SEPARATOR  ***

On 9/9/2004 at 3:31 PM Lisa Wang wrote:

>>>Hello there,
>>>
>>>
>>>My name is Lisa and I'm doing analysis using genelized linear model-GEE
>>>model because I have some repeated measurements on the same patients (in
>>>a bilateral eye disease case). It would be very appreciated if you could
>>>shed some light on what function to use in R.
>>>
>>>Thank you very much
>>>
>>>Lisa Wang Msc.
>>>
>>>Toronto,Ca
>>>
>>>__
>>>[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



Dipl. bio-chem. Witold Eryk Wolski @ MPI-Moleculare Genetic   
Ihnestrasse 63-73 14195 Berlin'v'
tel: 0049-30-83875219/   \   
mail: [EMAIL PROTECTED]---W-Whttp://www.molgen.mpg.de/~wolski 
  [EMAIL PROTECTED]

__
[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


[R] GEE model

2004-09-09 Thread Lisa Wang
Hello there,


My name is Lisa and I'm doing analysis using genelized linear model-GEE
model because I have some repeated measurements on the same patients (in
a bilateral eye disease case). It would be very appreciated if you could
shed some light on what function to use in R.

Thank you very much

Lisa Wang Msc.

Toronto,Ca

__
[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


Re: [R] Confused about loading other packages from a package

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, hadley wickham wrote:

> Unfortunately, marrayClasses doesn't seem to have a namespace:
> 
> > library(maVis)
> Error in loadNamespace(imp[[1]], c(lib.loc, .libPaths()), keep.source) : 
> package 'marrayClasses' does not have a name space
> Error in library(maVis) : package/namespace load failed
> 
> Any other ideas?

Roger's other one is the best one: use pre-2.0.0 and have 
Depends: marrayClasses in your DESCRIPTION file.

Having require(marrayClasses) in install.R in your package may work, 
although you may need it in R_PROFILE.R as well.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


[R] Blom's approximation to rankits?

2004-09-09 Thread Lisa Wang
Hello,

My name is Lisa and I'm a statistician at Princess Margare Hospital. I
wonder if there is any function in R that calculate the Normal rankits
based on Blom's approximation?

Thank you very much

Lisa Wang Msc.
Princess Margaret hospital
Toronto, Ca

__
[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


Re: [R] Confused about loading other packages from a package

2004-09-09 Thread hadley wickham
Unfortunately, marrayClasses doesn't seem to have a namespace:

> library(maVis)
Error in loadNamespace(imp[[1]], c(lib.loc, .libPaths()), keep.source) : 
package 'marrayClasses' does not have a name space
Error in library(maVis) : package/namespace load failed

Any other ideas?

Hadley

__
[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


Re: [R] R/S-plus Course***In Princeton & Boston, ***R/Splus Fundamentals and Programming Techniques, september - October, 2004

2004-09-09 Thread Spencer Graves

[EMAIL PROTECTED] wrote:
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  September 30th - October
1st
Boston, MA    October 14th-15th
Reserve your seat now at the early bird rates! Payment due AFTER 
the class.

Course Description:
This two-day beginner to intermediate R/S-plus course focuses on a 
broad spectrum of topics, from reading raw data to a comparison of R 
and S. We will learn the essentials of data manipulation, graphical 
visualization and R/S-plus programming. We will explore statistical 
data analysis tools,including graphics with data sets. How to enhance 
your plots. We will perform basic statistics and fit linear regression

models. Participants are encouraged to bring data for interactive 
sessions

With the following outline:
- An Overview of R and S
- Data Manipulation and Graphics
- Using Lattice Graphics
- A Comparison of R and S-Plus
- How can R Complement SAS?
- Writing Functions
- Avoiding Loops
- Vectorization
- Statistical Modeling
- Project Management
- Techniques for Effective use of R and S
- Enhancing Plots
- Using High-level Plotting Functions
- Building and Distributing Packages (libraries)
Email us for group discounts.
Email Sue Turner: [EMAIL PROTECTED]
Phone: 206-686-1578
Visit us: www.xlsolutions-corp.com/training.htm
Please let us know if you and your colleagues are interested in this 
classto take advantage of group discount. Register now to secure your 
seat! Interested in R/Splus Advanced course? email us.

Cheers,
Elvis Miller, PhD
Manager Training.
XLSolutions Corporation
206 686 1578
www.xlsolutions-corp.com
[EMAIL PROTECTED]
__
[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
 

--
Spencer Graves, PhD, Senior Development Engineer
O:  (408)938-4420;  mobile:  (408)655-4567
__
[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


Re: [R] Dyn.load of sharing object with GSL library

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, Vicky Landsman wrote:

> Dear Prof. Ripley,
> The GSL reference book explains that lm should be added as well (as far as I
> understand, and this is what I saw when I run the file in C in a standard
> way). No matter, with lm and without, I get the same picture.
> Here is what I get after R CMD SHLIB Example3.c
> 
> make: Warning: File `Makevars' has modification time 3.4e+03 s in the future
> gcc -I/usr/local/sbin/R-1.9/R-1.9.1/include  -I/usr/local/include   -fPIC  -
> g -O2 -c Example3.c -o Example3.o
> gcc -G -L/usr/local/lib -o Example3.so Example3.o
> -L/usr/local/lib/ -lgsl  -L/usr/local/lib/ -lgslcblas"
> make: warning:  Clock skew detected.  Your build may be incomplete.
> 
> Running ldd line as you stated, I get the following:
> libc.so.1 => /usr/lib/libc.so.1
> libdl.so.1 =>/usr/lib/libdl.so.1
> /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1

Looks OK, and no reference to lm.

> Sorry for my ignorance in UNIX, where should I run the line
> export LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}:/usr/local/lib ?

As I asked, ask a local expert.

> 
> Vicky.
> 
> 
> > On Thu, 9 Sep 2004, Vicky Landsman wrote:
> >
> > > Following the recommendation of Prof. Ripley, I have created the
> Makevars
> > > file with the line:
> > >
> PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl -L/usr/local/lib
> > > /libgslcblas -lgslcblas"
> > > in the working directory.
> >
> > No, that's not what I recommended. -L/path/to/libgsl would probably be
> > -L/usr/local/lib if libgsl is in /usr/local/lib.  And why do you want -lm?
> >
> > Please consult your unstated OS's documentation for ld.
> >
> > > Now I have the code file Example3.c which computes the Bessel function
> value
> > > (the example is taken from the GSL reference book).
> > > I am running:
> > > R CMD SHLIB Example3.c
> >
> 
> 
> > > and all looks good.
> > > The dyn.load("Example3.so") fails with the following error message:
> > >
> > > Error in dyn.load(x, as.logical(local), as.logical(now)) :
> > > unable to load shared library
> > > "/fs/users1/guest/msvika/PhD/R_04/Example3.so":
> > >   ld.so.1: /usr/local/sbin/R-1.9/R-1.9.1/bin/R.bin: fatal: relocation
> error:
> > > file /fs/users1/guest/msvika/PhD/R_04/Example3.so: symbol
> gsl_sf_bessel_J0:
> > > referenced symbol not found
> >
> > Try ldd /fs/users1/guest/msvika/PhD/R_04/Example3.so and get a local
> > expert to interpret it for you.
> >
> > You will need anything you had in -L in PKG_LIBS in your library run path
> > as well.  You may need e.g.
> >
> > export LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}:/usr/local/lib
> >
> > and please check with a local expert about this.
> >
> > > What is wrong?
> > > Much thanks, Vicky.
> > >
> > > - Original Message - 
> > > From: "Vicky Landsman" <[EMAIL PROTECTED]>
> > > To: "r-help" <[EMAIL PROTECTED]>
> > > Sent: Thursday, September 09, 2004 6:18 PM
> > > Subject: Re: [R] Adding GSL library path to SHLIB
> > >
> > >
> > > > Dear Prof. Ripley,
> > > > We read the archive thread
> > > > http://maths.newcastle.edu.au/~rking/R/help/02b/0547.html
> > > > Thank you for your help, we will try to create the Makevars file.
> > > > Vicky.
> > > >
> > > >
> > > >
> > > > - Original Message - 
> > > > From: "Prof Brian Ripley" <[EMAIL PROTECTED]>
> > > > To: "Vicky Landsman" <[EMAIL PROTECTED]>
> > > > Cc: "r-help" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > > Sent: Thursday, September 09, 2004 3:17 PM
> > > > Subject: Re: [R] Adding GSL library path to SHLIB
> > > >
> > > >
> > > > > On Thu, 9 Sep 2004, Vicky Landsman wrote:
> > > > >
> > > > > > Dear R-list people,
> > > > >
> > > > > > I asked a similar question a few hours before. I will try to be
> more
> > > > > > specific.  We like to add the GSL library to the file SHLIB in
> order
> > > to
> > > > > > make it possible to run the C code using GSL functions from R.  We
> > > read
> > > > >
> > > > > Read where?  It's incorrect information and only used for Fortran
> > > linking.
> > > > >
> > > > > > that the path to the libgsl.a should be added to the line
> > > shlib_libadd='
> > > > > > ' in the file SHLIB but it does not work on our system. Dyn.load
> fails
> > > > > > with error "referenced symbol  not found". What is
> wrong?
> > > > > > We will much appreciate any help on this.
> > > > > >
> > > > > > We are using R-1.9.1 on Unix.
> > > > >
> > > > > You should have a file called Makevars in the directory from which
> > > > > you are doing the building, defining PKG_LIBS, maybe
> > > > >
> > > > > PKG_LIBS="-L/path/to/libgsl -lgsl"
> > > > >
> > > > > in the same way as you would for a package: see `Writing R
> Extensions'.
> > > > > I don't think that is documented anywere, though.
> > > > >
> > > > > -- 
> > > > > Brian D. Ripley,  [EMAIL PROTECTED]
> > > > > Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> > > > > University of Oxford, Tel:  +44 1865 272861 (self)
> > > > > 

Re: [R] scoping rules

2004-09-09 Thread Duncan Murdoch
On Thu, 9 Sep 2004 12:01:56 -0400 , Whit Armstrong
<[EMAIL PROTECTED]> wrote :

>Can someone help me with this simple example?
>
>sq <- function() {
>   y <- x^2
>   y
>}
>
>myfunc <- function() {
>   x <- 10
>   sq()
>}
>
>myfunc()
>
>
>executing the above in R yields:
>> myfunc()
>Error in sq() : Object "x" not found
>
>I understand that R's scoping rules cause it to look for "x" in the
>environment in which "sq" was defined (the global environment in this case).
>But in this case "x" is defined inside the calling function, not the
>environment in which "sq" was defined.
>
>Is there a way to tell R to look in the calling function for "x" ?

The easiest (and best) is to pass x as an argument to sq.

Duncan Murdoch

__
[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


Re: [R] Confused about loading other packages from a package

2004-09-09 Thread Roger D. Peng
In R 2.0.0-to-be I think putting marray in the Depends: field will 
solve your problem.  Otherwise, you might want to import the 
"marrayNorm" class in your NAMESPACE file.

-roger
hadley wickham wrote:
In my package, I create a new method for plot with the following signature:
setMethod("plot", signature(x="marrayNorm", y="formula"), plot.ma)
where marrayNorm is a class defined in the marray package.   After
building and installing my package, I get the following warnings when
I load my package (with library(maVis)):
Warning messages: 
1: In the method signature for function "plot", class "marrayRaw" has
no current definition in: matchSignature(signature, fdef, where)
2: In the method signature for function "plot", class "marrayRaw" has
no current definition in: matchSignature(signature, fdef, where)

(but everything appears to work ok regardless).  I have tried
require(marray) both inside and outside of the .onLoad method.
I presume this is a caused by some difference in require depending on
whether or not it is within a package or not, as simply source()ing
the code gives no errors.  What should I do?  Ignore the warnings (or
turn them off somehow?) or use a different method of loading marray?
I'm also a bit confused about what is best practice for calling
methods in other packages - use namespace:::, use require, use
library, use the depends field in DESCRIPTION, so any advice here
would also be appreciated.
Thanks for you help,
Hadley
__
[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
__
[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


Re: [R] Dyn.load of sharing object with GSL library

2004-09-09 Thread Paul Roebuck
On Thu, 9 Sep 2004, Vicky Landsman wrote:

> Following the recommendation of Prof. Ripley, I have created the Makevars
> file with the line:
> PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl -L/usr/local/lib
> /libgslcblas -lgslcblas"
> in the working directory.

That should probably look like this instead:

  PKG_LIBS="-L/usr/local/lib -lgsl -lgslcblas -lm"

The math library (-lm) should not be necessary here but I left it in
case it's needed by your [unspecified] OS for some reason.

> Now I have the code file Example3.c which computes the Bessel function value
> (the example is taken from the GSL reference book).
> I am running:
> R CMD SHLIB Example3.c
> and all looks good.

Shared library linkage often allows symbols to remain undefined
until runtime by design. As such, there would be no error message.

> The dyn.load("Example3.so") fails with the following error message:
>
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library
> "/fs/users1/guest/msvika/PhD/R_04/Example3.so":
>   ld.so.1: /usr/local/sbin/R-1.9/R-1.9.1/bin/R.bin: fatal: relocation error:
> file /fs/users1/guest/msvika/PhD/R_04/Example3.so: symbol gsl_sf_bessel_J0:
> referenced symbol not found

You may need the following environment variable set prior to
running R. It would be best added to your .profile.

  $ export LD_LIBRARY_PATH=$HOME/lib:/usr/local/lib:/usr/dt/lib:/usr/lib

And why in the world is your R installation located in a
directory for system binaries? Perhaps it would be better
located as '/usr/local/R-1.9.1' or '/opt/R-1.9.1' instead.


--
SIGSIG -- signature too long (core dumped)

__
[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


[R] Confused about loading other packages from a package

2004-09-09 Thread hadley wickham
In my package, I create a new method for plot with the following signature:

setMethod("plot", signature(x="marrayNorm", y="formula"), plot.ma)

where marrayNorm is a class defined in the marray package.   After
building and installing my package, I get the following warnings when
I load my package (with library(maVis)):

Warning messages: 
1: In the method signature for function "plot", class "marrayRaw" has
no current definition in: matchSignature(signature, fdef, where)
2: In the method signature for function "plot", class "marrayRaw" has
no current definition in: matchSignature(signature, fdef, where)

(but everything appears to work ok regardless).  I have tried
require(marray) both inside and outside of the .onLoad method.

I presume this is a caused by some difference in require depending on
whether or not it is within a package or not, as simply source()ing
the code gives no errors.  What should I do?  Ignore the warnings (or
turn them off somehow?) or use a different method of loading marray?
I'm also a bit confused about what is best practice for calling
methods in other packages - use namespace:::, use require, use
library, use the depends field in DESCRIPTION, so any advice here
would also be appreciated.

Thanks for you help,

Hadley

__
[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


Re: [R] Dyn.load of sharing object with GSL library

2004-09-09 Thread Vicky Landsman
Dear Prof. Ripley,
The GSL reference book explains that lm should be added as well (as far as I
understand, and this is what I saw when I run the file in C in a standard
way). No matter, with lm and without, I get the same picture.
Here is what I get after R CMD SHLIB Example3.c

make: Warning: File `Makevars' has modification time 3.4e+03 s in the future
gcc -I/usr/local/sbin/R-1.9/R-1.9.1/include  -I/usr/local/include   -fPIC  -
g -O2 -c Example3.c -o Example3.o
gcc -G -L/usr/local/lib -o Example3.so Example3.o
-L/usr/local/lib/ -lgsl  -L/usr/local/lib/ -lgslcblas"
make: warning:  Clock skew detected.  Your build may be incomplete.

Running ldd line as you stated, I get the following:
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 =>/usr/lib/libdl.so.1
/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1

Sorry for my ignorance in UNIX, where should I run the line
export LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}:/usr/local/lib ?

Vicky.


> On Thu, 9 Sep 2004, Vicky Landsman wrote:
>
> > Following the recommendation of Prof. Ripley, I have created the
Makevars
> > file with the line:
> >
PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl -L/usr/local/lib
> > /libgslcblas -lgslcblas"
> > in the working directory.
>
> No, that's not what I recommended. -L/path/to/libgsl would probably be
> -L/usr/local/lib if libgsl is in /usr/local/lib.  And why do you want -lm?
>
> Please consult your unstated OS's documentation for ld.
>
> > Now I have the code file Example3.c which computes the Bessel function
value
> > (the example is taken from the GSL reference book).
> > I am running:
> > R CMD SHLIB Example3.c
>


> > and all looks good.
> > The dyn.load("Example3.so") fails with the following error message:
> >
> > Error in dyn.load(x, as.logical(local), as.logical(now)) :
> > unable to load shared library
> > "/fs/users1/guest/msvika/PhD/R_04/Example3.so":
> >   ld.so.1: /usr/local/sbin/R-1.9/R-1.9.1/bin/R.bin: fatal: relocation
error:
> > file /fs/users1/guest/msvika/PhD/R_04/Example3.so: symbol
gsl_sf_bessel_J0:
> > referenced symbol not found
>
> Try ldd /fs/users1/guest/msvika/PhD/R_04/Example3.so and get a local
> expert to interpret it for you.
>
> You will need anything you had in -L in PKG_LIBS in your library run path
> as well.  You may need e.g.
>
> export LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}:/usr/local/lib
>
> and please check with a local expert about this.
>
> > What is wrong?
> > Much thanks, Vicky.
> >
> > - Original Message - 
> > From: "Vicky Landsman" <[EMAIL PROTECTED]>
> > To: "r-help" <[EMAIL PROTECTED]>
> > Sent: Thursday, September 09, 2004 6:18 PM
> > Subject: Re: [R] Adding GSL library path to SHLIB
> >
> >
> > > Dear Prof. Ripley,
> > > We read the archive thread
> > > http://maths.newcastle.edu.au/~rking/R/help/02b/0547.html
> > > Thank you for your help, we will try to create the Makevars file.
> > > Vicky.
> > >
> > >
> > >
> > > - Original Message - 
> > > From: "Prof Brian Ripley" <[EMAIL PROTECTED]>
> > > To: "Vicky Landsman" <[EMAIL PROTECTED]>
> > > Cc: "r-help" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Thursday, September 09, 2004 3:17 PM
> > > Subject: Re: [R] Adding GSL library path to SHLIB
> > >
> > >
> > > > On Thu, 9 Sep 2004, Vicky Landsman wrote:
> > > >
> > > > > Dear R-list people,
> > > >
> > > > > I asked a similar question a few hours before. I will try to be
more
> > > > > specific.  We like to add the GSL library to the file SHLIB in
order
> > to
> > > > > make it possible to run the C code using GSL functions from R.  We
> > read
> > > >
> > > > Read where?  It's incorrect information and only used for Fortran
> > linking.
> > > >
> > > > > that the path to the libgsl.a should be added to the line
> > shlib_libadd='
> > > > > ' in the file SHLIB but it does not work on our system. Dyn.load
fails
> > > > > with error "referenced symbol  not found". What is
wrong?
> > > > > We will much appreciate any help on this.
> > > > >
> > > > > We are using R-1.9.1 on Unix.
> > > >
> > > > You should have a file called Makevars in the directory from which
> > > > you are doing the building, defining PKG_LIBS, maybe
> > > >
> > > > PKG_LIBS="-L/path/to/libgsl -lgsl"
> > > >
> > > > in the same way as you would for a package: see `Writing R
Extensions'.
> > > > I don't think that is documented anywere, though.
> > > >
> > > > -- 
> > > > Brian D. Ripley,  [EMAIL PROTECTED]
> > > > Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> > > > University of Oxford, Tel:  +44 1865 272861 (self)
> > > > 1 South Parks Road, +44 1865 272866 (PA)
> > > > Oxford OX1 3TG, UKFax:  +44 1865 272595
> > > >
> > > >
> > >
> > > __
> > > [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
> 

[R] R course in Princeton and Boston

2004-09-09 Thread eugene dalt
Anyone saved the upcoming R course announcement 
for Princeton and Boston?  Please email me...

Thanks
Eugene.

__
[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


Re: [R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread Jonathan Baron
I think that a lot of posts on r-help are exactly of the form you
suggest: "How do I do X?"  Answer: "Use Y."  (Or maybe, "Use Y.
And next time RTFM."  But so what.  The answer is still there.)

Often, when the answer is not of that form, the question is
unclear.  In other cases, the questioner is apparently asking for
general statistical advice, rather than which package to use.

In sum, I don't think the new list is needed.  I do not want to
archive it.  I think that, if a questioner fails to find an
answer because the terms he would use do not happen to be indexed
in help.search(), etc., then he has the option of using my search
engine as a fallback, where it is likely that someone else has
used his favored terms.

Jon
-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron
R search page: http://finzi.psych.upenn.edu/

__
[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


RE: [R] Skipping panels in Lattice

2004-09-09 Thread Hanke, Alex
I have the same problem. As far as I can see, the only thing you can do is :

attach(df2)
group=paste(facb,facc,sep=" ")
bwplot( dv ~ faca | factor(group))

Alex

-Original Message-
From: Leon Barmuta [mailto:[EMAIL PROTECTED] 
Sent: September 9, 2004 1:19 AM
To: [EMAIL PROTECTED]
Subject: [R] Skipping panels in Lattice


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 missing
something...

Here's an example (running R 1.9.1 on Win2k):

# generate some data

df1 <- data.frame(expand.grid(obsnum=seq(1, 15, 1), faca=c("A1", "A2",
"A3"),
 facb=c("B1","B2", "B3", "B4"), facc=c("C1","C2")),
dv=rpois(15*3*4*2,10))

# now get rid of the cell B4 & C1 to simulate a missing treatment
combination

df2 <- df1[df1$facb !="B4" | df1$facc !="C1", ]

# plain vanilla lattice plot generates an empty panel corresponding to the 
empty cell

plot1 <- bwplot( dv ~ faca | facb*facc, data=df2)
plot1

# now try to skip the empty panel
# turn plot history on so that the separate pages can be recalled

plot2 <- update(plot1, skip=c(rep(F, 3), T, rep(F, 4)))
plot2

and the 4th panel position of the bottom row is skipped, BUT the B4&C1 cell 
is shunted to the top left of row 1 and the last panel of plot1 is now 
moved to page 2. Messing with layout= doesn't help, neither does 
substituting NA for the values of the missing cell (instead of cutting it 
out of the data frame). I also get the same behaviour for stripplot and 
dotplot too.

Apologies if I've missed a previous solution to this during my searches of 
the archive.

Regards,

Leon Barmuta
School of Zoology & TAFI, University of Tasmania, Australia.

__
[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

__
[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


Re: [R] Dyn.load of sharing object with GSL library

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, Vicky Landsman wrote:

> Following the recommendation of Prof. Ripley, I have created the Makevars
> file with the line:
> PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl -L/usr/local/lib
> /libgslcblas -lgslcblas"
> in the working directory.

No, that's not what I recommended. -L/path/to/libgsl would probably be
-L/usr/local/lib if libgsl is in /usr/local/lib.  And why do you want -lm?

Please consult your unstated OS's documentation for ld.

> Now I have the code file Example3.c which computes the Bessel function value
> (the example is taken from the GSL reference book).
> I am running:
> R CMD SHLIB Example3.c

Pleae show us exactly what you get here.

> and all looks good.
> The dyn.load("Example3.so") fails with the following error message:
> 
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library
> "/fs/users1/guest/msvika/PhD/R_04/Example3.so":
>   ld.so.1: /usr/local/sbin/R-1.9/R-1.9.1/bin/R.bin: fatal: relocation error:
> file /fs/users1/guest/msvika/PhD/R_04/Example3.so: symbol gsl_sf_bessel_J0:
> referenced symbol not found

Try ldd /fs/users1/guest/msvika/PhD/R_04/Example3.so and get a local
expert to interpret it for you.

You will need anything you had in -L in PKG_LIBS in your library run path
as well.  You may need e.g.

export LD_LIBRARY_PATH=:${LD_LIBRARY_PATH}:/usr/local/lib

and please check with a local expert about this.

> What is wrong?
> Much thanks, Vicky.
> 
> - Original Message - 
> From: "Vicky Landsman" <[EMAIL PROTECTED]>
> To: "r-help" <[EMAIL PROTECTED]>
> Sent: Thursday, September 09, 2004 6:18 PM
> Subject: Re: [R] Adding GSL library path to SHLIB
> 
> 
> > Dear Prof. Ripley,
> > We read the archive thread
> > http://maths.newcastle.edu.au/~rking/R/help/02b/0547.html
> > Thank you for your help, we will try to create the Makevars file.
> > Vicky.
> >
> >
> >
> > - Original Message - 
> > From: "Prof Brian Ripley" <[EMAIL PROTECTED]>
> > To: "Vicky Landsman" <[EMAIL PROTECTED]>
> > Cc: "r-help" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Thursday, September 09, 2004 3:17 PM
> > Subject: Re: [R] Adding GSL library path to SHLIB
> >
> >
> > > On Thu, 9 Sep 2004, Vicky Landsman wrote:
> > >
> > > > Dear R-list people,
> > >
> > > > I asked a similar question a few hours before. I will try to be more
> > > > specific.  We like to add the GSL library to the file SHLIB in order
> to
> > > > make it possible to run the C code using GSL functions from R.  We
> read
> > >
> > > Read where?  It's incorrect information and only used for Fortran
> linking.
> > >
> > > > that the path to the libgsl.a should be added to the line
> shlib_libadd='
> > > > ' in the file SHLIB but it does not work on our system. Dyn.load fails
> > > > with error "referenced symbol  not found". What is wrong?
> > > > We will much appreciate any help on this.
> > > >
> > > > We are using R-1.9.1 on Unix.
> > >
> > > You should have a file called Makevars in the directory from which
> > > you are doing the building, defining PKG_LIBS, maybe
> > >
> > > PKG_LIBS="-L/path/to/libgsl -lgsl"
> > >
> > > in the same way as you would for a package: see `Writing R Extensions'.
> > > I don't think that is documented anywere, though.
> > >
> > > -- 
> > > Brian D. Ripley,  [EMAIL PROTECTED]
> > > Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> > > University of Oxford, Tel:  +44 1865 272861 (self)
> > > 1 South Parks Road, +44 1865 272866 (PA)
> > > Oxford OX1 3TG, UKFax:  +44 1865 272595
> > >
> > >
> >
> > __
> > [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
> >
> 
> __
> [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
> 
> 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


[R] Proposal for New R List: Criticism? Comments?

2004-09-09 Thread Berton Gunter
Folks:
 
I would like to propose a new R list, tentatively labeled r-contents. I wish
to briefly explain the purpose and format here and solicit public comments,
pro or con, so feel free to criticize or suggest a better name and other
improvements or alternatives.
 
R presently consists of a suite of about a dozen core recommended packages
and several hundred contributed packages comprising thousands -- perhaps
tens of thousands -- of functions. Hopefully, this will continue to grow
rapidly. No one can possibly keep track of all of this, and it is therefore
a daunting task for someone seeking specific functionality to find it,
especially when they are relatively new to R. 
 
Of course, R and CRAN (and Google and ...)  have various search capabilities
that help, but these are essentially keyword-based and so require the
searcher to guess search terms that are at least reasonably close to
function names and keywords. A lot of the time this works, but it can be
tedious; some of the time one guesses wrong, and it doesn't work.
 
S-Plus and much other software addresses this by providing a
semantically-based Contents Index (or something like it) in their Help
functionality. I find this quite useful, but creating and maintaining such
an index seems to me to be extremely labor intensive, fraught with its own
issues (what heading should I look under?), and, I think, not a good fit to
the spirit and dynamics of R anyway.
 
Not surprisingly, as a result, many of the questions addressed to r-help are
of the form: "I want to do such and such. How do I do it?" While this
certainly gives answers, I think the breadth of r-help and its etiquette and
posting conventions result in an abruptness to many of our replies ("Read
the posting guide! Read the Help files and do what they say!") that
discourages many users -- especially casual ones -- from posting questions,
and thus may thus discourage use of R. Clearly, if true, this is not a good
thing; on the other hand, I think that given r-help's purpose and practices,
many of these abrupt replies may well be appropriate (I'm a curmudgeon at
heart!).
 
Hence, there is a mismatch between user needs and r-help services. To
address this mismatch, I would like to propose a new list, r-contents, to
essentially serve the same purpose as the S-Plus Contents index. Hence, it
would serve as a place for users to post queries ** only ** of the form: "I
want to do such and such. How do I do it?" and receive answers that would
all be **single phrases ** of the form "package suchandsuch" or
"?suchandsuchfunction." No further explanations regarding usage would be
provided, though users would be free to follow up answers with private
questions to the responder, although there should be no expectation of any
response. Queries could be framed with as much or as little supporting
detail as desired, with the obvious consequence that a more clearly framed
question would be more likely to get a (better) response. No other posting
conventions (aside from the usual ones regarding civility and adherence to
topic) would be expected.
 
My hope is that such a list would both reduce unnecessary traffic on r-help
and satisfy a genuine need in a less threatening way. I can certainly see
downsides (I often learn a lot from "How can I do this?" queries), but I
think, on balance, this approach might be useful. So I would like to subject
the idea to public scrutiny and criticism, as well as the opportunity for
improvement from suggested modifications or alternatives. If it's useful,
this will be recognized; if it's not and/or no one is interested, that, too,
will be made manifest. I would be especially grateful for the opinions of
casual users or newbies, either publicly or privately.
 
Cheers,
 
-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box
 
 

[[alternative HTML version deleted]]

__
[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


Re: [R] Installing packages on OS X

2004-09-09 Thread hadley wickham
Thanks to you both.  Setting R_LIBS='~/Library/R/library/' in
~/.Renviron did the trick.

Thanks,

Hadley

__
[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


[R] Dyn.load of sharing object with GSL library

2004-09-09 Thread Vicky Landsman
Following the recommendation of Prof. Ripley, I have created the Makevars
file with the line:
PKG_LIBS="-L/usr/lib/libm -lm -L/usr/local/lib/libgsl -lgsl -L/usr/local/lib
/libgslcblas -lgslcblas"
in the working directory.
Now I have the code file Example3.c which computes the Bessel function value
(the example is taken from the GSL reference book).
I am running:
R CMD SHLIB Example3.c
and all looks good.
The dyn.load("Example3.so") fails with the following error message:

Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
"/fs/users1/guest/msvika/PhD/R_04/Example3.so":
  ld.so.1: /usr/local/sbin/R-1.9/R-1.9.1/bin/R.bin: fatal: relocation error:
file /fs/users1/guest/msvika/PhD/R_04/Example3.so: symbol gsl_sf_bessel_J0:
referenced symbol not found

What is wrong?
Much thanks, Vicky.

- Original Message - 
From: "Vicky Landsman" <[EMAIL PROTECTED]>
To: "r-help" <[EMAIL PROTECTED]>
Sent: Thursday, September 09, 2004 6:18 PM
Subject: Re: [R] Adding GSL library path to SHLIB


> Dear Prof. Ripley,
> We read the archive thread
> http://maths.newcastle.edu.au/~rking/R/help/02b/0547.html
> Thank you for your help, we will try to create the Makevars file.
> Vicky.
>
>
>
> - Original Message - 
> From: "Prof Brian Ripley" <[EMAIL PROTECTED]>
> To: "Vicky Landsman" <[EMAIL PROTECTED]>
> Cc: "r-help" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, September 09, 2004 3:17 PM
> Subject: Re: [R] Adding GSL library path to SHLIB
>
>
> > On Thu, 9 Sep 2004, Vicky Landsman wrote:
> >
> > > Dear R-list people,
> >
> > > I asked a similar question a few hours before. I will try to be more
> > > specific.  We like to add the GSL library to the file SHLIB in order
to
> > > make it possible to run the C code using GSL functions from R.  We
read
> >
> > Read where?  It's incorrect information and only used for Fortran
linking.
> >
> > > that the path to the libgsl.a should be added to the line
shlib_libadd='
> > > ' in the file SHLIB but it does not work on our system. Dyn.load fails
> > > with error "referenced symbol  not found". What is wrong?
> > > We will much appreciate any help on this.
> > >
> > > We are using R-1.9.1 on Unix.
> >
> > You should have a file called Makevars in the directory from which
> > you are doing the building, defining PKG_LIBS, maybe
> >
> > PKG_LIBS="-L/path/to/libgsl -lgsl"
> >
> > in the same way as you would for a package: see `Writing R Extensions'.
> > I don't think that is documented anywere, though.
> >
> > -- 
> > Brian D. Ripley,  [EMAIL PROTECTED]
> > Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> > University of Oxford, Tel:  +44 1865 272861 (self)
> > 1 South Parks Road, +44 1865 272866 (PA)
> > Oxford OX1 3TG, UKFax:  +44 1865 272595
> >
> >
>
> __
> [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
>

__
[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


Re: [R] scoping rules

2004-09-09 Thread Gabor Grothendieck
Whit Armstrong  tudor.com> writes:

: 
: Can someone help me with this simple example?
: 
: sq <- function() {
:   y <- x^2
:   y
: }
: 
: myfunc <- function() {
:   x <- 10
:   sq()
: }
: 
: myfunc()
: 
: executing the above in R yields:
: > myfunc()
: Error in sq() : Object "x" not found
: 
: I understand that R's scoping rules cause it to look for "x" in the
: environment in which "sq" was defined (the global environment in this case).
: But in this case "x" is defined inside the calling function, not the
: environment in which "sq" was defined.
: 
: Is there a way to tell R to look in the calling function for "x" ?
: 
: I have tried the following variants of "eval" such as
: eval(sq(),parent.frame()) with no success.
: 



Here are two approaches:

1. have myfunc change sq's environment to the current environment:

sq <- function() { y <- x^2; y }
myfunc <- function() { x <- 10; environment(sq) <- environment(); sq() }
myfunc()

2. modify sq itself to get x from the parent frame.  We use get in
the example below but you could alternately replace get(...) with
eval.parent(substitute(x)) if you prefer to use eval:

sq <- function() { y <- get("x", parent.frame())^2; y }
myfunc <- function() { x <- 10; sq() }
myfunc()

__
[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


Re: [R] Adding GSL library path to SHLIB

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, Vicky Landsman wrote:

> Dear Prof. Ripley,
> We read the archive thread
> http://maths.newcastle.edu.au/~rking/R/help/02b/0547.html

Things have changed in 2 years in R 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


[R] scoping rules

2004-09-09 Thread Whit Armstrong
Can someone help me with this simple example?

sq <- function() {
y <- x^2
y
}

myfunc <- function() {
x <- 10
sq()
}

myfunc()


executing the above in R yields:
> myfunc()
Error in sq() : Object "x" not found

I understand that R's scoping rules cause it to look for "x" in the
environment in which "sq" was defined (the global environment in this case).
But in this case "x" is defined inside the calling function, not the
environment in which "sq" was defined.

Is there a way to tell R to look in the calling function for "x" ?

I have tried the following variants of "eval" such as
eval(sq(),parent.frame()) with no success.

Thanks for your help.

Regards,
Whit

> R.Version()
$platform
[1] "i386-pc-mingw32"

$arch
[1] "i386"

$os
[1] "mingw32"

$system
[1] "i386, mingw32"

$status
[1] ""

$major
[1] "1"

$minor
[1] "9.1"

$year
[1] "2004"

$month
[1] "06"

$day
[1] "21"

$language
[1] "R"

>

__
[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


[R] SJava, Client X11

2004-09-09 Thread Laurent Buffat
Hi,

 

I have installed the SJava package (see http://www.omegahat.org/RSJava/ )
without any problem.

 

I was able to run the examples (see
http://www.omegahat.org/RSJava/examples/index.html )

from R, on my “R Linux server” and directly on the display of the server,

 

But, if I run theses examples on an “X11 client”, under Linux or windows,
with a “correct configuration” of the X11 client

(export DISPLAY=machine:0.0 on Linux for example), I have a “scratch” of the
R session without any messages …

 

For example:

 

> library(SJava)

> .JavaInit()

> source(“DynamicButtonCallback.R”)

 

Run perfectly on the server, with a creation of a button on the display.

 

But the same instructions, on the X11 client, create the button and
immediately crash the R session and destroy the button.

 

Any Ideas?

 

Thanks for your help.

 

Laurent  

 


[[alternative HTML version deleted]]

__
[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


Re: [R] Adding GSL library path to SHLIB

2004-09-09 Thread Vicky Landsman
Dear Prof. Ripley,
We read the archive thread
http://maths.newcastle.edu.au/~rking/R/help/02b/0547.html
Thank you for your help, we will try to create the Makevars file.
Vicky.



- Original Message - 
From: "Prof Brian Ripley" <[EMAIL PROTECTED]>
To: "Vicky Landsman" <[EMAIL PROTECTED]>
Cc: "r-help" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, September 09, 2004 3:17 PM
Subject: Re: [R] Adding GSL library path to SHLIB


> On Thu, 9 Sep 2004, Vicky Landsman wrote:
>
> > Dear R-list people,
>
> > I asked a similar question a few hours before. I will try to be more
> > specific.  We like to add the GSL library to the file SHLIB in order to
> > make it possible to run the C code using GSL functions from R.  We read
>
> Read where?  It's incorrect information and only used for Fortran linking.
>
> > that the path to the libgsl.a should be added to the line shlib_libadd='
> > ' in the file SHLIB but it does not work on our system. Dyn.load fails
> > with error "referenced symbol  not found". What is wrong?
> > We will much appreciate any help on this.
> >
> > We are using R-1.9.1 on Unix.
>
> You should have a file called Makevars in the directory from which
> you are doing the building, defining PKG_LIBS, maybe
>
> PKG_LIBS="-L/path/to/libgsl -lgsl"
>
> in the same way as you would for a package: see `Writing R Extensions'.
> I don't think that is documented anywere, though.
>
> -- 
> Brian D. Ripley,  [EMAIL PROTECTED]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel:  +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UKFax:  +44 1865 272595
>
>

__
[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


[R] discriminant analysis

2004-09-09 Thread Rogério Rosa da Silva
Dear all,

I'm having difficulty getting the procedure for discriminant analysis. How can 
I specify the forward or backward stepwise analyses of variables into the 
model? I'm using lda in MASS and discrimin (ade4). I run R version 1.9.1.

Thanks,

Rogério

__
[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


RE: [R] kolmogorov-smirnov for discrete ordinal scale data

2004-09-09 Thread Hanke, Alex
Hi
I think the answer is no. However, I have written a script that implements
the test described in "Testing for shifts in the Vertical Distribution of
Plankton using a robust Kolmogorov-Smirnov like Statistic" by Smith, Beet
and Solow (1998). The test has the properties you are looking for. If this
sounds helpful let me know.
Alex

-Original Message-
From: Gila Lithwick [mailto:[EMAIL PROTECTED] 
Sent: September 9, 2004 11:03 AM
To: [EMAIL PROTECTED]
Subject: [R] kolmogorov-smirnov for discrete ordinal scale data


Hi,

I was wondering whether there is an implementation of the 
Kolmogorov-Smirnov goodness of fit test for discrete, ordinal scale data 
in R - I've only managed to find the test for continuous data.

Thanks!
Gila

__
[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

__
[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


[R] Copulas

2004-09-09 Thread J W
Is anyone already in the process of developing copula estimation methods or 
porting Prof. Rene Carmona's EVANESCE 
(http://www.orfe.princeton.edu/~rcarmona/SVbook/svbook.html)?

JW
__
[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


[R] kolmogorov-smirnov for discrete ordinal scale data

2004-09-09 Thread Gila Lithwick
Hi,
I was wondering whether there is an implementation of the 
Kolmogorov-Smirnov goodness of fit test for discrete, ordinal scale data 
in R - I've only managed to find the test for continuous data.

Thanks!
Gila
__
[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


RE: [R] confidence intervals

2004-09-09 Thread Rogers, James A [PGRD Groton]

Robert, 

I have this quick hack to obtain approximate "Shewhart" prediction intervals
for variance component models fit with lme (to nitpick slightly,
"confidence" intervals have the interpretation of containing parameters,
while "prediction" and "tolerance" intervals have the interpretation of
containing future observations or statistics). 

Back of the envelope documentation: the only argument that probably needs
explaining is the "reps" argument to shewhart(). If your model is, e.g.

fixed = Y ~ 1, random = ~ 1 | Batch

then specify reps = c(1, 1) if you want to predict a single future
observation from a single future batch, reps = c(1, 2) if you want to
predict the mean of two future observations from a single future batch, reps
= c(2, 2) if you want to predict the mean of 4 observations spread evenly
over 2 future batches, ...

Leave mult.check = 1, unless you want to do a Bonferroni correction. 

HTH, 

Jim Rogers


valStats2 <- 
function (x, fixed, random, ...) 
{
mod <- lme(fixed = fixed, data = x, random = random, ...)
mn <- fixef(mod)
vc <- VarCorr(mod)
err <- "Expecting only random intercept terms and a single fixed
intercept.\n"
if (length(mn) > 1 || ncol(vc) > 2) 
stop(err)
rn <- rownames(vc)
skip <- regexpr("=", rn) > 0
if (!any(skip)) 
vnms <- attr(vc, "title")
else vnms <- grep("=", rn, value = TRUE)
vc <- vc[!skip, ]
vnms <- trim(sub("=.*", "", vnms))
vnms <- c(vnms, "Residual")
vnms <- paste("V", vnms, sep = ".")
vars <- as.numeric(vc[, "Variance"])
stats <- c(mn, vars)
names(stats) <- c("Intercept", vnms)
stats
}

shewhart <- 
function (x, meancol = "Intercept", varcols = grep("^V\\.", names(x), value
= TRUE), reps = c(1, 1), alpha = 0.02, mult.check = 1) 
{
mn <- x[[meancol]]
vr <- as.matrix(x[varcols])
totvar <- vr %*% (1/reps)
totsd <- sqrt(totvar)
LL.mean <- mn + qnorm(alpha/2/mult.check) * totsd
UL.mean <- mn + qnorm(1 - alpha/2/mult.check) * totsd
out <- data.frame(V.Total = totvar, LL.mean = LL.mean, UL.mean =
UL.mean)
out
}


### Example, where x is your data.frame:

foo <- valStats2(x, fixed = Y ~ 1, random = ~ 1|Batch)
foo <- as.data.frame(t(as.matrix(foo)))
data.frame(foo, shewhart(foo))



> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Spencer Graves
> Sent: Friday, September 03, 2004 11:58 AM
> To: [EMAIL PROTECTED]
> Cc: Robert Waters; [EMAIL PROTECTED]
> Subject: Re: [R] confidence intervals
> 
> 
> Hi, Robert: 
> 
>   While it may be difficult to program this in general 
> (as suggested 
> by it's position on Doug's "To Do" list), all the pieces should be 
> available to support a special script for your specific application.  
> What fixed and random model(s) interest you most? 
> 
>   hope this helps.  spencer graves
> 
> Douglas Bates wrote:
> 
> > Robert Waters wrote:
> >
> >> Dear R users;
> >>
> >> Im working with lme and Id like to have an idea of how
> >> can I get CI for the predictions made with the model.
> >> Im not a stats guy but, if Im not wrong, the CIs
> >> should be different if Im predicting a new data point
> >> or a new group. Ive been searching through the web and
> >> in help-lists with no luck. I know this topic had been
> >> asked before but without replies. Can anyone give an
> >> idea of where can I found information about this or
> >> how can I get it from R?
> >>
> >> Thanks for any hint
> >
> >
> > That's not currently implemented in lme.  It's on the "To 
> Do" list but 
> > it is not very close to the top.
> >




LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
[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


RE: [R] tree architecture in Random Forest

2004-09-09 Thread Liaw, Andy
> From: Ute
> 
> Hello,
> 
> I'm doing classification with random Forest using numeric predictor 
> variables. I would like to know a detail in the tree architecture: to 
> which side of a node data are sent if , for the split variable, their 
> value is higer than the split point?

The right, as one would usually draw a real line...

Andy

 
> best regards,
> 
> Ute Müller
> 
> __
> [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
> 
>

__
[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


[R] tree architecture in Random Forest

2004-09-09 Thread Ute
Hello,
I'm doing classification with random Forest using numeric predictor 
variables. I would like to know a detail in the tree architecture: to 
which side of a node data are sent if , for the split variable, their 
value is higer than the split point?

best regards,
Ute Müller
__
[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


Re: [R] Adding GSL library path to SHLIB

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, Vicky Landsman wrote:

> Dear R-list people, 

> I asked a similar question a few hours before. I will try to be more
> specific.  We like to add the GSL library to the file SHLIB in order to
> make it possible to run the C code using GSL functions from R.  We read

Read where?  It's incorrect information and only used for Fortran linking.

> that the path to the libgsl.a should be added to the line shlib_libadd='
> ' in the file SHLIB but it does not work on our system. Dyn.load fails
> with error "referenced symbol  not found". What is wrong?  
> We will much appreciate any help on this.
> 
> We are using R-1.9.1 on Unix. 

You should have a file called Makevars in the directory from which 
you are doing the building, defining PKG_LIBS, maybe

PKG_LIBS="-L/path/to/libgsl -lgsl"

in the same way as you would for a package: see `Writing R Extensions'.
I don't think that is documented anywere, though.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


Re: [R] locator() in a multi-figure setting using mfrow(): SOLVED

2004-09-09 Thread Christoph Lehmann
thanks to some great hints by Paul Murrel I could solve it: here we are 
with one solution (code needs to be cleaned and simplified, but maybe 
one can understand it)

###
## create a multifigure setting
nr <- 4
nc <- 2
opar <- par(mfrow = c(nr, nc))
slices <- 8
m <- matrix(runif(100),10,10)
my.list <- list()
for (slice in 1:slices) {
my.list[[slice]] <- m
}
for  (slice in 1:slices) {
x <- 1*(1:25)
y <- 1*(1:25)
z <- my.list[[slice]]
image(list(x = 0:9, y = 0:9, z = z))
}

my.get.coord <- function() {
par(mfg = c(1,1)) #locator() shall be relative to the first plot out
# of the eight plots totally
my.loc <-locator(1) #location, not in inches
my.plot.region <- par("usr") #extremes of plotting region
#(in plot units, not inches)
my.plot.region.x <- my.plot.region[2] - my.plot.region[1]
my.plot.region.y <- my.plot.region[4] - my.plot.region[3]
my.loc.inch.x <- (my.loc$x + 0.5)/my.plot.region.x * (par("pin")[1]) 
#par("pin") #current plot dimension in inches
#relative to the plotting-region bottom left corner, not the axis c(0,0) 
point
my.loc.inch.y <- (my.loc$y + 0.5)/my.plot.region.y * (par("pin")[2])

## search the plot we are in with locator(1)
my.plot.inch.x <- par("pin")[1] + par("mai")[2] + par("mai")[4] #plot.x 
+ left & right margin
par("fin")[1]
my.plot.inch.y <- par("pin")[2] + par("mai")[1] + par("mai")[3] #plot.y 
+ bottom & top margin
par("fin")[2]

pos.rel.x <- (my.loc.inch.x / par("fin")[1] - floor(my.loc.inch.x / 
par("fin")[1])) *
 par("fin")[1] / par("pin")[1] * (par("usr")[2] - par("usr")[1]) - 0.5
 #inches from left bottom corner in target plot region (c(0,0)
 # is plot-region bottom-left corner, not the axis c(0,0) point
pos.rel.y <- (my.loc.inch.y / par("fin")[2] - floor(my.loc.inch.y / 
par("fin")[2])) *
 par("fin")[2] / par("pin")[2] * (par("usr")[4] - par("usr")[3]) - 0.5
 #inches from left bottom corner in target plot

fig.coord.x <- ceiling(my.loc.inch.x / par("fin")[1])
fig.coord.y <- 1 +(-1) *ceiling(my.loc.inch.y / par("fin")[2])
# cat("figure-coord x: ", fig.coord.x,"\n")
# cat("figure-coord y: ", fig.coord.y,"\n")
cat("we are in figure: ", fig.coord.y * nc + fig.coord.x, "\n")
cat("coordinates of the identified point x: ", round(pos.rel.x),"\n")
cat("coordinates of the identified point y: ", round(pos.rel.y),"\n")
}

my.get.coord()
Christoph
__
[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


RE: [R] Handling the windows clipboard/32KB limit

2004-09-09 Thread Ritter, Christian C MCIL-CTANL/S
Thanks Brian for the hint. 

Indeed, writeClipboard does not suffer from the 32KB limit. Here is a line which can 
put large quantities of data on the clipboard:
writeClipboard(gsub("NA","\#N/A",apply(Alldata,1,paste,collapse="\t")))
this can then be pasted either manually or via a VBA macro into a spreadsheet. 

Here is some more info for R/Excel junkies:
===
VBA example using RExcel to pass the command:
Sub FetchDataframe(Dfname As String, TargetRange As Range)
Dim commandString As String
commandString = "writeClipboard(c(paste(colnames(" & Dfname & 
"),collapse='\t'),gsub('NA','\#N/A',apply(" & Dfname & ",1,paste,collapse='\t'"
Call RRun(commandString)
TargetRange.PasteSpecial
End Sub
Again, the time for 
FetchDataframe "Alldata",Range("Sheet1!$A$1") 
on about 12 cells is on the order of two or three seconds. I looked at scaling. 
For 36 (mixed type) cells, the required time was on the order of 15 seconds. 

I also looked at putting data from Excel to R: Here things scale even better. Using 
the code:
Sub PutDataframe(Dfname As String, TargetRange As Range)
Dim commandString As String
commandString = Dfname & 
"<-read.table(file=file(description='clipboard'),sep='\t',na.strings=c('#N/A',''),header=TRUE,comment.char=';')"
TargetRange.Copy
Call RRun(commandString)
End Sub
the transfer 
PutDataframe "Alldata",Range("Alldata")
took 7 seconds for 36 (mixed type) cells.   

As Brian points out: Obviously, RODBC is more flexible for selecting, cleaning, etc. 
But in my experience it is a bit slow when dealing with Excel as a data source (via 
dsn<-odbcConnectExcel("Myfile.xls"). I redid my 12 cell example using 
Alldata<-sqlFetch(dsn,"Alldata") and needed about 80 seconds. Now, this is not the 
fault of RODBC but probably of starting and using the jet data engine within Windows. 
Moreover, in particular, if the workbook Myfile.xls is actually open wile odbc is 
working on it, there may be memory or performance leaks (probably unrelated to RODBC). 
If I retrieve the same data frame (from Excel) several times, (either opening and 
closing the connection every time or opening it once and fetching several times) the 
retrieval times can become much slower as a go. At some time there may be "waiting for 
an OLE action to complete messages".

RExcel/R(D)COM gives a third possibility with probably much more flexibility/safety 
than my crude clipboard method and we are currently working hard at increasing its 
speed. Currently, we are at about 20 seconds for the 12 cell example.

In summary, what strikes me about the clipboard approach is its speed and the size of 
objects which can be moved between Excel and R. Some fine tuning will be needed to 
deal with exceptions. 



-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Thursday, 09 September, 2004 12:41 PM
To: Ritter, Christian C MCIL-CTANL/S
Cc: [EMAIL PROTECTED]
Subject: Re: [R] Handling the windows clipboard/32KB limit


On Thu, 9 Sep 2004, Ritter, Christian C MCIL-CTANL/S wrote:

> (R 1.9.1; Windows 2000;)
> 
> I'm just comparing ease of use, speed, etc for methods of transferring
> data frames in the Excel, MySQL, R triangle. It turns out that going
> from Excel to R (when doing this carefully). Using the clipboard is
> actually quite fast and efficient (2 seconds for transferring 120 000
> cells on a common desktop computer as compared to much longer for going
> the RODBC route, maybe also substantially longer using the R(D)COM
> route). Other advantage: Relatively flexible handling of missing values
> from Excel which may be "empty", "#N/A", etc. 

You clearly haven't looked at RODBC carefully as that has equally flexible 
handling.

> So I thought I would also look at ways of going back via the clipboard.
> There I'm hitting a funny snag. The documentation explains that there is
> a 32KB limit on writing to the clipboard. This may make sense as a
> default, but does it make sense as a hard restriction?

I guess you are talking about using file="clipboard" in a connection, but
there is also writeClipboard, whose documentation does not mention a 
limit.

My Windows documentation says there is a 32Kb limit on the size of an 
text object put on the clipboard, and I believe that is the case for
Windows 95/98/ME at least.  So a hard restriction makes sense.

> Any ideas of getting around this limitation (besides cumbersome R-code
> buffering/breaking up the frame to send into small pieces to be
> collected and assembled in Excel?

R is Open Source, so this is an opportunity for you to experiment, test on 
various versions of Windows and contribute a patch back to the R project.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (P

[R] Adding GSL library path to SHLIB

2004-09-09 Thread Vicky Landsman
Dear R-list people, 
I asked a similar question a few hours before. I will try to be more specific. 
We like to add the GSL library to the file SHLIB in order to make it possible to run 
the C code using GSL functions from R. 
We read that the path to the libgsl.a should be added to the line shlib_libadd=' '  in 
the file SHLIB but it does not work on our system. Dyn.load fails with error 
"referenced symbol  not found". What is wrong?  
We will much appreciate any help on this.

We are using R-1.9.1 on Unix. 
[[alternative HTML version deleted]]

__
[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


RE: [R] isoMDS

2004-09-09 Thread Hanke, Alex
I get the following message:
Error in isoMDS(tt) : zero or negative distance between objects 1 and 2
This makes sense since a and b are identical in their relationship to c to
h. 
Drop row 1 and col 1 and you get
> isoMDS(tt[2:8,2:8])
initial  value 14.971992 
iter   5 value 8.027815
iter  10 value 4.433377
iter  15 value 3.496364
iter  20 value 3.346726
final  value 3.233738 
converged
$points
   [,1]   [,2]
[1,] -2.3143653 -0.1259226
[2,] -0.3205746 -1.1534662
[3,] -2.8641922 -0.1182906
[4,]  0.7753674  0.1497328
[5,] -0.5705552  1.2416843
[6,]  2.2305175 -0.6995917
[7,]  3.0638025  0.7058540

$stress
[1] 3.233738

Does this help?

-Original Message-
From: Doran, Harold [mailto:[EMAIL PROTECTED] 
Sent: September 9, 2004 8:26 AM
To: Jari Oksanen
Cc: Doran, Harold; Prof Brian Ripley; R-News
Subject: RE: [R] isoMDS


Thank you. I use the same matrix on cmdscale as I did with isoMDS. I have
reproduced my steps below for clarification if this happens to shed any
light.
 
Here is the original total matrix (see opening thread if you care how this
is created)
 
  a b c d e f g h
a 4 4 2 4 1 2 0 0
b 4 4 2 4 1 2 0 0
c 2 2 4 2 3 2 2 1
d 4 4 2 4 1 2 0 0
e 1 1 3 1 4 3 3 2
f 2 2 2 2 3 4 2 1
g 0 0 2 0 3 2 4 3
h 0 0 1 0 2 1 3 4
 
So, there are 8 items. This matrix indicates that items 1,2, and 4 were
always grouped together (or viewed as being similar by individuals). I
transformed this using 
 
tt<-max(t)-t
 
which results in
  a b c d e f g h
a 0 0 2 0 3 2 4 4
b 0 0 2 0 3 2 4 4
c 2 2 0 2 1 2 2 3
d 0 0 2 0 3 2 4 4
e 3 3 1 3 0 1 1 2
f 2 2 2 2 1 0 2 3
g 4 4 2 4 1 2 0 1
h 4 4 3 4 2 3 1 0
 
When I run isoMDS on this new matrix, it tells me to specify the initial
config because of the NA/INFs/ But when I perform cmdscale on this same
matrix I end up with the following results,
 
> bt<-cmdscale(tt);bt
 
 [,1]   [,2]
a -1.79268634 -0.2662750
b -1.79268634 -0.2662750
c -0.02635497  0.5798934
d -1.79268634 -0.2662750
e  1.08978620  0.6265313
f -0.02635497  0.5798934
g  2.20852966  0.2828937
h  2.13245309 -1.2703869
 
The results suggest that items 1,2, and 4 have similar locations as is
expected. Also items 3 and 6 have similar locations as would also be
expected. So, my results seem to have been replicated correctly using
cmdscale. 
 
I've tried to specify an initial config using isoMDS in a few ways without
success, so I am surely doing something wrong. So far, I have tried the
following:
 
> ll<-isoMDS(tt, y=cmdscale(tt))
 
which tells me "zero or negative distance between objects 1 and 2"
 
> ll<-isoMDS(tt, y=cmdscale(tt, k=2))
 
 
Again, thanks,
 
Harold
 
 

-Original Message- 
From: Jari Oksanen [mailto:[EMAIL PROTECTED] 
Sent: Thu 9/9/2004 4:26 AM 
To: Doran, Harold 
Cc: Prof Brian Ripley; R-News 
Subject: RE: [R] isoMDS



On Wed, 2004-09-08 at 21:31, 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
>
> Where tt is the similarity matrix. With this, I tried isoMDS as
follows:
>
> > tt.mds<-isoMDS(d)
>
> and I get the following error message.
>
> Error in isoMDS(d) : An initial configuration must be supplied
with
> NA/Infs in d. I was a little confused on exactly how to specify
this
> initial config. So, from here I ran cmdscale on d as
>
This error message is quite informative: you have either missing or
non-finite entries in your data. The only surprising thing here is
that
cmdscale works: it should fail, too. Are you sure that you haven't
done
anything with your data matrix in between, like changed it from
matrix
to a dist object? If the Inf/NaN/NA values are on the diagonal, they
will magically disappear with as.dist. Anyway, if you're able to get
a
metric scaling result, you can manually feed that into isoMDS for
the
initial configuration, and  avoid the check. See ?isoMDS.

> > d.mds<-cmdscale(d)
>
> which seemed to work fine and produce reasonable results. I was
able to
> take the coordinates and run them through a k-means cluster and
the
> results seemed to correctly match the grouping structure I created
for
> this sample analysis.
>
> Cmdscale is for metric scaling, but it seemed to produce the
results
> correctly.
>
> So, did I correctly convert the similarity matrix to the
dissimilarity
> matrix? Second, should I have used cmdscale rather than isoMDS as
I have
> done? Or, is there a way to specify the initial configuration that
I
> have not done correctly.

If you don't know whether you should use

RE: [R] isoMDS

2004-09-09 Thread Jari Oksanen
On Thu, 2004-09-09 at 14:25, Doran, Harold wrote:
> Thank you. I use the same matrix on cmdscale as I did with isoMDS. I
> have reproduced my steps below for clarification if this happens to
> shed any light.
<--- snip --->

Doran,

Your data clarified things. It seems to me now, that your data are not a
a matrix but a data.frame. A problem for an ordinary user is that
data.frames and matrices look identical, but that's only surface: you
shouldn't be shallow but look deep in their souls to see that they are
compeletely different, and therefore isoMDS fails. At least isoMDS gives
just that error for a data.frame, but cmdscale casts data.frame to a
matrix therefore it works.

So the following should work (worked when I tied):

tt <- as.matrix(tt)
isoMDS(tt)

(and you could down to a dist object with tt <- as.dist(tt) which seems
to handle data.frames directly, too).

Then you will still need to avoid the complaint about zero-distances
among points. This means that you have some identical points in your
data, and isoMDS does not like them. This issue was discussed here in
April, 2004 (and many other times). Search archives for the subject
"question on isoMDS".

cheers, jari oksanen
-- 
Jari Oksanen <[EMAIL PROTECTED]>

__
[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


Re: [R] degrees of freedom (lme4 and nlme)

2004-09-09 Thread Ramon Diaz-Uriarte
Dear Elizabeth,

When I looked for this a couple of years ago, I found DF's to be discussed in 
the book by Pinheiro & Bates "Mixed effects models for S and S-Plus", as well 
as the documentation for SAS's PROC MIXED (I believe that the discussion on 
df's on the SAS "manual" was more complete than on the "SAS system for mixed 
models book" ---and I think html versions of the manuals for v 8 of SAS can 
be found on the web). I do not remember specifically, though, whether this 
discussions mentioned explicitly DFs for fixed effects with crossed random 
effects (I do not have the references here now).

Best,

R.

On Wednesday 08 September 2004 19:54, Elizabeth Lynch wrote:
> 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 problems regarding the packages
> >>lme4 and nlme, more specifically in the denominator
> >>degrees of freedom. 
> >
> >The lme4 package is under development and only has a stub for the code
> > that calculates the denominator degrees of freedom.
> >
> >These Wald-type tests using the F and t distributions are approximations
> > at best.  In that sense there is no "correct" degrees of freedom.  I
> > think the more accurate tests may end up being the restricted likelihood
> > ratio tests that Greg Reinsel and his student Mr. Ahn were working on at
> > the time of Greg's death.
> >
> >__
> >[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
>
> hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> __
> [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

-- 
Ramón Díaz-Uriarte
Bioinformatics Unit
Centro Nacional de Investigaciones Oncológicas (CNIO)
(Spanish National Cancer Center)
Melchor Fernández Almagro, 3
28029 Madrid (Spain)
Fax: +-34-91-224-6972
Phone: +-34-91-224-6900

http://ligarto.org/rdiaz
PGP KeyID: 0xE89B3462
(http://ligarto.org/rdiaz/0xE89B3462.asc)

__
[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


RE: [R] isoMDS

2004-09-09 Thread Doran, Harold
Thank you. I use the same matrix on cmdscale as I did with isoMDS. I have reproduced 
my steps below for clarification if this happens to shed any light.
 
Here is the original total matrix (see opening thread if you care how this is created)
 
  a b c d e f g h
a 4 4 2 4 1 2 0 0
b 4 4 2 4 1 2 0 0
c 2 2 4 2 3 2 2 1
d 4 4 2 4 1 2 0 0
e 1 1 3 1 4 3 3 2
f 2 2 2 2 3 4 2 1
g 0 0 2 0 3 2 4 3
h 0 0 1 0 2 1 3 4
 
So, there are 8 items. This matrix indicates that items 1,2, and 4 were always grouped 
together (or viewed as being similar by individuals). I transformed this using 
 
tt<-max(t)-t
 
which results in
  a b c d e f g h
a 0 0 2 0 3 2 4 4
b 0 0 2 0 3 2 4 4
c 2 2 0 2 1 2 2 3
d 0 0 2 0 3 2 4 4
e 3 3 1 3 0 1 1 2
f 2 2 2 2 1 0 2 3
g 4 4 2 4 1 2 0 1
h 4 4 3 4 2 3 1 0
 
When I run isoMDS on this new matrix, it tells me to specify the initial config 
because of the NA/INFs/ But when I perform cmdscale on this same matrix I end up with 
the following results,
 
> bt<-cmdscale(tt);bt
 
 [,1]   [,2]
a -1.79268634 -0.2662750
b -1.79268634 -0.2662750
c -0.02635497  0.5798934
d -1.79268634 -0.2662750
e  1.08978620  0.6265313
f -0.02635497  0.5798934
g  2.20852966  0.2828937
h  2.13245309 -1.2703869
 
The results suggest that items 1,2, and 4 have similar locations as is expected. Also 
items 3 and 6 have similar locations as would also be expected. So, my results seem to 
have been replicated correctly using cmdscale. 
 
I've tried to specify an initial config using isoMDS in a few ways without success, so 
I am surely doing something wrong. So far, I have tried the following:
 
> ll<-isoMDS(tt, y=cmdscale(tt))
 
which tells me "zero or negative distance between objects 1 and 2"
 
> ll<-isoMDS(tt, y=cmdscale(tt, k=2))
 
 
Again, thanks,
 
Harold
 
 

-Original Message- 
From: Jari Oksanen [mailto:[EMAIL PROTECTED] 
Sent: Thu 9/9/2004 4:26 AM 
To: Doran, Harold 
Cc: Prof Brian Ripley; R-News 
Subject: RE: [R] isoMDS



On Wed, 2004-09-08 at 21:31, 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
>
> Where tt is the similarity matrix. With this, I tried isoMDS as follows:
>
> > tt.mds<-isoMDS(d)
>
> and I get the following error message.
>
> Error in isoMDS(d) : An initial configuration must be supplied with
> NA/Infs in d. I was a little confused on exactly how to specify this
> initial config. So, from here I ran cmdscale on d as
>
This error message is quite informative: you have either missing or
non-finite entries in your data. The only surprising thing here is that
cmdscale works: it should fail, too. Are you sure that you haven't done
anything with your data matrix in between, like changed it from matrix
to a dist object? If the Inf/NaN/NA values are on the diagonal, they
will magically disappear with as.dist. Anyway, if you're able to get a
metric scaling result, you can manually feed that into isoMDS for the
initial configuration, and  avoid the check. See ?isoMDS.

> > d.mds<-cmdscale(d)
>
> which seemed to work fine and produce reasonable results. I was able to
> take the coordinates and run them through a k-means cluster and the
> results seemed to correctly match the grouping structure I created for
> this sample analysis.
>
> Cmdscale is for metric scaling, but it seemed to produce the results
> correctly.
>
> So, did I correctly convert the similarity matrix to the dissimilarity
> matrix? Second, should I have used cmdscale rather than isoMDS as I have
> done? Or, is there a way to specify the initial configuration that I
> have not done correctly.

If you don't know whether you should use isoMDS or cmdscale, you
probably should use cmdscale. If you know, things are different.
Probably isoMDS gives you `better'(TM) results, but it is more
complicated to handle.

cheers, jari oksanen
--
Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
Ph. +358 8 5531526, cell +358 40 5136529, fax +358 8 5531061
email [EMAIL PROTECTED], homepage http://cc.oulu.fi/~jarioksa/




[[alternative HTML version deleted]]

__
[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


Re: [R] Installing packages on OS X

2004-09-09 Thread Prof Brian Ripley
Here's my guess:

R CMD INSTALL installs to .Library, and does not look at R_LIBS unless set 
in its environment.

install.packages() installs at .libPaths()[1], and uses all the library 
trees available.  So if you have R_LIBS set in ~/.Renviron (as I have), or 
.libPaths() set in .Rprofile or elsewhere, you need to set R_LIBS in your 
shell before calling R CMD check (l/case).

On 9 Sep 2004, Jari Oksanen wrote:

> On Wed, 2004-09-08 at 21:25, hadley wickham wrote:
> > 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 depends on packages I have installed through the gui.
> > 
> > Is this a problem with my installation of R, or a known limitation?
> > (there is no mention of this in the Mac OS X faq, however, the entire
> > section entitled "Installing packages" is blank).
> > 
> It is in some other FAQ... Unfortunately, I don't have a Mac available
> now, so I can't check. However, seek for "environmental variables" and
> "setting library paths" in some other R FAQ or R
> Administration/Installation guide. There will you find a description of
> things you should do. It is just as crystal clear as unix man pages:
> everything is clear *after* you know what is said there, but you may
> have hard time noticing this clarity.
> 
> I solved this problem some months ago after a long search among the
> official documentation. So it is documented, but well hidden.
> 
> I may have a look at a machine where I solved this in the evening
> (UTC+3), if you won't get solution before that.
> 
> cheers, jari oksanen
> 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


AW: [R] Indexing dataframe

2004-09-09 Thread TEMPL Matthias
Hi,

Use
Newdata <- subset(d2004, select=-c(concentration,stade))

See ?subset for details

Best,
Matthias

> -Ursprüngliche Nachricht-
> Von: Jacques VESLOT [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 09. September 2004 12:38
> An: [EMAIL PROTECTED]
> Betreff: [R] Indexing dataframe
> 
> 
> I am sorry to ask such question, but I can't find a solution...
> 
> I have a dataframe 'd2004' and I want to remove two columns: 
> 'd2004$concentration' and 'd2004$stade".
> 
> I could do it just as follows:
> 
> > names(d2004)
> 
>  [1] "Localite"   "Date"   "parcelle"   "maille"
> "presence.plant" "concentration"  "stade.culture"
>  [8] "stade"  "Trou"   "Horizon""Profondeur"
> 
> > d2004 <- d2004[, -c(6, 8)]
> 
> but I'd like to use column names (to avoid finding column 
> numbers each time).
> 
> I cannot find an easy way to operate...
> 
> I wonder why that works:
> > d2004[, "concentration"]
> 
> and this don't:
> > d2004 <- d2004[, -c("concentration", "stade")]
> 
> Thanks...
> 
> Jacques VESLOT / CIRAD
> 
> __
> [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
>

__
[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


Re: [R] Indexing dataframe

2004-09-09 Thread Thomas Petzoldt
Jacques VESLOT wrote:
I am sorry to ask such question, but I can't find a solution...
I have a dataframe 'd2004' and I want to remove two columns:
'd2004$concentration' and 'd2004$stade".
d2004$concentration <- NULL
d2004$stade <- NULL
Hope it helps!
Thomas P.
__
[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


Re: [R] Handling the windows clipboard/32KB limit

2004-09-09 Thread Prof Brian Ripley
On Thu, 9 Sep 2004, Ritter, Christian C MCIL-CTANL/S wrote:

> (R 1.9.1; Windows 2000;)
> 
> I'm just comparing ease of use, speed, etc for methods of transferring
> data frames in the Excel, MySQL, R triangle. It turns out that going
> from Excel to R (when doing this carefully). Using the clipboard is
> actually quite fast and efficient (2 seconds for transferring 120 000
> cells on a common desktop computer as compared to much longer for going
> the RODBC route, maybe also substantially longer using the R(D)COM
> route). Other advantage: Relatively flexible handling of missing values
> from Excel which may be "empty", "#N/A", etc. 

You clearly haven't looked at RODBC carefully as that has equally flexible 
handling.

> So I thought I would also look at ways of going back via the clipboard.
> There I'm hitting a funny snag. The documentation explains that there is
> a 32KB limit on writing to the clipboard. This may make sense as a
> default, but does it make sense as a hard restriction?

I guess you are talking about using file="clipboard" in a connection, but
there is also writeClipboard, whose documentation does not mention a 
limit.

My Windows documentation says there is a 32Kb limit on the size of an 
text object put on the clipboard, and I believe that is the case for
Windows 95/98/ME at least.  So a hard restriction makes sense.

> Any ideas of getting around this limitation (besides cumbersome R-code
> buffering/breaking up the frame to send into small pieces to be
> collected and assembled in Excel?

R is Open Source, so this is an opportunity for you to experiment, test on 
various versions of Windows and contribute a patch back to the R project.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
[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


[R] Indexing dataframe

2004-09-09 Thread Jacques VESLOT
I am sorry to ask such question, but I can't find a solution...

I have a dataframe 'd2004' and I want to remove two columns:
'd2004$concentration' and 'd2004$stade".

I could do it just as follows:

> names(d2004)

 [1] "Localite"   "Date"   "parcelle"   "maille"
"presence.plant" "concentration"  "stade.culture"
 [8] "stade"  "Trou"   "Horizon""Profondeur"

> d2004 <- d2004[, -c(6, 8)]

but I'd like to use column names (to avoid finding column numbers each
time).

I cannot find an easy way to operate...

I wonder why that works:
> d2004[, "concentration"]

and this don't:
> d2004 <- d2004[, -c("concentration", "stade")]

Thanks...

Jacques VESLOT / CIRAD

__
[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


[R] filling patterns in image and examples

2004-09-09 Thread Marta Rufino
Dear R-users,

I would like to do a image plot with patterns filling the squares instead of colors. 
How can I do it?

Is there manuals with examples of image.plot? I search but could not find many.

Thank you
All the best
Marta
[[alternative HTML version deleted]]

__
[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


Re: [R] rodbc windows doesn't find dsn

2004-09-09 Thread Jack Tanner
Prof Brian Ripley wrote:
 'odbcConnect' establishes a connection to the dsn, and
 'odbcDriverConnect' allows a more flexible specification via a
 connection string.  'odbcConnect' uses the connection string
 '"DSN=dsn;UID=uid;PWD=pwd"'. 
The point here seems to be that odbcConnect is meant to provide a useful 
default, and odbcDriverConnect allows one to override that default. 
Could somebody shed some light on why '"DSN=dsn;UID=;PWD="' is 
considered a more useful default than '"DSN=dsn;"'?

__
[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


Re: [R] Installing packages on OS X

2004-09-09 Thread Jari Oksanen
On Wed, 2004-09-08 at 21:25, hadley wickham wrote:
> 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 depends on packages I have installed through the gui.
> 
> Is this a problem with my installation of R, or a known limitation?
> (there is no mention of this in the Mac OS X faq, however, the entire
> section entitled "Installing packages" is blank).
> 
It is in some other FAQ... Unfortunately, I don't have a Mac available
now, so I can't check. However, seek for "environmental variables" and
"setting library paths" in some other R FAQ or R
Administration/Installation guide. There will you find a description of
things you should do. It is just as crystal clear as unix man pages:
everything is clear *after* you know what is said there, but you may
have hard time noticing this clarity.

I solved this problem some months ago after a long search among the
official documentation. So it is documented, but well hidden.

I may have a look at a machine where I solved this in the evening
(UTC+3), if you won't get solution before that.

cheers, jari oksanen
-- 
Jari Oksanen <[EMAIL PROTECTED]>

__
[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


[R] Handling the windows clipboard/32KB limit

2004-09-09 Thread Ritter, Christian C MCIL-CTANL/S
(R 1.9.1; Windows 2000;)

I'm just comparing ease of use, speed, etc for methods of  transferring data frames in 
the Excel, MySQL, R triangle. It turns out that going from Excel to R (when doing this 
carefully). Using the clipboard is actually quite fast and efficient (2 seconds for 
transferring 120 000 cells on a common desktop computer as compared to much longer for 
going the RODBC route, maybe also substantially longer using the R(D)COM route). Other 
advantage: Relatively flexible handling of missing values from Excel which may be 
"empty", "#N/A", etc. So I thought I would also look at ways of going back via the 
clipboard. There I'm hitting a funny snag. The documentation explains that there is a 
32KB limit on writing to the clipboard. This may make sense as a default, but does it 
make sense as a hard restriction? Any ideas of getting around this limitation (besides 
cumbersome R-code buffering/breaking up the frame to send into small pieces to be 
collected and assembled in Excel?

Chris

P.S. (some details for those who are interested)
Here is what I use to go from Excel to R (which in turn uses the RExcel add in to send 
the R call, but not the data):
Range("Alldata").Copy
Call 
RRun("Alldata<-read.table(file=file(description='clipboard'),sep='\t',na.strings=c('#N/A',''),header=TRUE,comment.char=';')")
 There are two funny things about this:
1. It's very fast.
2. (this may be bug or feature depending on view point): Range("Alldata").Copy is 
filter sensitive. So, if I use a common filter to select a part of Alldata in Excel, 
executing the code will transfer only this part. If we turn this volatile and add a 
few lines for some meaninful analysis which reports itself back or displays itself in 
a graph, we arrive at an interesting level of animation).

Here is what I thought of using for going back:
write.table(Alldata,file=con<-file(description='clipboard',open="w"),sep='\t',na='#N/A',col.names=TRUE,row.names=FALSE);close(con)

And this works great if Alldata is small (less than 32KB when converted to text). It 
no longer works if Alldata is larger (only the first 32KB go on the clipboard). 



Christian Ritter
Functional Specialist Statistics
Shell Coordination Centre S.A.
Monnet Centre International Laboratory, Avenue Jean Monnet 1, B-1348 Louvain-La-Neuve, 
Belgium

Tel: +32 10 477  349 Fax: +32 10 477 219
Email: [EMAIL PROTECTED]
Internet: http://www.shell.com/chemicals


[[alternative HTML version deleted]]

__
[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


Re: [R] isoMDS

2004-09-09 Thread Jari Oksanen
On Thu, 2004-09-09 at 04:53, Kjetil Brinchmann Halvorsen wrote:

> >
> Mardia, kent & Bibby defines the "standard transformation" from a 
> similarity matrix to a dissimilarity
> (distance) matrix by
> 
> d_rs <-  sqrt( c_rr -2*c_rs + c_ss)
> 
> where c_rs are the similarities. This assures the diagonal of the 
> dissimilarity matrix to be zero.
> You could try that.
> 
In R notation, this would be

sim2dist <- function(x) 
 as.dist(sqrt(outer(diag(x), diag(x), "+") - 2*x))

Mardia, Kent & Bibby indeed passingly say that this is a `standard
transformation' (page 403). However, it is really a canonical way only
if diagonal elements in similarity matrix are sums of squares, and
off-diagonal elements are cross products. In that case the `standard
transformation' gives you Euclidean distances (or if you have
variances/covariances or ones/correlations it gives you something
similar). However, it is no standard if your similarities are something
else, and cannot be transformed into Euclidean distances.

However, in isoMDS this *may* not matter, since NMDS uses only rank
order of dissimilarities, and any transformation giving dissimilarities
in the same rank order *may* give similar results. The statement was
conditions ("may"), since isoMDS uses cmdscale for the starting
configuration, and cmdscale will give different results with different
transformations. So isoMDS may stop in different (local) optima. Setting
`tol' parameter low enough in isoMDS (see ?isoMDS) helped in a couple of
cases I tried, and the results were practically identical with different
transformations. So it doesn't matter too much how you change your
similarities to dissimilarities, since isoMDS indeed treats them as
dissimilarities (but cmdscale treats them as distances).

cheers, jari oksanen
-- 
J.Oksanen, Oulu, Finland.
"Object-oriented programming is an exceptionally bad idea which could
only have originated in California." E. Dijkstra

__
[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


RE: [R] isoMDS

2004-09-09 Thread Jari Oksanen
On Wed, 2004-09-08 at 21:31, 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
> 
> Where tt is the similarity matrix. With this, I tried isoMDS as follows:
> 
> > tt.mds<-isoMDS(d)
> 
> and I get the following error message. 
> 
> Error in isoMDS(d) : An initial configuration must be supplied with
> NA/Infs in d. I was a little confused on exactly how to specify this
> initial config. So, from here I ran cmdscale on d as
> 
This error message is quite informative: you have either missing or
non-finite entries in your data. The only surprising thing here is that
cmdscale works: it should fail, too. Are you sure that you haven't done
anything with your data matrix in between, like changed it from matrix
to a dist object? If the Inf/NaN/NA values are on the diagonal, they
will magically disappear with as.dist. Anyway, if you're able to get a
metric scaling result, you can manually feed that into isoMDS for the
initial configuration, and  avoid the check. See ?isoMDS.

> > d.mds<-cmdscale(d)
> 
> which seemed to work fine and produce reasonable results. I was able to
> take the coordinates and run them through a k-means cluster and the
> results seemed to correctly match the grouping structure I created for
> this sample analysis.
> 
> Cmdscale is for metric scaling, but it seemed to produce the results
> correctly. 
> 
> So, did I correctly convert the similarity matrix to the dissimilarity
> matrix? Second, should I have used cmdscale rather than isoMDS as I have
> done? Or, is there a way to specify the initial configuration that I
> have not done correctly.

If you don't know whether you should use isoMDS or cmdscale, you
probably should use cmdscale. If you know, things are different.
Probably isoMDS gives you `better'(TM) results, but it is more
complicated to handle.

cheers, jari oksanen
-- 
Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
Ph. +358 8 5531526, cell +358 40 5136529, fax +358 8 5531061
email [EMAIL PROTECTED], homepage http://cc.oulu.fi/~jarioksa/

__
[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