Re: [R] Dispersion parameter in Neg Bin GLM

2005-06-30 Thread Prof Brian Ripley

On Thu, 30 Jun 2005, Edward McNeil wrote:

 Hi, Can someone tell me if it is possible to set the dispersion 
 parameter constant when fitting a negative binomial glm in R? I've 
 looked at the documentation and can't find the appropriate argument to 
 pass. In STATA I can type: nbreg depvar [indepvar...], offset(offset) 
 dispersion(constant). Thank you

I had to read the STATA documentation.  nbreg does not claim to fit a `Neg 
Bin GLM' and with option dispersion(constant) it is not fitting a GLM at 
all.  See http://www.stata.com/help.cgi?nbreg and
http://www.stata.com/support/faqs/stat/nbreg1.html

So I think you need to think carefully about what you actually want, 
as STATA is not doing what you asked for.

If I had to fit the STATA model in R I would directly maximize the 
likelihood, modifying the example code in MASS4 chapter 16.

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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] moving correlation coef ?

2005-06-30 Thread vincent
[EMAIL PROTECTED] a écrit :

 One common weighting scheme is exponentially weighted, i.e., wt =
 L^(0:m) ,
 where 0  L = 1 .
 
 David L. Reiner
 
 p.s.
 If your question is coming from a financial application, you might be
 interested in the R-sig-finance list, as well as reading the RiskMetrics
 (r)
 document Return to RiskMetrics: The Evolution of a Standard, by Jorge
 Mina and Jerry Yi Xiao (available at their site, after a free
 registration) where exponentially weighted moving statistics are
 discussed at length.

Thank you for the advice and for the link.
Vincent

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


答复: [R] fail in adding library i n new version.

2005-06-30 Thread Ivy_Li
Dear Gabor,
Thank your for helping me so much!
I have loaded R the newest version 2.1.1. Then I setup it in the path 
of D:\program files\R\ 
1. unpack tools.zip into c:\cygwin
2. install Active perl in c:\Perl
3. install the mingw32 in c:\mingwin
4. add c:\cygwin; c:\mingwin\bin in Control Panel - System - Advanced - 
Environment Variables - Path - Variable (In your previous mail, you said 
put these at the beginning of the path, I don't understand what is your 
meaning. Which path?) 

5. I tried an library example. I set a new folder named example in the 
c:\MyRpackages\. And In the example folder, it contain an DESCRIPTION 
file and R folder. in R folder contain a example file. I just write very 
simple script in it:
a-2; b-3;sum - sum(a,b); print(paste(a,+,b,=,sum))

6. I opened the DOS environment. Into the D:\  Type the following code:
cd \Program Files\R\rw2010
But I don't understand the second line you writed in your previous mail: bin\R 
cmd install /MyRPackages/example

I am not sure that I set up R in D:\ But I do so much action in C:\  Did I do 
the correct action? Did I do the action into the correct path?

I still need your and others help. Thank you very much!



-原始邮件-
发件人: Gabor Grothendieck [mailto:[EMAIL PROTECTED]
发送时间: 2005年6月6日 10:21
收件人: Ivy_Li
抄送: r-help@stat.math.ethz.ch
主题: Re: [R] fail in adding library in new version.


On 6/5/05, Ivy_Li [EMAIL PROTECTED] wrote:
 Hello everybody,
Could I consult you a question?
I always use R old version 1.9.1 . Because I can not add my library 
 into the new version 2.0.0 by the same method as old version.

Getting the latest version of R is strongly recommended.  The suggestions
below all assume the latest version and may or may not work if you do
not upgrade.

 *   I have read the webpage http://www.stats.ox.ac.uk/pub/Rtools
 *   Download the tools.zip
 *   Unpack tools.zip into c:\cygwin
 *   Install Active Perl in c:\Perl
 *   Install the mingw32 port of gcc in c:\mingwin
 *   Then go to Control Panel - System - Advanced - Environment 
 Variables - Path - Variable Balue add ;c:\cygwin;c:\mingwin\bin

You may need to put these at the beginning of the path rather than the end.
Also just as a check enter 
 path
at the console to make sure that you have them.  You will likely
have to start a new console session and possibly even reboot.

Also you need the Microsoft Help Compiler, hhc.  Suggest
you reread the material on which tools you need.

 *   Save my library example into c:\MyRpackages\ . But I am not sure 
 what type it is, is it need suffix? And I don't what its content, just my 
 function script, no special format?

In MyRPackages you would have a folder called example, in your case,
that contains the package.  Within folder example, you would have the
DESCRIPTION file, the R folder, etc.

 *   Then I don't know where should I do this step: Type R CMD INSTALL 
 --build example. Need I run R first?

You don't have to run R first.  You do need to make sure that R.exe can
be found on your path or else use the absolute path name in referring to R.
For example, if your path does not include R you could do something like this:

cd \Program Files\R\rw2010
bin\R cmd install /MyRPackages/example

Be sure to use forward slashes where shown above and backslashes
where shown.

So There is a error after I do this step.  It said it can not find 
 somethig. I don't which step is wrong. It costed me much time.
 

Try all these suggestions including upgrading R and if that does not work
try posting screen dumps of the actual errors you are getting.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

RE : [R] Dispersion parameter in Neg Bin GLM

2005-06-30 Thread Lesnoff, Matthieu \(ILRI\)
Edward, you also can use the package aod on CRAN, see the help page of the 
function negbin.
 
Best
 
Matthieu
 
An example:
 
 library(aod)
 data(dja)
 negbin(y ~ group + offset(log(trisk)), ~group, dja, fixpar = list(4, 0))

Negative-binomial model
---
negbin(formula = y ~ group + offset(log(trisk)), random = ~group, 
data = dja, fixpar = list(4, 0))
Convergence was obtained after 113 iterations.
Fixed-effect coefficients:
Estimate Std. Error z value Pr( |z|)
(Intercept)  -0.5526 0.2277 -2.42670.0152
groupTREAT   -1.0205 0.2598 -3.9287 1e-4
Overdispersion coefficients:
  Estimate Std. Error z value Pr( z)
phi.groupCTRL   0.8287  0.412  2.0117  0.0221
Overdispersion coefficients set to fixed values:
   Value
phi.groupTREAT 0
Log-likelihood = -121.149; nbpar = 3; df.residual = 72; Deviance = 111.826; AIC 
= 248.297

 
 
 



De: [EMAIL PROTECTED] de la part de Edward McNeil
Date: jeu. 6/30/2005 8:50
À: [EMAIL PROTECTED]
Objet : [R] Dispersion parameter in Neg Bin GLM



Hi,
Can someone tell me if it is possible to set the dispersion parameter constant 
when fitting a negative binomial glm in R? I've looked at the documentation and 
can't find the appropriate argument to pass.
In STATA I can type: nbreg depvar [indepvar...], offset(offset) 
dispersion(constant).
Thank you

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Memory Management under Linux: Problems to allocate large amounts of data

2005-06-30 Thread Dubravko Dolic
Dear Prof. Ripley.

Thank You for Your quick answer. Your right by assuming that we run R on a 
32bit System. My technician tried to install R on a emulated 64bit Opteron 
machine which led into some trouble. Maybe because the Opteron includes a 32bit 
Processor which emulates 64bit (AMD64 x86_64). As You seem to have good 
experience with running R on a 64bit OS I feel encouraged to have another try 
for this.



-Ursprüngliche Nachricht-
Von: Prof Brian Ripley [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 29. Juni 2005 15:18
An: Dubravko Dolic
Cc: r-help@stat.math.ethz.ch
Betreff: Re: [R] Memory Management under Linux: Problems to allocate large 
amounts of data

Let's assume this is a 32-bit Xeon and a 32-bit OS (there are 
64-bit-capable Xeons).  Then a user process like R gets a 4GB address 
space, 1GB of which is reserved for the kernel.  So R has a 3GB address 
space, and it is trying to allocate a 2GB contigous chunk.  Because of 
memory fragmentation that is quite unlikely to succeed.

We run 64-bit OSes on all our machines with 2GB or more RAM, for this 
reason.

On Wed, 29 Jun 2005, Dubravko Dolic wrote:

 Dear Group

 I'm still trying to bring many data into R (see older postings). After 
 solving some troubles with the database I do most of the work in MySQL. 
 But still I could be nice to work on some data using R. Therefore I can 
 use a dedicated Server with Gentoo Linux as OS hosting only R. This 
 Server is a nice machine with two CPU and 4GB RAM which should do the 
 job:

 Dual Intel XEON 3.06 GHz
 4 x 1 GB RAM PC2100 CL2
 HP Proliant DL380-G3

 I read the R-Online help on memory issues and the article on garbage 
 collection from the R-News 01-2001 (Luke Tierney). Also the FAQ and some 
 newsgroup postings were very helpful on understanding memory issues 
 using R.

 Now I try to read data from a database. The data I wanted to read 
 consists of 158902553 rows and one field (column) and is of type 
 bigint(20) in the database. I received the message that R could not 
 allocate the 2048000 Kb (almost 2GB) sized vector. As I have 4BG of RAM 
 I could not imagine why this happened. In my understanding R under Linux 
 (32bit) should be able to use the full RAM. As there is not much space 
 used by OS and R as such (free shows the use of app. 670 MB after 
 dbSendQuery and fetch) there are 3GB to be occupied by R. Is that 
 correct?

Not really.  The R executable code and the Ncells are already in the 
address space, and this is a virtual memory OS, so the amount of RAM is 
not relevant (it would still be a 3GB limit with 12GB of RAM).

 After that I started R by setting n/vsize explicitly

 R --min-vsize=10M --max-vsize=3G --min-nsize=500k --max-nsize=100M

 mem.limits()
nsize vsize
 104857600NA

 and received the same message.


 A garbage collection delivered the following information:

 gc()
 used (Mb) gc trigger   (Mb) limit (Mb)  max used   (Mb)
 Ncells 217234  5.9 50   13.4   280050   13.4
 Vcells  87472  0.7  157650064 1202.8   3072 196695437 1500.7


 Now I'm at a loss. Maybe anyone could give me a hint where I should read 
 further or which Information can take me any further

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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Memory Management under Linux: Problems to allocate large amounts of data

2005-06-30 Thread Prof Brian Ripley

On Thu, 30 Jun 2005, Dubravko Dolic wrote:


Dear Prof. Ripley.

Thank You for Your quick answer. Your right by assuming that we run R on 
a 32bit System. My technician tried to install R on a emulated 64bit 
Opteron machine which led into some trouble. Maybe because the Opteron 
includes a 32bit Processor which emulates 64bit (AMD64 x86_64). As You 
seem to have good experience with running R on a 64bit OS I feel 
encouraged to have another try for this.


It should work out of the box on an Opteron Linux systen: it does for 
example on FC3 and SuSE 9.x.  Some earlier Linux distros for x86_64 are
not fully 64-bit, but we ran R on FC2 (although some packages could not be 
installed).


Trying to build a 32-bit version of R on FC3 does not work for me: the 
wrong libgcc_s is found.  (One might want a 32-bit version for speed on 
small tasks.)



-Ursprüngliche Nachricht-
Von: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 29. Juni 2005 15:18
An: Dubravko Dolic
Cc: r-help@stat.math.ethz.ch
Betreff: Re: [R] Memory Management under Linux: Problems to allocate large 
amounts of data

Let's assume this is a 32-bit Xeon and a 32-bit OS (there are
64-bit-capable Xeons).  Then a user process like R gets a 4GB address
space, 1GB of which is reserved for the kernel.  So R has a 3GB address
space, and it is trying to allocate a 2GB contigous chunk.  Because of
memory fragmentation that is quite unlikely to succeed.

We run 64-bit OSes on all our machines with 2GB or more RAM, for this
reason.


--
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__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] request/suggestion: modified names

2005-06-30 Thread Ritter, Christian C GSMCIL-GSTMS/2
For some time now I use a modified version of names (extract direction) of the 
following type:
Names-
function (x,filter=^)
{
grep(filter,names(x),value=TRUE)
}

Request:
Has anyone already written a version which goes the other way (that is, which 
allows assignment of the type Names(x,filter)-...). Naive versions are 
obvious, but I think something would have to be done to check validity. So if 
anyone has already done it for me, I would be very happy if you could share it. 
Such a function would be quite useful when working with large data frames (as I 
typically do) and need to edit names in a convenient way.

Suggestion:
Wouldn't the filter argument make sense in general, that is in names and not 
only in a custom version Names?

Have a nice day,



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]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] installation error

2005-06-30 Thread orkun
hello

when I follow this procedure:
~~
rS - http://godel.cs.bilgi.edu.tr/mirror/cran/src/contrib/;
install.packages(c(Matrix), repos=rS, dependencies=TRUE)
~~

installation gives this error:
~
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package 'Matrix'
** Removing '/usr/local/lib/R/site-library/Matrix'
** Restoring previous '/usr/local/lib/R/site-library/Matrix'

The downloaded packages are in
/tmp/RtmpPx5hkE/downloaded_packages
Warning message:
installation of package 'Matrix' had non-zero exit status in: 
install.packages(c(Matrix), repos = rS, dependencies = TRUE)
~~
I am using debian and  had installed R in debian way.

what might possible solutions be ?

regards

Ahmet Temiz



__
XamimeLT - installed on mailserver for domain @deprem.gov.tr
Queries to: [EMAIL PROTECTED]
__
The views and opinions expressed in this e-mail message are ...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: RE : [R] Dispersion parameter in Neg Bin GLM

2005-06-30 Thread Prof Brian Ripley
This does not appear to be the same model as STATA.

Your model (as documented) has dispersion (var/mean) of 1 + phi*mu, so you 
need to constrain phi = a/mu to get a constant dispersion.  The output 
shown is not at all consistent with that.

On Thu, 30 Jun 2005, Lesnoff, Matthieu (ILRI) wrote:

 Edward, you also can use the package aod on CRAN, see the help page of 
 the function negbin.

 Best

 Matthieu

 An example:

 library(aod)
 data(dja)
 negbin(y ~ group + offset(log(trisk)), ~group, dja, fixpar = list(4, 0))

 Negative-binomial model
 ---
 negbin(formula = y ~ group + offset(log(trisk)), random = ~group,
data = dja, fixpar = list(4, 0))
 Convergence was obtained after 113 iterations.
 Fixed-effect coefficients:
Estimate Std. Error z value Pr( |z|)
 (Intercept)  -0.5526 0.2277 -2.42670.0152
 groupTREAT   -1.0205 0.2598 -3.9287 1e-4
 Overdispersion coefficients:
  Estimate Std. Error z value Pr( z)
 phi.groupCTRL   0.8287  0.412  2.0117  0.0221
 Overdispersion coefficients set to fixed values:
   Value
 phi.groupTREAT 0
 Log-likelihood = -121.149; nbpar = 3; df.residual = 72; Deviance = 111.826; 
 AIC = 248.297

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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: 答复: [R] fail in adding library in new version.

2005-06-30 Thread Uwe Ligges
Ivy_Li wrote:

 Dear Gabor, Thank your for helping me so much! I have loaded R the
 newest version 2.1.1. Then I setup it in the path of D:\program
 files\R\ 1. unpack tools.zip into c:\cygwin 2. install Active perl in
 c:\Perl 3. install the mingw32 in c:\mingwin 4. add 
  c:\cygwin; c:\mingwin\bin in Control Panel - System - Advanced -

No, without the blank(!!!): c:\cygwin;c:\mingwin\bin


 Environment Variables - Path - Variable (In your previous mail,
 you said put these at the beginning of the path, I don't understand
 what is your meaning. Which path?)

Well, the PATH variable already contains a couple of paths, add the two 
given above in front of all others, separated by ;.
Don't see what is difficult to understand here.


 5. I tried an library example. I set a new folder named example in
 the c:\MyRpackages\. And In the example folder, it contain an
 DESCRIPTION file and R folder. in R folder contain a example
 file. I just write very simple script in it: a-2; b-3;sum -
 sum(a,b); print(paste(a,+,b,=,sum))
 
 6. I opened the DOS environment. Into the D:\  Type the following
 code: cd \Program Files\R\rw2010 But I don't understand the second
 line you writed in your previous mail: bin\R cmd install
 /MyRPackages/example

Then you should read the R Installation and Administration manual, you 
missed it, obviously!


 I am not sure that I set up R in D:\ But I do so much action in C:\
 Did I do the correct action? Did I do the action into the correct
 path?
 
 I still need your and others help. Thank you very much!


I think you need to read the manuals before, and additionally seek 
advice by a local Windows expert who can tell you relationships between 
paths, environment variables, executable files etc.

Uwe Ligges


 
 
 -原始邮件- 发件人: Gabor Grothendieck
 [mailto:[EMAIL PROTECTED] 发送时间: 2005年6月6日 10:21 收件人: Ivy_Li 抄
 送: r-help@stat.math.ethz.ch 主题: Re: [R] fail in adding library in new
 version.
 
 
 On 6/5/05, Ivy_Li [EMAIL PROTECTED] wrote:
 
 Hello everybody, Could I consult you a question? I always use R old
 version 1.9.1 . Because I can not add my library into the new
 version 2.0.0 by the same method as old version.
 
 
 Getting the latest version of R is strongly recommended.  The
 suggestions below all assume the latest version and may or may not
 work if you do not upgrade.
 
 
 *   I have read the webpage
 http://www.stats.ox.ac.uk/pub/Rtools *   Download the
 tools.zip *   Unpack tools.zip into c:\cygwin *   Install
 Active Perl in c:\Perl *   Install the mingw32 port of gcc in
 c:\mingwin *   Then go to Control Panel - System - Advanced
 - Environment Variables - Path - Variable Balue add
 ;c:\cygwin;c:\mingwin\bin
 
 
 You may need to put these at the beginning of the path rather than
 the end. Also just as a check enter path at the console to make sure
 that you have them.  You will likely have to start a new console
 session and possibly even reboot.
 
 Also you need the Microsoft Help Compiler, hhc.  Suggest you reread
 the material on which tools you need.
 
 
 *   Save my library example into c:\MyRpackages\ . But I am
 not sure what type it is, is it need suffix? And I don't what its
 content, just my function script, no special format?
 
 
 In MyRPackages you would have a folder called example, in your case, 
 that contains the package.  Within folder example, you would have the
  DESCRIPTION file, the R folder, etc.
 
 
 *   Then I don't know where should I do this step: Type R CMD
 INSTALL --build example. Need I run R first?
 
 
 You don't have to run R first.  You do need to make sure that R.exe
 can be found on your path or else use the absolute path name in
 referring to R. For example, if your path does not include R you
 could do something like this:
 
 cd \Program Files\R\rw2010 bin\R cmd install /MyRPackages/example
 
 Be sure to use forward slashes where shown above and backslashes 
 where shown.
 
 
 So There is a error after I do this step.  It said it can not find
 somethig. I don't which step is wrong. It costed me much time.
 
 
 
 Try all these suggestions including upgrading R and if that does not
 work try posting screen dumps of the actual errors you are getting.
 
 __ 
 R-help@stat.math.ethz.ch mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
 posting guide! http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] deal package

2005-06-30 Thread Uwe Ligges
Weiwei Shi wrote:

 Hi,
 I am wondering if anyone here used deal package in R to do the
 bayesian network. I am curious about its scalability: how many
 variables and how many observations can it handle in a reasonable
 time. If you have some good experience, please share your data
 configurations.

Questions like this should better be sent to the package mainatiner or 
author of the corresponding function, who probably has more experiences 
and background knowledge on the code than (almost?) all other readers of 
this list.

Uwe Ligges


 
 
 thanks,
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Memory Management under Linux: Problems to allocate large amounts of data

2005-06-30 Thread Peter Dalgaard
Prof Brian Ripley [EMAIL PROTECTED] writes:

 On Thu, 30 Jun 2005, Dubravko Dolic wrote:
 
  Dear Prof. Ripley.
 
  Thank You for Your quick answer. Your right by assuming that we run
  R on a 32bit System. My technician tried to install R on a emulated
  64bit Opteron machine which led into some trouble. Maybe because the
  Opteron includes a 32bit Processor which emulates 64bit (AMD64
  x86_64). As You seem to have good experience with running R on a
  64bit OS I feel encouraged to have another try for this.

Er? What is an emulated Opteron machine? Opterons are 64 bit.
 
 It should work out of the box on an Opteron Linux systen: it does for
 example on FC3 and SuSE 9.x.  Some earlier Linux distros for x86_64 are
 not fully 64-bit, but we ran R on FC2 (although some packages could
 not be installed).
 
 Trying to build a 32-bit version of R on FC3 does not work for me: the
 wrong libgcc_s is found.  (One might want a 32-bit version for speed
 on small tasks.)

On FC4 it is even easier: yum install R R-devel gets you a working R
2.1.1 straight away (from Fedora Extras). Only if you want to include
hardcore optimized BLAS or do not like the performance hit of having R
as a shared library do you need to compile at all.

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] plot (log scale on y-axis)

2005-06-30 Thread Uwe Ligges
Jing Shen wrote:

 I am planning to plot my data on log scale (y-axis). There is a
 parameter in plot function, which is
 plot( ..., log=y, ...)
 While, the problem is that it is with base of e. Is there a way to let
 me change it to 10 instead of e?


But this is simpley a fixed multiple, and the axis annotation shows the 
true values. Hence there would be absolutely NO difference in the plot, 
and we do not need to add redundancy here!

Uwe Ligges


 Thanks
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Memory Management under Linux: Problems to allocate large amounts of data

2005-06-30 Thread Dubravko Dolic
Dear Peter,

AMD64 and EM64T (Intel) were designed as 32bit CPUs which are able to address 
64bit registers. So they are nut pure 64bit Systems. This is why they are 
much cheaper than a real 64bit machine.

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Peter Dalgaard
Gesendet: Donnerstag, 30. Juni 2005 11:48
An: Prof Brian Ripley
Cc: Dubravko Dolic; r-help@stat.math.ethz.ch
Betreff: Re: [R] Memory Management under Linux: Problems to allocate large 
amounts of data

Prof Brian Ripley [EMAIL PROTECTED] writes:

 On Thu, 30 Jun 2005, Dubravko Dolic wrote:
 
  Dear Prof. Ripley.
 
  Thank You for Your quick answer. Your right by assuming that we run
  R on a 32bit System. My technician tried to install R on a emulated
  64bit Opteron machine which led into some trouble. Maybe because the
  Opteron includes a 32bit Processor which emulates 64bit (AMD64
  x86_64). As You seem to have good experience with running R on a
  64bit OS I feel encouraged to have another try for this.

Er? What is an emulated Opteron machine? Opterons are 64 bit.
 
 It should work out of the box on an Opteron Linux systen: it does for
 example on FC3 and SuSE 9.x.  Some earlier Linux distros for x86_64 are
 not fully 64-bit, but we ran R on FC2 (although some packages could
 not be installed).
 
 Trying to build a 32-bit version of R on FC3 does not work for me: the
 wrong libgcc_s is found.  (One might want a 32-bit version for speed
 on small tasks.)

On FC4 it is even easier: yum install R R-devel gets you a working R
2.1.1 straight away (from Fedora Extras). Only if you want to include
hardcore optimized BLAS or do not like the performance hit of having R
as a shared library do you need to compile at all.

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] parsing '...' function argument?

2005-06-30 Thread Oleg Sklyar
Dear community,

I am writing a wrapper for '[' operator, which is a generic method
declared as function(x, i, j, ..., drop). It turns out that I need to
parse the '...' argument and this is where I am stuck. Generally what I
need is the following. Say the call is obj[1, 1, 1:10, 3] - here '1:10,
3' is passed into '...'. What I need to evaluate that '...' contains now
2 arguments, first is a vector of 10 elements and second is a single
value. Even nicer situation is in call obj[1, 1, , 3] - where ' , 3' is
passed in '...' with one missing argument, which for an array would mean
the full range. Any ideas? (Just to mention - if there were only one
argument in '...', say '1:10', then length(...) would return 10 and one
could access elements by ...[[i]], but all this fails if there are two
arguments or more).

Thanks
Oleg
--
Dr Oleg Sklyar
European Bioinformatics Institute
Wellcome Trust Genome Campus
Hinxton, Cambridge
CB10 1SD
United Kingdom

tel +44 1223 492537
fax +44 1223 494468
email [EMAIL PROTECTED]

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: 答复: [R] fail in addin g library in new version.

2005-06-30 Thread Gabor Grothendieck
On 6/30/05, Ivy_Li [EMAIL PROTECTED] wrote:
 Dear Gabor,
Thank your for helping me so much!
I have loaded R the newest version 2.1.1. Then I setup it in the path 
 of D:\program files\R\
 1. unpack tools.zip into c:\cygwin
 2. install Active perl in c:\Perl
 3. install the mingw32 in c:\mingwin
 4. add c:\cygwin; c:\mingwin\bin in Control Panel - System - Advanced - 
 Environment Variables - Path - Variable (In your previous mail, you said 
 put these at the beginning of the path, I don't understand what is your 
 meaning. Which path?)

If in the console you enter the command:

path

then it will display a semicolon separated list of folders.  You want the folder
that contains the tools to be at the beginning so that you eliminate
the possibility
of finding a different program of the same name first in a folder that comes
prior to the one where the tools are stored.

 
 5. I tried an library example. I set a new folder named example in the 
 c:\MyRpackages\. And In the example folder, it contain an DESCRIPTION 
 file and R folder. in R folder contain a example file. I just write 
 very simple script in it:
 a-2; b-3;sum - sum(a,b); print(paste(a,+,b,=,sum))
 
 6. I opened the DOS environment. Into the D:\  Type the following code:
 cd \Program Files\R\rw2010
 But I don't understand the second line you writed in your previous mail: 
 bin\R cmd install /MyRPackages/example

I was assuming that MyRPackages and R are on the same disk.  If they are not
then you need to specify the disk too.  That is if MyRPackages is on C and R
is installed on D then install your package via:

d:
cd \Program Files\R\rw2010
bin\R CMD install c:/MyRPackages/example

Note that bin\R means to run R.exe in the bin subfolder of the current folder 
using command script install and the indicated source package.

 
 I am not sure that I set up R in D:\ But I do so much action in C:\  Did I 
 do the correct action? Did I do the action into the correct path?

If you are not sure where R is installed then enter the following at the Windows
console prompt to find out (this will work provided you let it install the key
into the registry when you installed R initially).  The reg command is a command
built into Windows (I used XP but I assume its the same on other versions)
that will query the Windows registry:

reg query hklm\software\r-core\r /v InstallPath

 
 I still need your and others help. Thank you very much!
 
 
 
 -原始邮件-
 发件人: Gabor Grothendieck [mailto:[EMAIL PROTECTED]
 发送时间: 2005年6月6日 10:21
 收件人: Ivy_Li
 抄送: r-help@stat.math.ethz.ch
 主题: Re: [R] fail in adding library in new version.
 
 
 On 6/5/05, Ivy_Li [EMAIL PROTECTED] wrote:
  Hello everybody,
 Could I consult you a question?
 I always use R old version 1.9.1 . Because I can not add my library 
  into the new version 2.0.0 by the same method as old version.
 
 Getting the latest version of R is strongly recommended.  The suggestions
 below all assume the latest version and may or may not work if you do
 not upgrade.
 
  *   I have read the webpage http://www.stats.ox.ac.uk/pub/Rtools
  *   Download the tools.zip
  *   Unpack tools.zip into c:\cygwin
  *   Install Active Perl in c:\Perl
  *   Install the mingw32 port of gcc in c:\mingwin
  *   Then go to Control Panel - System - Advanced - Environment 
  Variables - Path - Variable Balue add ;c:\cygwin;c:\mingwin\bin
 
 You may need to put these at the beginning of the path rather than the end.
 Also just as a check enter
 path
 at the console to make sure that you have them.  You will likely
 have to start a new console session and possibly even reboot.
 
 Also you need the Microsoft Help Compiler, hhc.  Suggest
 you reread the material on which tools you need.
 
  *   Save my library example into c:\MyRpackages\ . But I am not 
  sure what type it is, is it need suffix? And I don't what its content, 
  just my function script, no special format?
 
 In MyRPackages you would have a folder called example, in your case,
 that contains the package.  Within folder example, you would have the
 DESCRIPTION file, the R folder, etc.
 
  *   Then I don't know where should I do this step: Type R CMD INSTALL 
  --build example. Need I run R first?
 
 You don't have to run R first.  You do need to make sure that R.exe can
 be found on your path or else use the absolute path name in referring to R.
 For example, if your path does not include R you could do something like this:
 
 cd \Program Files\R\rw2010
 bin\R cmd install /MyRPackages/example

Sorry, there is an error in the above.  It should be:

bin\R CMD install c:/MyRPackages/example

or 

bin\Rcmd install c:/MyRPackages/example


 
 Be sure to use forward slashes where shown above and backslashes
 where shown.
 
 So There is a error after I do this step.  It said it can not find 
  somethig. I don't which step is wrong. It costed me much time.
 
 
 Try all these suggestions including upgrading R 

Re: [R] plot (log scale on y-axis)

2005-06-30 Thread Gabor Grothendieck
On 6/29/05, Jing Shen [EMAIL PROTECTED] wrote:
 I am planning to plot my data on log scale (y-axis). There is a
 parameter in plot function, which is
 plot( ..., log=y, ...)
 While, the problem is that it is with base of e. Is there a way to let
 me change it to 10 instead of e?
 

Is your question how to get the axis labels to be powers of 10?
In that case,

plot(1:100, log = y, yaxt = n)  # do not show y axis 
axis(2, c(1,10,100))  # draw y axis with required labels

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] parsing '...' function argument?

2005-06-30 Thread Gabor Grothendieck
On 6/30/05, Oleg Sklyar [EMAIL PROTECTED] wrote:
 Dear community,
 
 I am writing a wrapper for '[' operator, which is a generic method
 declared as function(x, i, j, ..., drop). It turns out that I need to
 parse the '...' argument and this is where I am stuck. Generally what I
 need is the following. Say the call is obj[1, 1, 1:10, 3] - here '1:10,
 3' is passed into '...'. What I need to evaluate that '...' contains now
 2 arguments, first is a vector of 10 elements and second is a single
 value. Even nicer situation is in call obj[1, 1, , 3] - where ' , 3' is
 passed in '...' with one missing argument, which for an array would mean
 the full range. Any ideas? (Just to mention - if there were only one
 argument in '...', say '1:10', then length(...) would return 10 and one
 could access elements by ...[[i]], but all this fails if there are two
 arguments or more).
 

Check out the technique used in this post:

http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] download.file() / install.packages() from a url with a username and password

2005-06-30 Thread Prof Brian Ripley
On Thu, 30 Jun 2005, John Marsland wrote:

 I am trying to create a repository for my own packages as an easy way
 to auto install packages on a number of servers.

 Obviously, I am able to connect using install.packages() to CRAN
 without problems but when I specify my own repos I get an error:

  install.packages(pkgs, repos=http://some.site.com;)
 Warnings message:
 cannot open: HTTP status was '401 Authorisation Required'

 I get a similar message if I try to use download.file() on the
 PACKAGES file.

 I have tried the url in the form http://username:[EMAIL PROTECTED]

 Any ideas?

You need to use a method which supports this form of access.

The basic internal method in R does not.
It is likely that --internet2 on Windows does.
method=wget does.

Since the internal method can handle authentication on proxies, it would 
not be hard to add this based on the existing code - patches are welcome.

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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Graphically centering confidence interval in barplot

2005-06-30 Thread Smit, R. \(Robin\)
Hello,
 
I have got a simple cosmetic question.
I have created a bar plot with confidence intervals using:
 
barplot(mean, ylim = c(0,0.2), las = 3, space = 0)

arrows(1:17 ,X95p_low, 1:17, X95p_high, length = 0.07, angle = 90, code
= 3, lty = 1)

 

Unfortunately, the confidence bars align with the right side of the bars
and I would like to shift these to the middle of the bars.

Is there someone who can tell me how I can do this?

 

Kind regards,
Robin Smit

 

This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread Douglas Bates
This is slightly off-topic but I would be interested in whether anyone
has succeeded in creating a filter expression for Google's gmail
system that will select messages sent through the R-help and R-devel
lists.  It seems as if it should be easy to select on '[R]' or '[Rd]'
in the subject line but I haven't been able to work out the exact
syntax that would do this and not select messages that have an 'R'
anywhere in the subject.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Graphically centering confidence interval in barplot

2005-06-30 Thread Marc Schwartz
On Thu, 2005-06-30 at 14:40 +0200, Smit, R. (Robin) wrote:
 Hello,
  
 I have got a simple cosmetic question.
 I have created a bar plot with confidence intervals using:
  
 barplot(mean, ylim = c(0,0.2), las = 3, space = 0)
 
 arrows(1:17 ,X95p_low, 1:17, X95p_high, length = 0.07, angle = 90, code
 = 3, lty = 1)
 
  
 
 Unfortunately, the confidence bars align with the right side of the bars
 and I would like to shift these to the middle of the bars.
 
 Is there someone who can tell me how I can do this?
 
  
 
 Kind regards,
 Robin Smit


barplot() returns the bar midpoints, so you need to use these as your
'x' axis positions for the CI's:

mp - barplot(mean, ylim = c(0,0.2), las = 3, space = 0)

arrows(mp, X95p_low, mp, X95p_high, length = 0.07, angle = 90, 
   code = 3, lty = 1)


Alternatively, you can use the barplot2() function in the 'gplots'
package from CRAN:

barplot2(mean, ylim = c(0,0.2), las = 3, space = 0, plot.ci = TRUE,
 ci.l = X95p_low, ci.u = X95p_high)


BTW, you should avoid using 'mean' for your data vector, since that is
also the name of a R function. R is smart enough to know the difference
in most cases, but it could get you into trouble at some point.

HTH,

Marc Schwartz

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] installation error

2005-06-30 Thread Douglas Bates
On 6/30/05, orkun [EMAIL PROTECTED] wrote:
 hello
 
 when I follow this procedure:
 ~~
 rS - http://godel.cs.bilgi.edu.tr/mirror/cran/src/contrib/;
 install.packages(c(Matrix), repos=rS, dependencies=TRUE)
 ~~
 
 installation gives this error:
 ~
 make: *** [Matrix.so] Error 1
 ERROR: compilation failed for package 'Matrix'
 ** Removing '/usr/local/lib/R/site-library/Matrix'
 ** Restoring previous '/usr/local/lib/R/site-library/Matrix'
 
 The downloaded packages are in
 /tmp/RtmpPx5hkE/downloaded_packages
 Warning message:
 installation of package 'Matrix' had non-zero exit status in:
 install.packages(c(Matrix), repos = rS, dependencies = TRUE)
 ~~
 I am using debian and  had installed R in debian way.
 
 what might possible solutions be ?

Check that you have the Debian package r-base-dev installed.  This is
a virtual package whose installation ensures that you have the
necessary tools installed so that you can compile R packages.

Alternatively, you could install the precompiled Debian package r-cran-matrix

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] mApply instead of by ???

2005-06-30 Thread Marten Winter

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: 答复: [R] fail in addin g library in new version.

2005-06-30 Thread ecoinfo
It is interesting that in my PC
 R cmd
 is same as
 R
 Which leads me into the R interface. 
 
--
 
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\xiaohuadair cmd
ARGUMENT 'cmd' __ignored__


R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

Working directory is C:/Documents and Settings/xiaohuadai
bugs() function loaded from file c:\bugsR\bugs.R
display() and sim() functions loaded from file c:\bugsR\regression.R

---
 Xiaohua

 On 6/30/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: 
 
 They both work for me. I just installed a package using R CMD
 and then did it again using Rcmd. Here is the input and
 first few lines of output for the first one:
 
 
 -
 C:\Program Files\R\rw2011patbin\R CMD install /Rpkgs/vcd
 
 
 -- Making package vcd 
 
 adding build stamp to DESCRIPTION
 installing R files
 installing demos
 ...etc...
 
 -
 
 and here it is for the second one:
 
 
 -
 C:\Program Files\R\rw2011patbin\Rcmd install /Rpkgs/vcd
 
 
 -- Making package vcd 
 adding build stamp to DESCRIPTION
 installing R files
 installing demos
 ...etc..
 
 -
 
 
 On 6/30/05, ecoinfo [EMAIL PROTECTED] wrote:
  In my Windows XP, the commond is RCMD not R CMD.
 
 
  On 6/30/05, Gabor Grothendieck [EMAIL PROTECTED] wrote:
  
   On 6/30/05, Ivy_Li [EMAIL PROTECTED] wrote:
Dear Gabor,
Thank your for helping me so much!
I have loaded R the newest version 2.1.1. Then I setup it in the
  path of D:\program files\R\
1. unpack tools.zip into c:\cygwin
2. install Active perl in c:\Perl
3. install the mingw32 in c:\mingwin
4. add c:\cygwin; c:\mingwin\bin in Control Panel - System -
  Advanced - Environment Variables - Path - Variable (In your previous
  mail, you said put these at the beginning of the path, I don't 
 understand
  what is your meaning. Which path?)
  
   If in the console you enter the command:
  
   path
  
   then it will display a semicolon separated list of folders. You want 
 the
  folder
   that contains the tools to be at the beginning so that you eliminate
   the possibility
   of finding a different program of the same name first in a folder that
  comes
   prior to the one where the tools are stored.
  
   
5. I tried an library example. I set a new folder named example in 
 the
  c:\MyRpackages\. And In the example folder, it contain an 
 DESCRIPTION
  file and R folder. in R folder contain a example file. I just 
 write
  very simple script in it:
a-2; b-3;sum - sum(a,b); print(paste(a,+,b,=,sum))
   
6. I opened the DOS environment. Into the D:\ Type the following
  code:
cd \Program Files\R\rw2010
But I don't understand the second line you writed in your previous 
 mail:
  bin\R cmd install /MyRPackages/example
  
   I was assuming that MyRPackages and R are on the same disk. If they 
 are
  not
   then you need to specify the disk too. That is if MyRPackages is on C 
 and
  R
   is installed on D then install your package via:
  
   d:
   cd \Program Files\R\rw2010
   bin\R CMD install c:/MyRPackages/example
  
   Note that bin\R means to run R.exe in the bin subfolder of the current
  folder
   using command script install and the indicated source package.
  
   
I am not sure that I set up R in D:\ But I do so much action in 
 C:\
  Did I do the correct action? Did I do the action into the correct path?
  
   If you are not sure where R is installed then enter the following at 
 the
  Windows
   console prompt to find out (this will work provided you let it install 
 the
  key
   into the registry when you installed R initially). The reg command is 
 a
  command
   built into Windows (I used XP but I assume its the same on other 
 versions)
   that will query the Windows registry:
  
   reg query hklm\software\r-core\r /v InstallPath
  
   

[R] Linear Models with mean as Intercept.

2005-06-30 Thread Ghislain Vieilledent
Dear advanced statisticians,

***Objectif

I try to set up linear models with mean as intercept:
Answer: y
Variable: x, as factor of two modalities: x(1), x(2).

I would like to have a model as:
y = mean(y)+A(i)+residuals,
with i in (1,2) and A(1) coefficient for x(1) and A(2) coefficient for x(2).

***Trials in R***

## Firstly:

I write in R:
 Model-lm(y~x,Data)
 summary(Model)
...
I've got the coefficients for:
- the intercept (x(1) as been choosen) that we can call B(1)
- the second modality: x(2) that we can call B(2)

If I have well understood we have for the model and predictions:
if x(1): y=B(1)
if x(2): y=B(1)+B(2)
which is quite different as y=mean(y)+A(i)

## Secondly
I tried to skip the intercept
 Model2-lm(y~0+x,Data)
 summary(Model2)
...
I've got the coefficients for:
- the first modality: x(1) that we can call C(1)
- the second modality: x(2) that we can call C(2)

And the model and predictions, if I'm right, are:
if x(1): y=C(1)
if x(2): y=C(2)

*** Questions ***
How can I obtain a predictive model y=mean(y)+A(i) ?
Is it possible to settle mean(y) as intercept?

Thanks for your help.

Ghislain V., retarded statistician.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] how to call egarch of sas in R

2005-06-30 Thread khobson




From past posts:
There are a number of GARCH models available in the fSeries package --
including models with t an skew-t distributions.

mailto:[EMAIL PROTECTED]
Kenneth Ray Hobson, P.E.
Oklahoma DOT - QA  IAS Manager
200 N.E. 21st Street
Oklahoma City, OK  73105-3204
(405) 522-4985, (405) 522-0552 fax

Visit our website at:
http://www.okladot.state.ok.us/materials/materials.htm

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Linear Models with mean as Intercept.

2005-06-30 Thread Ingmar Visser
you could model: (y-mean(y))~x
hth, ingmar

 From: Ghislain Vieilledent [EMAIL PROTECTED]
 Date: Thu, 30 Jun 2005 15:35:30 +0200
 To: r-help@stat.math.ethz.ch
 Subject: [R] Linear Models with mean as Intercept.
 
 *** Questions ***
 How can I obtain a predictive model y=mean(y)+A(i) ?
 Is it possible to settle mean(y) as intercept?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] randomForest error

2005-06-30 Thread Arne.Muller
Hello,

I'm using the random forest package. One of my factors in the data set contains 
41 levels (I can't code this as a numeric value - in terms of linear models 
this would be a random factor). The randomForest call comes back with an error 
telling me that the limit is 32 categories.

Is there any reason for this particular limit? Maybe it's possible to recompile 
the module with a different cutoff?

thanks a  lot for your help,
kind regards,


Arne

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: 答复: [R] fail in addin g library in new version.

2005-06-30 Thread Gabor Grothendieck
It seems one must use 'R CMD install ...' where the CMD must be capitalized. 
If CMD is not capitalized then one gets the behavior you got. 

On 6/30/05, ecoinfo [EMAIL PROTECTED] wrote:
 It is interesting that in my PC
  
 R cmd
  
 is same as
  
 R
  
 Which leads me into the R interface. 
  
 --
 
 
 Microsoft Windows XP [Version 5.1.2600]
 (C) Copyright 1985-2001 Microsoft Corp.
 
 C:\Documents and Settings\xiaohuadair cmd
 ARGUMENT 'cmd' __ignored__
 
 
 R : Copyright 2005, The R Foundation for Statistical Computing
 Version 2.1.1  (2005-06-20), ISBN 3-900051-07-0
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
 Type 'license()' or 'licence()' for distribution details.
 
   Natural language support but running in an English locale
 
 R is a collaborative project with many contributors.
 Type 'contributors()' for more information and
 'citation()' on how to cite R or R packages in publications.
 
 Type 'demo()' for some demos, 'help()' for on-line help, or
 'help.start()' for a HTML browser interface to help.
 Type 'q()' to quit R.
 
 Working directory is C:/Documents and Settings/xiaohuadai
 bugs() function loaded from file c:\bugsR\bugs.R
 display() and sim() functions loaded from file c:\bugsR\regression.R
 
 ---
  
 Xiaohua
 
  
 On 6/30/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: 
  They both work for me.  I just installed a package using R CMD
  and then did it again using Rcmd.  Here is the input and 
  first few lines of output for the first one:
  
 
 -
  C:\Program Files\R\rw2011patbin\R CMD install /Rpkgs/vcd
  
  
  -- Making package vcd 
  
  adding build stamp to DESCRIPTION
  installing R files
  installing demos
  ...etc...
 
 -
  
  and here it is for the second one:
  
 
 -
  C:\Program Files\R\rw2011patbin\Rcmd install /Rpkgs/vcd
  
  
  -- Making package vcd 
  adding build stamp to DESCRIPTION
  installing R files
  installing demos
  ...etc..
 
 -
  
  
  On 6/30/05, ecoinfo [EMAIL PROTECTED] wrote:
   In my Windows XP, the commond is RCMD not R CMD.
  
  
   On 6/30/05, Gabor Grothendieck  [EMAIL PROTECTED] wrote:
   
On 6/30/05, Ivy_Li [EMAIL PROTECTED] wrote:
 Dear Gabor, 
Thank your for helping me so much!
I have loaded R the newest version 2.1.1. Then I setup it in
 the
   path of D:\program files\R\
 1. unpack tools.zip into c:\cygwin
 2. install Active perl in c:\Perl
 3. install the mingw32 in c:\mingwin
 4. add c:\cygwin; c:\mingwin\bin in Control Panel - System - 
   Advanced - Environment Variables - Path - Variable (In your previous
   mail, you said put these at the beginning of the path, I don't
 understand
   what is your meaning. Which path?) 
   
If in the console you enter the command:
   
path
   
then it will display a semicolon separated list of folders.  You want
 the
   folder
that contains the tools to be at the beginning so that you eliminate 
the possibility
of finding a different program of the same name first in a folder that
   comes
prior to the one where the tools are stored.
   

 5. I tried an library example. I set a new folder named example in
 the 
   c:\MyRpackages\. And In the example folder, it contain an
 DESCRIPTION
   file and R folder. in R folder contain a example file. I just
 write 
   very simple script in it:
 a-2; b-3;sum - sum(a,b); print(paste(a,+,b,=,sum))

 6. I opened the DOS environment. Into the D:\  Type the following
   code:
 cd \Program Files\R\rw2010
 But I don't understand the second line you writed in your previous
 mail:
   bin\R cmd install /MyRPackages/example

I was assuming that MyRPackages and R are on the same disk.  If they
 are
   not
then you need to specify the disk too.  That is if MyRPackages is on C
 and
   R
is installed on D then install your package via: 
   
d:
cd \Program Files\R\rw2010
bin\R CMD install c:/MyRPackages/example
   
Note that bin\R means to run R.exe in the bin subfolder of the current
   folder
using command script install and the indicated source package.
   

 I am not sure that I set up R in D:\ But I do so much action in
 C:\
   Did I do the correct action? Did I do the action into the correct path? 
   
If you are not sure where R is installed then enter the following at
 the
   Windows
 

Re: [R] randomForest error

2005-06-30 Thread Liaw, Andy
The limitation comes from the way categorical splits are represented in the
code:  For a categorical variable with k categories, the split is
represented by k binary digits: 0=right, 1=left.  So it takes k bits to
store each split on k categories.  To save storage, this is `packed' into a
4-byte integer (32-bit), thus the limit of 32 categories.

The current Fortran code (version 5.x) by Breiman and Cutler gets around
this limitation by storing the split in an integer array.  While this lifts
the 32-category limit, it takes much more memory to store the splits.  I'm
still trying to figure out a more memory efficient way of storing the splits
without imposing the 32-category limit.  If anyone has suggestions, I'm all
ears.

Best,
Andy

 From: [EMAIL PROTECTED]
 
 Hello,
 
 I'm using the random forest package. One of my factors in the 
 data set contains 41 levels (I can't code this as a numeric 
 value - in terms of linear models this would be a random 
 factor). The randomForest call comes back with an error 
 telling me that the limit is 32 categories.
 
 Is there any reason for this particular limit? Maybe it's 
 possible to recompile the module with a different cutoff?
 
   thanks a  lot for your help,
   kind regards,
 
 
   Arne
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] plot (log scale on y-axis)

2005-06-30 Thread Jing Shen
Thanks to all of you! Yes, I want to get the axis labels to be powers
of 10. I am going to try the code you recommended. Thanks a lot,
Jing

On 6/30/05, Gabor Grothendieck [EMAIL PROTECTED] wrote:
 On 6/29/05, Jing Shen [EMAIL PROTECTED] wrote:
  I am planning to plot my data on log scale (y-axis). There is a
  parameter in plot function, which is
  plot( ..., log=y, ...)
  While, the problem is that it is with base of e. Is there a way to let
  me change it to 10 instead of e?
 
 
 Is your question how to get the axis labels to be powers of 10?
 In that case,
 
 plot(1:100, log = y, yaxt = n)  # do not show y axis
 axis(2, c(1,10,100))  # draw y axis with required labels


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread ecoinfo
The subject keywords in my filter is 
 [R] OR [Rd]
 and it works well.

 On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote: 
 
 This is slightly off-topic but I would be interested in whether anyone
 has succeeded in creating a filter expression for Google's gmail
 system that will select messages sent through the R-help and R-devel
 lists. It seems as if it should be easy to select on '[R]' or '[Rd]'
 in the subject line but I haven't been able to work out the exact
 syntax that would do this and not select messages that have an 'R'
 anywhere in the subject.
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 



-- 
Xiaohua Dai, Dr.

* Postdoctoral in elephant-tree ecosystem simulation
* PhD in forest ecology
* Master in entomological ecology
-
Centre for Systems Research, Durban Institute of Technology
P.O.Box 953, Durban 4000, South Africa
Tel: +27-31-2042737(O) Fax: +27-31-2042736(O)
Mobile: +27-723682954
Email: [EMAIL PROTECTED], [EMAIL PROTECTED]
Publications: http://www.getcited.org/?MBR=11061629
Personla Blog: http://www.blog.edu.cn/blog.asp?name=ecoinformatics
My Son's Blog: http://www.xinxinbao.com/blog/blog.asp?name=steed

Post Address: 
c/o Ms Thelma Roos
11-148 Musgrave Road, Berea, Durban 4001, South Africa

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread Douglas Bates
On 6/30/05, ecoinfo [EMAIL PROTECTED] wrote:
 The subject keywords in my filter is 
   
 [R] OR [Rd] 
   
 and it works well.

It may appear to be working but I think the '[' and ']' are ignored
and the filter will select messages with subjects like 'Rare books'.
 
   
 On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote: 
  
  This is slightly off-topic but I would be interested in whether anyone
  has succeeded in creating a filter expression for Google's gmail 
  system that will select messages sent through the R-help and R-devel
  lists.  It seems as if it should be easy to select on '[R]' or '[Rd]'
  in the subject line but I haven't been able to work out the exact
  syntax that would do this and not select messages that have an 'R' 
  anywhere in the subject.
  
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
  
 
 
 
  -- 
 Xiaohua Dai, Dr.
 
 * Postdoctoral in elephant-tree ecosystem simulation
 * PhD in forest ecology
 * Master in entomological ecology 
 -
 Centre for Systems Research, Durban Institute of Technology
 P.O.Box 953, Durban 4000, South Africa
 Tel: +27-31-2042737(O) Fax: +27-31-2042736(O) 
 Mobile: +27-723682954
 Email: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Publications: http://www.getcited.org/?MBR=11061629
 Personla Blog:
 http://www.blog.edu.cn/blog.asp?name=ecoinformatics
 My Son's Blog:
 http://www.xinxinbao.com/blog/blog.asp?name=steed
 
 Post Address: 
 c/o Ms Thelma Roos
 11-148 Musgrave Road, Berea, Durban 4001, South Africa

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread ecoinfo
definitely not true. There are only emails from r-help and r-devel lists in 
my R lable. I just sent an email with the subject Rare book to myself, and 
it didnot go to my R lable.

On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote: 
 
 On 6/30/05, ecoinfo [EMAIL PROTECTED] wrote:
  The subject keywords in my filter is
 
  [R] OR [Rd]
 
  and it works well.
 
 It may appear to be working but I think the '[' and ']' are ignored
 and the filter will select messages with subjects like 'Rare books'.
 
 
  On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote:
  
   This is slightly off-topic but I would be interested in whether anyone
   has succeeded in creating a filter expression for Google's gmail
   system that will select messages sent through the R-help and R-devel
   lists. It seems as if it should be easy to select on '[R]' or '[Rd]'
   in the subject line but I haven't been able to work out the exact
   syntax that would do this and not select messages that have an 'R'
   anywhere in the subject.
  
   __
   R-help@stat.math.ethz.ch mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide!
  http://www.R-project.org/posting-guide.html
  
 
 
 
  --
  Xiaohua Dai, Dr.
  
 
  * Postdoctoral in elephant-tree ecosystem simulation
  * PhD in forest ecology
  * Master in entomological ecology
  
 -
  Centre for Systems Research, Durban Institute of Technology
  P.O.Box 953, Durban 4000, South Africa
  Tel: +27-31-2042737(O) Fax: +27-31-2042736(O)
  Mobile: +27-723682954
  Email: [EMAIL PROTECTED], [EMAIL PROTECTED]
  Publications: http://www.getcited.org/?MBR=11061629
  Personla Blog:
  http://www.blog.edu.cn/blog.asp?name=ecoinformatics
  My Son's Blog:
  http://www.xinxinbao.com/blog/blog.asp?name=steed
 
  Post Address:
  c/o Ms Thelma Roos
  11-148 Musgrave Road, Berea, Durban 4001, South Africa
 



-- 
Xiaohua Dai, Dr.

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Linear Models with mean as Intercept.

2005-06-30 Thread Sundar Dorai-Raj


Ghislain Vieilledent wrote:
 Dear advanced statisticians,
 
 ***Objectif
 
 I try to set up linear models with mean as intercept:
 Answer: y
 Variable: x, as factor of two modalities: x(1), x(2).
 
 I would like to have a model as:
 y = mean(y)+A(i)+residuals,
 with i in (1,2) and A(1) coefficient for x(1) and A(2) coefficient for x(2).
 
 ***Trials in R***
 
 ## Firstly:
 
 I write in R:
  Model-lm(y~x,Data)
  summary(Model)
 ...
 I've got the coefficients for:
 - the intercept (x(1) as been choosen) that we can call B(1)
 - the second modality: x(2) that we can call B(2)
 
 If I have well understood we have for the model and predictions:
 if x(1): y=B(1)
 if x(2): y=B(1)+B(2)
 which is quite different as y=mean(y)+A(i)
 
 ## Secondly
 I tried to skip the intercept
  Model2-lm(y~0+x,Data)
  summary(Model2)
 ...
 I've got the coefficients for:
 - the first modality: x(1) that we can call C(1)
 - the second modality: x(2) that we can call C(2)
 
 And the model and predictions, if I'm right, are:
 if x(1): y=C(1)
 if x(2): y=C(2)
 
 *** Questions ***
 How can I obtain a predictive model y=mean(y)+A(i) ?
 Is it possible to settle mean(y) as intercept?
 
 Thanks for your help.
 
 Ghislain V., retarded statistician.


You have to set the contrasts differently:

set.seed(1)
y - rnorm(10)
x - factor(rep(letters[1:5], each = 2))
fit - lm(y ~ x, contrasts = list(x = contr.sum))
all.equal(mean(y), coef(fit)[1])
#[1] TRUE

contr.helmert will work too. The default contr.treatment does not 
have columns that sum to zero. Be forewarned: the coefficients need to 
be interpretted differently.

HTH,

--sundar

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread Douglas Bates
On 6/30/05, ecoinfo [EMAIL PROTECTED] wrote:
 definitely not true. There are only emails from r-help and r-devel lists in
 my R lable. I just sent an email with the subject Rare book to myself, and
 it didnot go to my R lable.

I should have checked more carefully.  The subject 'Rare book' will
not be selected by the filter but the subject 'A question about R' (a
subject that occurs all too frequently in my email) does as well as
the subject 'Trouble with R-help'.  It appears that the algorithm
splits the subject into tokens on boundaries of non-alphabetic
characters and will match any token 'R'.

I really do want to filter just the mail sent through the list.  As I
mentioned above, I get a large quantity of R-related mail that doesn't
necessarily come through a list.

 
 
  
 On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote: 
  On 6/30/05, ecoinfo [EMAIL PROTECTED] wrote:
   The subject keywords in my filter is
  
   [R] OR [Rd]
  
   and it works well.
  
  It may appear to be working but I think the '[' and ']' are ignored
  and the filter will select messages with subjects like 'Rare books'. 
  
  
   On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote:
   
This is slightly off-topic but I would be interested in whether anyone
has succeeded in creating a filter expression for Google's gmail 
system that will select messages sent through the R-help and R-devel
lists.  It seems as if it should be easy to select on '[R]' or '[Rd]'
in the subject line but I haven't been able to work out the exact 
syntax that would do this and not select messages that have an 'R'
anywhere in the subject.
   
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
   http://www.R-project.org/posting-guide.html
   
  
  
  
--
   Xiaohua Dai, Dr.
  
 
   * Postdoctoral in elephant-tree ecosystem simulation 
   * PhD in forest ecology
   * Master in entomological ecology
  
 -
   Centre for Systems Research, Durban Institute of Technology 
   P.O.Box 953, Durban 4000, South Africa
   Tel: +27-31-2042737(O) Fax: +27-31-2042736(O)
   Mobile: +27-723682954
   Email: [EMAIL PROTECTED], [EMAIL PROTECTED]
   Publications: http://www.getcited.org/?MBR=11061629
   Personla Blog:
   http://www.blog.edu.cn/blog.asp?name=ecoinformatics
   My Son's Blog:
   http://www.xinxinbao.com/blog/blog.asp?name=steed
  
   Post Address: 
   c/o Ms Thelma Roos
   11-148 Musgrave Road, Berea, Durban 4001, South Africa
  
 
 
 
 -- 
 Xiaohua Dai, Dr.
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] deal package

2005-06-30 Thread Mike Waters
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Uwe Ligges
Sent: 30 June 2005 10:44
To: Weiwei Shi
Cc: R-help@stat.math.ethz.ch
Subject: Re: [R] deal package

Weiwei Shi wrote:

 Hi,
 I am wondering if anyone here used deal package in R to do the 
 bayesian network. I am curious about its scalability: how many 
 variables and how many observations can it handle in a reasonable 
 time. If you have some good experience, please share your data 
 configurations.

Questions like this should better be sent to the package mainatiner or
author of the corresponding function, who probably has more experiences and
background knowledge on the code than (almost?) all other readers of this
list.

Uwe Ligges


 
 
 thanks,
 

There are resources and a link to subscribe to the mailing list for DEAL at
the following URL:

http://www.math.aau.dk/novo/deal/

That's the best place for you to go for help here.

Regards,

Mike
_
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] deal package

2005-06-30 Thread Weiwei Shi
I was there and subscribed to the list. But thanks anyway for the
info. I will forward this question to there. I just wished I could get
some suggestion too from here.

On 6/30/05, Mike Waters [EMAIL PROTECTED] wrote:
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Uwe Ligges
 Sent: 30 June 2005 10:44
 To: Weiwei Shi
 Cc: R-help@stat.math.ethz.ch
 Subject: Re: [R] deal package
 
 Weiwei Shi wrote:
 
  Hi,
  I am wondering if anyone here used deal package in R to do the
  bayesian network. I am curious about its scalability: how many
  variables and how many observations can it handle in a reasonable
  time. If you have some good experience, please share your data
  configurations.
 
 Questions like this should better be sent to the package mainatiner or
 author of the corresponding function, who probably has more experiences and
 background knowledge on the code than (almost?) all other readers of this
 list.
 
 Uwe Ligges
 
 
 
 
  thanks,
 
 
 There are resources and a link to subscribe to the mailing list for DEAL at
 the following URL:
 
 http://www.math.aau.dk/novo/deal/
 
 That's the best place for you to go for help here.
 
 Regards,
 
 Mike
 _
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
 
 
 


-- 
Weiwei Shi, Ph.D

Did you always know?
No, I did not. But I believed...
---Matrix III

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Relationship between dyn.load and library.dynam

2005-06-30 Thread Campbell
I am a little confused about the relationship between library.dynam and
dyn.load

From the documentation:

library.dynam(chname,

Load the specified file of compiled code if it has not been loaded
already, or unloads it. Where chname is a character string naming a
shared library to load.

and

dyn.load(x, local = TRUE, now = TRUE)

Load or unload shared libraries, and test whether a C function or
Fortran subroutine is available. Where x is a character string giving
the pathname to a shared library or DLL.

Perhaps the problems is caused by the relationship between 'shared
libraries' and 'complied code'.  Given 
that the compiled code is not an executable then it must be a shared
library. 

Both these functions would appear to do the same thing; load code
complied using R CMD SHLIB into R's 
memory space and and make the functions that are defined in the code
available to R.  In Windows there 
are 2 distinct operations: loading the shared object and then making the
names of the functions that
the object exports available to applications.

What I am trying to do is create a compiled shared library that is able
to access the SEXP data type.
To do this I wrtie the code in C, run R CMD SHLIB to generate the file
MyOut.so.  I then build a package
with the following function:

.First.lib-function(lib, pkg){ 
  dyn.load(x=/home/phineas/pkg/CallRFromC/R/MyOut.so)
  library.dynam(chname=MyOut)
}

The use of hard wired paths is to simplify development

When I run R CMD check on the package I get 


* checking S3 generic/method consistency ... WARNING
Error: .First.lib failed for 'CallRFromC'
Call sequence:
2: stop(gettextf(.First.lib failed for '%s', libraryPkgName(package)),

   domain = NA)
1: library(package, lib.loc = lib.loc, character.only = TRUE, verbose =
FALSE)
Execution halted
See section 'Generic functions and methods' of the 'Writing R
Extensions'
manual.

A little debugging shows that the problem here is caused by
library.dynam as R CMD check runs fine when 
this is exluded.

To be more concrete:

Are both library.dynam and dyn.load necessary?
If they are does it matter in which order they are called?
What different roles do they play in making the compiled functions
available to R?
I notice that many of the packages that use shared objects use
namespaces, is the extra cost of learning
about namespaces justufued by the gains from their use?

Any help or pointers to manuals gratefully received

Phineas Campbell

 version  
 _   
platform sparc-sun-solaris2.9
arch sparc   
os   solaris2.9  
system   sparc, solaris2.9   
status   
major2   
minor1.1 
year 2005
month06  
day  20  
language R

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] R-Aqua can't open history file

2005-06-30 Thread McGee, Monnie
Dear List,

I am running R-Aqua 2.1.0 on a powerbook with Mac OS/X 10.3.9.  Here is what I 
get when I type  version at the R-prompt.

platform powerpc-apple-darwin7.9.0
arch powerpc  
os   darwin7.9.0  
system   powerpc, darwin7.9.0 
status   Patched  
major2
minor1.0  
year 2005 
month05   
day  12   
language R  

My problem is that Aqua cannot access any history files.  Therefore, anything I 
do in R is lost when I close an R session.   It has been doing this since I 
installed it a month ago.  Here is the message I receive when I double-click on 
the R-aqua icon on the dock:

2005-06-30 09:49:50.075 R[376] Can't open history file 2

R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.0 Patched (2005-05-12), ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

 

Thanks for your help.

Monnie


Monnie McGee, Ph.D.
Assistant Professor
Department of Statistical Science
Southern Methodist University
Ph: 214-768-2462
Fax: 214-768-4035

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Is.integer and testing for integers

2005-06-30 Thread Tuszynski, Jaroslaw W.

 Hi,

I was trying to figure out if there is a function in R that tests if R
object contains only integers. I though is.integer would be it, but this
function only checks whether its argument is of integer type or not. As a
result
x = (1:5)^2
is.integer(x)
Returns false. Of course I can write my own function like
!any(x!=as.integer(x)) but I am just trying to make sure I am not
reinventing the wheel.

Jarek
=\ 
 Jarek Tuszynski, PhD.   o / \ 
 Science Applications International Corporation  \__,|  
 (703) 676-4192  \
 [EMAIL PROTECTED]   `\



[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread Matthew Nelson
Doug,

I was able to accomplish this for r-help by filtering on the To
field with the following addresses:
r-help@stat.math.ethz.ch, [EMAIL PROTECTED]

I created this a week ago and it has so far filtered every mailing
list messages successfully.  Gmail conversations are a wonderful way
to catch up on list activity after periods of neglect.

Best regards,
Matt

On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote:
 This is slightly off-topic but I would be interested in whether anyone
 has succeeded in creating a filter expression for Google's gmail
 system that will select messages sent through the R-help and R-devel
 lists.  It seems as if it should be easy to select on '[R]' or '[Rd]'
 in the subject line but I haven't been able to work out the exact
 syntax that would do this and not select messages that have an 'R'
 anywhere in the subject.
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Is.integer and testing for integers

2005-06-30 Thread Sundar Dorai-Raj


Tuszynski, Jaroslaw W. wrote:
  Hi,
 
 I was trying to figure out if there is a function in R that tests if R
 object contains only integers. I though is.integer would be it, but this
 function only checks whether its argument is of integer type or not. As a
 result
   x = (1:5)^2
   is.integer(x)
 Returns false. Of course I can write my own function like
 !any(x!=as.integer(x)) but I am just trying to make sure I am not
 reinventing the wheel.
 
 Jarek

Since ^ returns a double, it's no wonder is.integer(x) didn't work as 
you expected. Perhaps you want something more like

is.int - function(x, tol = .Machine$double.eps) {
   (x - floor(x))  tol
}
is.int((1:5)^2)

HTH,

--sundar

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] mApply instead of by ???

2005-06-30 Thread Frank E Harrell Jr
Marten Winter wrote:

Now that's a brief note.  mApply in the Hmisc package may have large 
speed advantages over by for large datasets.  Also look at the summarize 
function in Hmisc, which uses mApply.

-- 
Frank E Harrell Jr   Professor and Chair   School of Medicine
  Department of Biostatistics   Vanderbilt University

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread Matthew Nelson
A clarification: this only works properly when the To addresses are
in separate filters.

Sorry for the confusion.

Matt

On 6/30/05, Matthew Nelson [EMAIL PROTECTED] wrote:
 Doug,
 
 I was able to accomplish this for r-help by filtering on the To
 field with the following addresses:
 r-help@stat.math.ethz.ch, [EMAIL PROTECTED]
 
 I created this a week ago and it has so far filtered every mailing
 list messages successfully.  Gmail conversations are a wonderful way
 to catch up on list activity after periods of neglect.
 
 Best regards,
 Matt
 
 On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote:
  This is slightly off-topic but I would be interested in whether anyone
  has succeeded in creating a filter expression for Google's gmail
  system that will select messages sent through the R-help and R-devel
  lists.  It seems as if it should be easy to select on '[R]' or '[Rd]'
  in the subject line but I haven't been able to work out the exact
  syntax that would do this and not select messages that have an 'R'
  anywhere in the subject.
 
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide! 
  http://www.R-project.org/posting-guide.html
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] parsing '...' function argument?

2005-06-30 Thread Berton Gunter
See pages 45 and 46 of VR's S PROGRAMMING for a definitive discussion of
how to do this.

(Confession: I treat anything that VR say as definitive).

Cheers,
Bert Gunter
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Gabor 
 Grothendieck
 Sent: Thursday, June 30, 2005 4:34 AM
 To: Oleg Sklyar
 Cc: r-help@stat.math.ethz.ch
 Subject: Re: [R] parsing '...' function argument?
 
 On 6/30/05, Oleg Sklyar [EMAIL PROTECTED] wrote:
  Dear community,
  
  I am writing a wrapper for '[' operator, which is a generic method
  declared as function(x, i, j, ..., drop). It turns out that 
 I need to
  parse the '...' argument and this is where I am stuck. 
 Generally what I
  need is the following. Say the call is obj[1, 1, 1:10, 3] - 
 here '1:10,
  3' is passed into '...'. What I need to evaluate that '...' 
 contains now
  2 arguments, first is a vector of 10 elements and second is a single
  value. Even nicer situation is in call obj[1, 1, , 3] - 
 where ' , 3' is
  passed in '...' with one missing argument, which for an 
 array would mean
  the full range. Any ideas? (Just to mention - if there were only one
  argument in '...', say '1:10', then length(...) would 
 return 10 and one
  could access elements by ...[[i]], but all this fails if 
 there are two
  arguments or more).
  
 
 Check out the technique used in this post:
 
 http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Is.integer and testing for integers

2005-06-30 Thread Prof Brian Ripley
That allows values just bigger than an integer but not just less than an 
integer.  Also, since .Machine$double.eps is a relative tolerance, there 
are no non-integers greater than one meeting the criterion, and the
only non-integers it lets through are like

 is.int(c(1e-20, -1e-20))
[1]  TRUE FALSE

Since integers a lot bigger than allowed by as.integer can be expressed 
exactly as reals, the best suggestion appears to be

(x == round(x))

 x - 2^c(30, 50, 200)
 x == as.integer(x)
[1] TRUE   NA   NA
Warning message:
NAs introduced by coercion
 x == round(x)
[1] TRUE TRUE TRUE


On Thu, 30 Jun 2005, Sundar Dorai-Raj wrote:



 Tuszynski, Jaroslaw W. wrote:
  Hi,

 I was trying to figure out if there is a function in R that tests if R
 object contains only integers. I though is.integer would be it, but this
 function only checks whether its argument is of integer type or not. As a
 result
  x = (1:5)^2
  is.integer(x)
 Returns false. Of course I can write my own function like
 !any(x!=as.integer(x)) but I am just trying to make sure I am not
 reinventing the wheel.

 Jarek

 Since ^ returns a double, it's no wonder is.integer(x) didn't work as
 you expected. Perhaps you want something more like

 is.int - function(x, tol = .Machine$double.eps) {
   (x - floor(x))  tol
 }
 is.int((1:5)^2)

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

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Help with stripplot

2005-06-30 Thread Deepayan Sarkar
On Thursday 30 June 2005 11:40, Ghosh, Sandeep wrote:
 Thanks for the prompt reply. I need some more help. I want the datapoints
 for each group to show up in a different color, like all wt data points to
 be green, het to be blue and hom to be red. Also I need the median point of
 all the data points plotted as well by a short line as shown in attachment.

stripchart takes you almost all the way there:


with(dataFrame, 
 stripchart(marbles_buried ~ genotype, 
vert = TRUE, method = jitter, 
col = c('blue', 'red', 'green')))
meds - as.vector(with(dataFrame, 
   by(marbles_buried, genotype, median)))
segments((1:3)-0.25, meds, (1:3)+0.25, meds, col = c('blue', 'red', 'green'))


Deepayan

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [OT] gmail filter for R-help and R-devel lists

2005-06-30 Thread Deepayan Sarkar
On 6/30/05, Douglas Bates [EMAIL PROTECTED] wrote:
 This is slightly off-topic but I would be interested in whether anyone
 has succeeded in creating a filter expression for Google's gmail
 system that will select messages sent through the R-help and R-devel
 lists.  It seems as if it should be easy to select on '[R]' or '[Rd]'
 in the subject line but I haven't been able to work out the exact
 syntax that would do this and not select messages that have an 'R'
 anywhere in the subject.

I filter on the To field, which mostly works:

Matches: to:(r-help@stat.math.ethz.ch)
Do this: Skip Inbox, Apply label r-help

Matches: to:([EMAIL PROTECTED])
Do this: Skip Inbox, Apply label r-help

Deepayan

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] comparison of packages for Unit Root test

2005-06-30 Thread Bernhard Pfaff
Dear Amir,

two more cents to add to Achim's comment:

1) Some of the functions contained in the fseries package are ported 
from either the tseries or the urca package. Hence, it might be more 
convenient to you by just utilsing the fseries package.

2) A GUI for the Rcmdr package is shipped within the 'inst' directory of 
the urca package. And -- please do not mistake this note as an 
advertisement --, a book about this topic (including a comparison of 
the different implementations) will be published by Springer, N.Y. quite 
soon. For more information see: http://www.pfaffikus.de

HTH,
Bernhard

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Trouble with Excel table connection

2005-06-30 Thread Steve Sherman
Hello,

I've been using odbcConnectExcel to connect to a spreadsheet database 
containing a single worksheet. Unfortunately when I try to access the 
data R cannot see the table. When I run sqlTables it shows the worksheet 
as a SYSTEM TABLE instead of as a TABLE that I can access. I am fairly 
certain that I am do all of the same things I've done in the past when 
it worked just fine. What might I be doing wrong?

btw: it works just fine with MS Access, but I'd prefer to work directly 
from my Excel spreadsheets.

Thanks in advance
Steve

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] vecortizing uniroot() for numerical solutions

2005-06-30 Thread Daniel E. Bunker
#Hi All,
#   
#I need to solve a somewhat complex equation at many parameter 
values for
#a number of different parameters.
#A simplified version of the equation is: 0= (d1/(h1^2))-(h2*(d2^2))
#I'd like to solve it across a parameter space of d1 and d2, holding
#h1 and h2 constant.

# It seems that uniroot() can do it, but I don't see how to 
vectorize it.

#This works just fine:

R12 = function(d1, d2, h1, h2) (d1/(h1^2))-(h2*(d2^2))
uniroot(R12, interval=c(-100,100), tol=0.0001, d2=1, h1=1, h2=1)

#but to explore the entire parameter space it seems I would need a 
series of loops

R12 = function(d1, d2, h1, h2) (d1/(h1^2))-(h2*(d2^2))
df1=data.frame(h1=numeric(0), h2=numeric(0),d1=numeric(0),d2=numeric(0))
h1=1
h2=1
for(i in 1:5) {
output=uniroot(R12, interval=c(-100,100), tol=0.0001, d2=i, h1=1, h2=1)
d2=i
df1[i,h1]=h1
df1[i,h2]=h2
df1[i,d2]=i
df1[i,3]=output$root
}
df1

#what I'd really like to do is something like:

R12 = function(d1, d2, h1, h2) (d1/(h1^2))-(h2*(d2^2))
uniroot(R12, interval=c(-100,100), tol=0.0001, d2=c(1:5), h1=c(1:5), 
h2=c(1:5))

#but R rejects the multiple values for d2.

#I could use a numerical solver such as XPPAUT, but would rather be 
able to do it all in R.

#Any thoughts on vectorizing this would be greatly appreciated.


#Thanks!  -Dan

-- 

Daniel E. Bunker
Associate Coordinator - BioMERGE
Post-Doctoral Research Scientist
Columbia University
Department of Ecology, Evolution and Environmental Biology
1020 Schermerhorn Extension
1200 Amsterdam Avenue
New York, NY 10027-5557

212-854-9881
212-854-8188 fax
deb37ATcolumbiaDOTedu

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Help with stripplot

2005-06-30 Thread Ghosh, Sandeep
Another question, in stripchart is there a way to draw a legends. I need 
legends that gives the mice count for each genotype wt/het/hom, something like 
the xyplot plot support for key/auto.key.

-Sandeep


-Original Message-
From: Deepayan Sarkar [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 30, 2005 12:04 PM
To: Ghosh, Sandeep
Cc: Sundar Dorai-Raj; r-help@stat.math.ethz.ch
Subject: Re: [R] Help with stripplot


On Thursday 30 June 2005 11:40, Ghosh, Sandeep wrote:
 Thanks for the prompt reply. I need some more help. I want the datapoints
 for each group to show up in a different color, like all wt data points to
 be green, het to be blue and hom to be red. Also I need the median point of
 all the data points plotted as well by a short line as shown in attachment.

stripchart takes you almost all the way there:


with(dataFrame, 
 stripchart(marbles_buried ~ genotype, 
vert = TRUE, method = jitter, 
col = c('blue', 'red', 'green')))
meds - as.vector(with(dataFrame, 
   by(marbles_buried, genotype, median)))
segments((1:3)-0.25, meds, (1:3)+0.25, meds, col = c('blue', 'red', 'green'))


Deepayan

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Trouble with Excel table connection

2005-06-30 Thread bogdan romocea
The best 3 things you can do in this situation are:
1. don't use Excel.
2. never use Excel.
3. never ever use Excel again.

Spreadsheets are _not_ databases. In particular, Excel is a time bomb
- use it long enough and you'll get burned (perhaps without even
realizing it). See
http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html for
some details.

hth,
b.


 -Original Message-
 From: Steve Sherman [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, June 30, 2005 2:46 PM
 To: r-help@stat.math.ethz.ch
 Subject: [R] Trouble with Excel table connection
 
 
 Hello,
 
 I've been using odbcConnectExcel to connect to a spreadsheet database 
 containing a single worksheet. Unfortunately when I try to access the 
 data R cannot see the table. When I run sqlTables it shows 
 the worksheet 
 as a SYSTEM TABLE instead of as a TABLE that I can access. I 
 am fairly 
 certain that I am do all of the same things I've done in the 
 past when 
 it worked just fine. What might I be doing wrong?
 
 btw: it works just fine with MS Access, but I'd prefer to 
 work directly 
 from my Excel spreadsheets.
 
 Thanks in advance
 Steve
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] ranking predictive features in logsitic regression

2005-06-30 Thread Stephen Choularton
Hi
 
Is there some function R that multiplies each coefficient by the
standard deviation of the corresponding variable and produces a ranking?
 
Stephen
 
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.

 

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Trouble with Excel table connection

2005-06-30 Thread Steve Sherman
That's the conclusion that I've come to. It was working fine, then it 
wasn't.

I know I was using the same commands because I wrote them into a small 
script.

I'll just import it into Access and stop pulling my hair out over this.

Thanks.

bogdan romocea wrote:

The best 3 things you can do in this situation are:
1. don't use Excel.
2. never use Excel.
3. never ever use Excel again.

Spreadsheets are _not_ databases. In particular, Excel is a time bomb
- use it long enough and you'll get burned (perhaps without even
realizing it). See
http://www.burns-stat.com/pages/Tutor/spreadsheet_addiction.html for
some details.

hth,
b.


  

-Original Message-
From: Steve Sherman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 30, 2005 2:46 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Trouble with Excel table connection


Hello,

I've been using odbcConnectExcel to connect to a spreadsheet database 
containing a single worksheet. Unfortunately when I try to access the 
data R cannot see the table. When I run sqlTables it shows 
the worksheet 
as a SYSTEM TABLE instead of as a TABLE that I can access. I 
am fairly 
certain that I am do all of the same things I've done in the 
past when 
it worked just fine. What might I be doing wrong?

btw: it works just fine with MS Access, but I'd prefer to 
work directly 
from my Excel spreadsheets.

Thanks in advance
Steve

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html




  


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to rotate the axisnames in a BARPLOT

2005-06-30 Thread hulubu
Hi all,

- how can I do a barplot with rotated axis labels? I've seen the example for
just a plot in the FAQ, but I'll missing the coordinates to plot my text at
the right position beneath the bars. 
Is there any (easy?) solution?

- how can I set the y-axis in a barplot to logarithmic scale?

Many thanks in advance!

Best Regards
 Tom

--

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to rotate the axisnames in a BARPLOT

2005-06-30 Thread Marc Schwartz (via MN)
On Thu, 2005-06-30 at 23:05 +0200, [EMAIL PROTECTED] wrote:
 Hi all,
 
 - how can I do a barplot with rotated axis labels? I've seen the example for
 just a plot in the FAQ, but I'll missing the coordinates to plot my text at
 the right position beneath the bars. 
 Is there any (easy?) solution?
 
 - how can I set the y-axis in a barplot to logarithmic scale?
 
 Many thanks in advance!
 
 Best Regards
  Tom

The same concept for rotating axis labels in a regular plot per the FAQ
can be used in a barplot, as long as you know that barplot() returns the
bar midpoints. So:

 ## Increase bottom margin to make room for rotated labels
 par(mar = c(7, 4, 4, 2) + 0.1)

 ## Create plot and get bar midpoints in 'mp'
 mp - barplot(1:10)

 ## Set up x axis with tick marks alone
 axis(1, at = mp, labels = FALSE)

 ## Create some text labels
 labels - paste(Label, 1:10, sep =  )

 ## Plot x axis labels at mp
 text(mp, par(usr)[3] - 0.5, srt = 45, adj = 1,
  labels = labels, xpd = TRUE)

 ## Plot x axis label at line 4
 mtext(1, text = X Axis Label, line = 4)

See ?barplot for more information.

With respect to the log scales, you would need to use barplot2(), which
is in the 'gplots' package on CRAN. barplot2() supports log scales using
the same 'log' argument as plot().

HTH,

Marc Schwartz

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] ts.plot data labels

2005-06-30 Thread Beth Wilmot
Dear R users,
I am trying to put labels on the data points on a ts.plot.
 
I have tried:
ts.plot(df.ts, gpars=list(xy.labels=colnames(df.ts), xlab=group, 
ylab=level))
which plots fine but gives no labels
 
xy.labels=TRUE 
also plots without labels
 
I also tried using text() but got an error 
 
Error in xy.coords(x, y, recycle = TRUE) : 
Argument x is missing, with no default


Thanks,
Beth
 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] ts.plot data labels

2005-06-30 Thread Berton Gunter
 
 xy.labels is not a valid parameter for ts.plot;it is for plot.ts (the
plot method for ts objects). Please re-read the Help files and note the
difference between them.

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

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Beth Wilmot
 Sent: Thursday, June 30, 2005 2:25 PM
 To: r-help@stat.math.ethz.ch
 Subject: [R] ts.plot data labels
 
 Dear R users,
 I am trying to put labels on the data points on a ts.plot.
  
 I have tried:
 ts.plot(df.ts, gpars=list(xy.labels=colnames(df.ts), 
 xlab=group, ylab=level))
 which plots fine but gives no labels
  
 xy.labels=TRUE 
 also plots without labels
  
 I also tried using text() but got an error 
  
 Error in xy.coords(x, y, recycle = TRUE) : 
 Argument x is missing, with no default
 
 
 Thanks,
 Beth
  
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] ts.plot data labels

2005-06-30 Thread Gabor Grothendieck
On 6/30/05, Beth Wilmot [EMAIL PROTECTED] wrote:
 Dear R users,
 I am trying to put labels on the data points on a ts.plot.
 
 I have tried:
 ts.plot(df.ts, gpars=list(xy.labels=colnames(df.ts), xlab=group, 
 ylab=level))
 which plots fine but gives no labels
 
 xy.labels=TRUE
 also plots without labels
 
 I also tried using text() but got an error
 
 Error in xy.coords(x, y, recycle = TRUE) :
Argument x is missing, with no default


Try using text.  See ?ts.plot and ?text for more info:

ts.plot(ts(1:26), type = p, gpars = list(pch = 20))  # points
text(1:26, 1:26, letters, offset = 0.2, cex = .5, pos = 1) # letters
below points

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] R CMD INSTALL typo?

2005-06-30 Thread Huntsinger, Reid
I recently installed R-2.1.1 and R CMD INSTALL gives me the message

mkdir: cannot create directory `': No such file or directory

before doing whatever it is supposed to do. It looks to me like the script
template INSTALL.in has a typo, in line 97: (excerpt follows starting with
line 93)

startdir=`${GETWD}`
: ${TMPDIR=/tmp}
{ tmpdir=`(mktemp -d -q ${TMPDIR}/R.INSTALL.XX) 2/dev/null` \
 test -n ${tmpdir}  test -d ${tmpdir} ; } ||
  { test -n ${RANDOM}  tmp=${TMPDIR}/R.INSTALL$$-${RANDOM} \
   (${MKDIR_P} ${tmpdir}) ; } ||
  { tmpdir=${TMPDIR}/R.INSTALL.$$  (${MKDIR_P} ${tmpdir}) ; } ||
  (error cannot create temporary directory  exit 1)
tmpdir=`cd ${tmpdir}  ${GETWD}`

where the tmp= midway through should I think be tmpdir=. Making that
change solved the problem. I didn't see the problem mentioned anywhere so
thought I should point it out and make sure I'm not breaking something.

Reid Huntsinger

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to rotate the axisnames in a BARPLOT

2005-06-30 Thread Francisco J. Zagmutt
Try the following.  I made this based on the eaxmple from FAQ 7.27

tab=table(rpois(100, 2))  #Creates table to make a barplot
par(mar = c(6, 4, 4, 2) + 0.1)#Prepares margin to fit x axis labels
pts=barplot(tab, xaxt = n, xlab = , col=yellow2)#Barplot of tab 
without x axis or label.
#Also stores the middle points of the bars

axis(side=1,at=pts, labels=F, tick=T)#Creates x axis with tickmarks exactly 
at the middle of the bars
nam=paste(Text,names(tab))#Names of each category. To be used on labels

text(pts, par(usr)[3] - 1.5, srt = 45, adj = 1, labels = nam, xpd = TRUE) 
#Adds the tickmark labels
# adj = 1 will place the text at the end ot the tick marks
# xpd = TRUE will clip text outside the plot region

mtext(1, text = My Axis Label, line = 4) #Adds x axis label at line 2

Second hit of  RSiteSearch(logarithmic axis barplot) takes you to barplot2 
{gplots}


Cheers

Francisco

From: [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] How to rotate the axisnames in a BARPLOT
Date: Thu, 30 Jun 2005 23:05:15 +0200 (MEST)

Hi all,

- how can I do a barplot with rotated axis labels? I've seen the example 
for
just a plot in the FAQ, but I'll missing the coordinates to plot my text at
the right position beneath the bars.
Is there any (easy?) solution?

- how can I set the y-axis in a barplot to logarithmic scale?

Many thanks in advance!

Best Regards
  Tom

--

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] FW: plot legend outside the grid

2005-06-30 Thread Ghosh, Sandeep


-Original Message-
From: Ghosh, Sandeep 
Sent: Thursday, June 30, 2005 5:43 PM
To: 'Berton Gunter'
Subject: plot legend outside the grid 


Thanks for the pointers... I managed to get everything to look and feel the way 
I want except for the legend to plot outside the grid... Thanks for the note on 
the par, but I'm not able to it to plot outside the plot grid..

dataFrame - as.data.frame(t(structure(c(
64,'wt',
62,'wt',
66,'wt',
65,'wt',
60,'wt',
61,'wt',
65,'wt',
66,'wt',
65,'wt',
63,'wt',
67,'wt',
65,'wt',
62,'wt',
65,'wt',
68,'wt',
65,'wt',
63,'wt',
65,'wt',
62,'wt',
65,'wt',
66,'wt',
62,'wt',
65,'wt',
65,'wt',
66,'wt',
65,'wt',
62,'wt',
65,'wt',
66,'wt',
65,'wt',
61,'wt',
65,'wt',
66,'wt',
65,'wt',
62,'wt',
63,'het',
67,'het',
60,'het',
67,'het',
66,'het',
62,'het',
65,'het',
62,'het',
61,'het',
62,'het',
66,'het',
60,'het',
65,'het',
65,'het',
61,'het',
64,'het',
68,'het',
64,'het',
63,'het',
62,'het',
64,'het',
62,'het',
64,'het',
65,'het',
60,'het',
65,'het',
70,'het',
63,'het',
67,'het',
66,'het',
65,'hom',
62,'hom',
68,'hom',
67,'hom',
67,'hom',
63,'hom',
67,'hom',
66,'hom',
63,'hom',
72,'hom',
62,'hom',
61,'hom',
66,'hom',
64,'hom',
60,'hom',
61,'hom',
66,'hom',
66,'hom',
66,'hom',
62,'hom',
70,'hom',
65,'hom',
64,'hom',
63,'hom',
65,'hom',
69,'hom',
61,'hom',
66,'hom',
65,'hom',
61,'hom',
63,'hom',
64,'hom',
67,'hom'), .Dim=c(2,98;

colnames(dataFrame) - c('marbles_buried', 'genotype');

png('mb.png', width=400, height=400, pointsize=8);

dataFrame[c(marbles_buried)] - lapply(dataFrame[c(marbles_buried)], 
function(x) as.numeric(levels(x)[x]));

par(xpd=FALSE)

with (dataFrame, stripchart(marbles_buried ~ genotype, method=jitter, 
vertical=TRUE,  col = c('blue', 'red', 'green'), xlab='Genotype', ylab = 
Marbles Buried, main='MBA WTs Vs HOMs', pch=c(1,4,2), jitter=1/3.5, cex=1))

meds - as.vector(with(dataFrame, by(marbles_buried, genotype, mean)))
segments((1:3)-0.25, meds, (1:3)+0.25, meds, col = c('blue', 'red', 'green'));

dataWt - subset(dataFrame, genotype=='wt', select=c(marbles_buried,genotype));
dataHet - subset(dataFrame, genotype=='het', 
select=c(marbles_buried,genotype));
dataHom - subset(dataFrame, genotype=='hom', 
select=c(marbles_buried,genotype));

wtCount - length(dataWt$marbles_buried);
hetCount - length(dataHet$marbles_buried);
homCount - length(dataHom$marbles_buried);
wtLegend - paste (wt, (n=, wtCount, ));
hetLegend - paste (het, (n=, hetCount, ));
homLegend - paste (hom, (n=, homCount, ));

par(xpd=TRUE)
legend(1, max(as.vector(dataFrame$marbles_buried)), c(wtLegend, hetLegend, 
homLegend), col=c('blue', 'red', 'green'), pch=c(1,4,2));

-Thanks
Sandeep.

-Original Message-
From: Berton Gunter [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 30, 2005 2:55 PM
To: Ghosh, Sandeep
Subject: RE: [R] Help with stripplot


Of course!

stripchart() is a base graphics function and tehrefore has available to it
the base graphics functionality, like (the base graphics function, **not**
the lattice argument) legend(). See ?legend in the graphics package. Note
the use of locator() for positioning the legend.

Note: By default the legend will be clipped to the plot region. If you wish
to have a legend outside the plot region set the xpd parameter of par to
TRUE or NA prior to plotting.

-- Bert 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Ghosh, Sandeep
 Sent: Thursday, June 30, 2005 12:22 PM
 To: Deepayan Sarkar; r-help@stat.math.ethz.ch
 Subject: Re: [R] Help with stripplot
 
 Another question, in stripchart is there a way to draw a 
 legends. I need legends that gives the mice count for each 
 genotype wt/het/hom, something like the xyplot plot support 
 for key/auto.key.
 
 -Sandeep

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] request/suggestion: modified names

2005-06-30 Thread Gabor Grothendieck
On 6/30/05, Ritter, Christian C GSMCIL-GSTMS/2
[EMAIL PROTECTED] wrote:
 For some time now I use a modified version of names (extract direction) of 
 the following type:
 Names-
 function (x,filter=^)
 {
grep(filter,names(x),value=TRUE)
 }
 
 Request:
 Has anyone already written a version which goes the other way (that is, which 
 allows assignment of the type Names(x,filter)-...). Naive versions are 
 obvious, but I think something would have to be done to check validity. So if 
 anyone has already done it for me, I would be very happy if you could share 
 it. Such a function would be quite useful when working with large data frames 
 (as I typically do) and need to edit names in a convenient way.
 
 Suggestion:
 Wouldn't the filter argument make sense in general, that is in names and 
 not only in a custom version Names?
 

This is not a direct answer to your question, as stated, but
if what is desired is really a method to do ad hoc editing 
(as opposed to renaming columns on a programmatic basis) then 
one can use 'fix':

irish - head(iris) # test data
fix(irish)

At this point a spreadsheet pops up and one can edit the 
header directly in a GUI.  (I am on Windows XP -- not sure if this
works on other OSes).  Exit the spreadsheet and its done.

This can alternately be done in JGR, a front end to R.  Press ctrl-B to 
access the object browser.  Pick out your data frame and a spreadsheet 
will popup.  Right click the column name and choose Rename.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] how to code garch-t(1,1),egarch(1,1) and gjr(1,1)

2005-06-30 Thread Nongluck Klibbua
hi,
I try to code garch-t(1,1),egach(1,1) and gjr(1,1) to estimate my data.
How I can code these model with my data (e.g. garch code is
y-garch(x,order=c(1,1))
best regards,
luck

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] compiling under windows

2005-06-30 Thread Philip Bermingham
What is the best way to set up a project in visual studio, work on R and
re compile?  Is it better to use a different compiler or programming
environment?  I specifically want to work on C and Fortran extensions. 

 

Philip Bermingham 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html