Re: [R] licensing of R packages

2008-11-15 Thread Berwin A Turlach
G'day Duncan,

On Fri, 14 Nov 2008 15:24:03 -0500
Duncan Murdoch [EMAIL PROTECTED] wrote:

  Moreover, if you write a C/C++ program that makes use of GNU
  extensions, you'd be in violation of the GPL if you were to
  distribute it without GPLing it.  Even the FSF doesn't believe
  that:
  
  http://www.fsf.org/licensing/licenses/gpl-faq.html#CanIUseGPLToolsForNF
  
  Could you please explain how you come to this opinion? 
 
 I believe your argument was that if my program can't be used without
 a library that is currently only available under the GPL, then my
 program must be considered as a derivative work, so I must license it
 under the GPL as well.

It depends now what you mean with my program.  I was making my
comments specifically within the context of the original posters
questions about Numerit's behaviour and Barry's assertion that he could
write a C program that relies on a GPL'd library, distribute the
compiled binary of that C program without the GPL'd library and just
ask the user to get the GPL'd library from somewhere else so that he or
she could then run the program.  

You seem to extend the scope to a more general definition of what a
program constitutes, including the distribution of source code for an
interpreter.  As I tried to point out, if you distribute source code
to be interpreted by an interpreter that is GPL'd, you bring up all
kind of issues.

 Well, if my program uses GNU extensions, it can only be used when 
 compiled by gcc, which I believe is GPL'd.  So your argument would
 imply that it is a derivative work.

Not at all.  Please read what I said.  Is the program compiled from C
code that uses GNU extensions all of a sudden linked to a
GPL'd /usr/lib/libgnuextension library, with that library being the
only source of the needed functionality?

The C code is input (data) to the GNU compiler.  The license of the GNU
compiler does not specify that the output (i.e. the binary) has to be
GPL'd.  Nor does the FSF claim copyright to that output.  (IIRC, when
reading the EULA of some commercial compilers in the 80's, some
software houses seriously claimed the copyright of any program
compiled with their compilers.  I think this clause disappeared rather
soon when users realised its implication.) 

 None of us (you, me or the FSF) think the latter argument is valid.

Agreed, and in my case, and presumably also the FSF's case, it is
because such an argument was never made and never claimed.  

To be, hopefully, completely precise:  if you distribute a binary
program which can only be run if linked against a GPL'd library, i.e.
no alternative implementation of the library providing the
functionality your binary needed exists, then that binary is a
derivative work of the GPL'd library.  Hence, in order to distribute
it, you would have to adhere to the rules under which use of the GPL'd
library was granted to you.  Distributing your binary, and asking your
users to get the GPL'd library separately from somewhere else, does not
absolve you from your responsibilities under the GPL.

 I don't see a material difference from the former argument, so I
 conclude the former argument is invalid as well.

My scenario:  a binary program is distributed which can only be run if
it is linked by the user to a GPL'd library.  The source code of that
binary program is not distributed and there is no offer of providing
it.  There is no way of using that program except with the GPL'd
library, i.e. you need to have the GPL'd library libXXX, there is no
other (whether commercial or not) provider of libXXX that implements
the same featuers.  Thus, it is clear that when you produced the
binary, you had the GPL'd library on your system, you linked the binary
against that library and at that moment you created a derivative work
of the GPL'd library.  

Your scenario (as I understand it):  You use a GPL'd compiler to compile
your program which is then only linked to system libraries available on
any similar OS. The compiler offers extension to the language that other
compilers don't offer, but produces binaries that are only linked to
said standard libraries.  The GPL'd compiler makes no claims on the
binary that it produces.

Sorry, but if you do not see a material difference here, then I guess
it is best that we just agree to disagree. :)

  The argument in the latter FAQ does seem to imply that R scripts
  must be GPL'd, and again:  that's nonsense.
  
  Not at all, read the complete FAQ, especially the part I mention
  above about interpreted languages.
 
 I think the complete FAQ is inconsistent.  

I guess that comes from the fact that you do not see a material
difference where other do. :)

 Some of it is accurate (e.g. the bits that say you can use GPL'd
 software without GPL'ing your own work) and some of it is not (the
 parts that imply dynamic linking makes something a derivative work.)

As far as I understand, there have been people who shared that thought,
namely that dynamic linking does not imply 

Re: [R] GAM and Poisson distribution

2008-11-15 Thread Ben Bolker



sallyr wrote:
 
 Hi -I'm running a GAM with 7 explanatory variables with a Poisson error
 structure.  All of the variables are continuous so I'm getting error
 messages in R.  
 
 cod.fall.full.gam.model-gam(Kept.CPUE~s(HOUR)+s(LAT_dec)+s(LONG_dec)+s(meantemp_C)+s(meandepth_fa)+s(change_depth)+s(seds),
 data=cod.fall.version2,family=poisson)
 
 In dpois(y, mu, log = TRUE) ... : non-integer x = 5.325517
 
 Thanks Sally
 

If your response variable is an intensity (catch per unit effort) you
probably need to
include an offset for the total effort, e.g. something like
offset=log(effort)


-- 
View this message in context: 
http://www.nabble.com/GAM-and-Poisson-distribution-tp20508604p20513810.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] configuring graphics device in Linux

2008-11-15 Thread Peter Dalgaard

Erik Iverson wrote:
You should begin by telling us what you did to produce the result.  That 
way we can tell if it's something in your R commands or not.  If you 
give us step by step instructions to reproduce the problem (with 
simulated data, or a dataset distributed with R), it becomes much easier 
to debug.


Good advice in general, but in this case I think John is right in 
assuming that the issue is mainly with his graphics hardware setup, and 
he did tell us about that. The R version would have been nice though; we 
have fixed various issues in this area over time.



i'm trying plot() from Owen's _The R Guide_ and having trouble with
being able to view the result. the Graphics Device 2 draws an image i
can only see the top part of and when i try to manipulate the window to
see the image, the window then says: ...ure margins too lar... in
large letters. i guess it says something about picture margins too
large. i'm not sure how to determine all my video settings in Ubuntu
(8.04), what i do know is this:
1280X800
60Hz
Intel 945GM graphics
and according to /var/log/Xorg.0.log: DPI set to (96,96)

i found x11(), but i'm not sure what to change there, if i should even
change it. can someone advise how to adjust settings, please?


These are generic symptoms of using a too large font for your display, 
but that can happen for a number of reasons.


According to your setup, the system should believe that you have an ~8 
inch screen (800/96) and the default X11 window is 7x7 inches so there 
_should_ be plenty of room, but some systems try to outsmart the user 
and use the actual physical dimensions, which could be smaller (higher 
DPI).  You might want to check with xdpyinfo (from the shell).


In any case, you can try reducing width, height, and (especially) 
pointsize in the call to x11() (which you'd issue _before_ the plot()). 
Or set them with X11.options().


--
   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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] ggplot2 - two or more axis

2008-11-15 Thread David Hajage
Thank you very much for the answer.

I have seen very often the number of subject at risk on survival graph (see
my pdf file). It is very easy to plot the curve with geom_step(), but is
there a better way to show the number of subjects at risk at each time ?

Thank you for your advice.

2008/11/14 hadley wickham [EMAIL PROTECTED]

 Hi David,

  I'm trying to learn how to make a plot with the amazing package ggplot2.
 
  I was wondering if it was possible to draw 2 (or more) x (or y) axis in
 the
  same graph. For example :
   - I want to show two informations at each x coordinate : a survival
 curve,
  I want to show the time (0, 12 and 24 months) and the number of subject
 at
  risk at each time.
   - I want to draw two curves that don't have the same unit

 Unfortunately, the capability is currently unavailable in ggplot2 and
 is unlikely to ever be available because I believe it is a
 fundamentally inaccurate means of presenting data.  However, in the
 next version it will be much easier to created faceted displays with
 varying scales, which should be a better solution for many of these
 types of problems.

 Regards,

 Hadley

 --
 http://had.co.nz/



surv.pdf
Description: Adobe PDF document
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] configuring graphics device in Linux

2008-11-15 Thread john polo
megha patnaik wrote:
 Hi John,
 an R problem, but an X11 bug in Ubuntu. This is evident from
plot(rnorm(10))
 failing to perform. If you are seeing this, then it is because X11
does not
 automatically detect Intel graphic cards. The solution is to edit your
 xorg.conf file, changing it to something like (this is from my xorg.conf):

 Section Device
 IdentifierIntel Corporation Mobile 945GM/GMS, 943/940GML Express
 Integrated Graphics Controller (rev 03)
 Driverintel
 EndSection
Megha, thanks for your help.
i tried plot(rnorm(10)) and still was not able to see a plot. i
checked /etc/X11/xorg.conf and it looks like this, without me editing it:
Section Device
Identifier  Intel Corporation Mobile 945GM/GMS, 943/940GML
Express Integrated Graphics Controller
Driver  intel
BusID   PCI:0:2:0
EndSection

Section Monitor
Identifier  Generic Monitor
Option  DPMS
EndSection

Section Screen
Identifier  Default Screen
Device  Intel Corporation Mobile 945GM/GMS, 943/940GML
Express Integrated Graphics Controller
Monitor Generic Monitor
DefaultDepth24
SubSection Display
Modes   1280x800
EndSubSection
EndSection

 The steps I carried out to detect where the problem was were as follows:
 1. Checked whether basic plots in R worked
 2. Created a new UID ( which did not have my saved settings in R) and
tried
 basic plots.

 If 2. told me that margins were too large, then this was not a problem due
 to my past commands in R.
i have tried your suggested plot and the one from the tutorial. neither
worked. i'm using R 2.6.2 straight from the install through Unbuntu's
package manager, so i don't think there are any scripts or whathaveyou
on start.

 xorg.conf is a dangerous file to meddle with. The other symptoms I was
 seeing of poor graphics was an XL font size on my login screen and broken
 images in google earth. Are you seeing anything of the sort?
yes, actually i do get the large fonts at start up like you do. i tried
trolling around the Ubuntu forums for stuff about video settings, but
only briefly.

 I am relatively new to the mailing list. Do tell me if this is better
taken
 offline.
i'm kind of new too. maybe someone else will tell me(us) to take this
somewhere else.

Peter Dalgaard wrote:
 Good advice in general, but in this case I think John is right in
assuming that the issue is mainly with his graphics hardware setup, and
he did tell us about that. The R version would have been nice though;
we have fixed various issues in this area over time.
thank you Peter. i appreciate you assistance. it's version 2.6.2

 According to your setup, the system should believe that you have an
~8 inch screen (800/96) and the default X11 window is 7x7 inches so
there _should_ be plenty of room, but some systems try to outsmart
the user and use the actual physical dimensions, which could be
smaller (higher DPI).  You might want to check with xdpyinfo (from
the shell).
from xdpyinfo:
screen #0:
  dimensions:1280x800 pixels (289x21 millimeters)
  resolution:112x968 dots per inch

 In any case, you can try reducing width, height, and (especially)
pointsize in the call to x11() (which you'd issue _before_ the plot()).
Or set them with X11.options().
i tried playing with plot(),halving (and again) the w,h, and pointsize,
to no avail. and help.search(X11.options) reveals nothing.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] configuring graphics device in Linux

2008-11-15 Thread Megha Patnaik
My xorg.conf has Configured Monitor as opposed to Generic Monitor. Here
is the relevant portion of my xorg.conf:

Section Device
IdentifierIntel Corporation Mobile 945GM/GMS, 943/940GML Express
Integrated Graphics Controller (rev 03)
Driverintel
EndSection

Section Monitor
IdentifierConfigured Monitor
EndSection

Section Screen
IdentifierDefault Screen
MonitorConfigured Monitor
Device00:02.0 VGA compatible controller: Intel Corporation Mo
bile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

EndSection

Section ServerLayout
IdentifierDefault Layout
ScreenDefault Screen
InputDeviceSynaptics Touchpad
EndSection

If this doesn't work and you want to dig deeper:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/221179


2008/11/15 john polo [EMAIL PROTECTED]

 megha patnaik wrote:
  Hi John,
  an R problem, but an X11 bug in Ubuntu. This is evident from
 plot(rnorm(10))
  failing to perform. If you are seeing this, then it is because X11
 does not
  automatically detect Intel graphic cards. The solution is to edit your
  xorg.conf file, changing it to something like (this is from my
 xorg.conf):
 
  Section Device
  IdentifierIntel Corporation Mobile 945GM/GMS, 943/940GML Express
  Integrated Graphics Controller (rev 03)
  Driverintel
  EndSection
 Megha, thanks for your help.
 i tried plot(rnorm(10)) and still was not able to see a plot. i
 checked /etc/X11/xorg.conf and it looks like this, without me editing it:
 Section Device
Identifier  Intel Corporation Mobile 945GM/GMS, 943/940GML
 Express Integrated Graphics Controller
 Driver  intel
BusID   PCI:0:2:0
 EndSection

 Section Monitor
Identifier  Generic Monitor
Option  DPMS
 EndSection

 Section Screen
Identifier  Default Screen
Device  Intel Corporation Mobile 945GM/GMS, 943/940GML
 Express Integrated Graphics Controller
Monitor Generic Monitor
DefaultDepth24
SubSection Display
Modes   1280x800
EndSubSection
 EndSection

  The steps I carried out to detect where the problem was were as follows:
  1. Checked whether basic plots in R worked
  2. Created a new UID ( which did not have my saved settings in R) and
 tried
  basic plots.
 
  If 2. told me that margins were too large, then this was not a problem
 due
  to my past commands in R.
 i have tried your suggested plot and the one from the tutorial. neither
 worked. i'm using R 2.6.2 straight from the install through Unbuntu's
 package manager, so i don't think there are any scripts or whathaveyou
 on start.

  xorg.conf is a dangerous file to meddle with. The other symptoms I was
  seeing of poor graphics was an XL font size on my login screen and broken
  images in google earth. Are you seeing anything of the sort?
 yes, actually i do get the large fonts at start up like you do. i tried
 trolling around the Ubuntu forums for stuff about video settings, but
 only briefly.

  I am relatively new to the mailing list. Do tell me if this is better
 taken
  offline.
 i'm kind of new too. maybe someone else will tell me(us) to take this
 somewhere else.

 Peter Dalgaard wrote:
  Good advice in general, but in this case I think John is right in
 assuming that the issue is mainly with his graphics hardware setup, and
 he did tell us about that. The R version would have been nice though;
 we have fixed various issues in this area over time.
 thank you Peter. i appreciate you assistance. it's version 2.6.2

  According to your setup, the system should believe that you have an
 ~8 inch screen (800/96) and the default X11 window is 7x7 inches so
 there _should_ be plenty of room, but some systems try to outsmart
 the user and use the actual physical dimensions, which could be
 smaller (higher DPI).  You might want to check with xdpyinfo (from
 the shell).
 from xdpyinfo:
 screen #0:
  dimensions:1280x800 pixels (289x21 millimeters)
  resolution:112x968 dots per inch

  In any case, you can try reducing width, height, and (especially)
 pointsize in the call to x11() (which you'd issue _before_ the plot()).
 Or set them with X11.options().
 i tried playing with plot(),halving (and again) the w,h, and pointsize,
 to no avail. and help.search(X11.options) reveals nothing.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Which data structure in R can mimic hash in PERL best?

2008-11-15 Thread Leon Yee
Dear all,

Which data structure in R can mimic hash in PERL? I'd like to set up
a lookup table, which could be accomplished by HASH if using PERL. Which
of the data structures in R is the most efficient for lookup table?
Thanks for your help.

Best regards,
Leon

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] PostScript File Dimensions

2008-11-15 Thread Rodrigo Aluizio
Hi List, here I go again.

Well I need to save plotted objects as .eps using the postscript() function,
well I can do that but all resulting object are perfect squared dimensions
(x = y). I need a rectangular output something like x = 2y dimension. Is it
possible? The I’m new to R and postscript image format!

 

I’m doing this…

 

postscript('ClusterWardBC.eps',setEPS(),bg='white')

plot(WardBC,which.plots=2,main='Living Fauna')

dev.off()

 

and I got the square image

 

I tried this to solve

 

postscript('ClusterWardBC.eps',setEPS(width=600,height=300),bg='white')

plot(WardBC,which.plots=2,main='Living Fauna')

dev.off()

 

and I got and output but any software or printer can handle it. So it’s
useless.

 

Any ideas?!

 

Ps.: The plotted object is a cluster tree, but it also occurs with other
plots I’ve done.

 

Thank you for the attention.

___
MSc.  mailto:[EMAIL PROTECTED] Rodrigo Aluizio
Centro de Estudos do Mar/UFPR
Laboratório de Micropaleontologia
Avenida Beira Mar s/n - CEP 83255-000
Pontal do Paraná - PR - BRASIL


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] r2html output gives NULL

2008-11-15 Thread slurpy

Win xp sp2, R v2.7.1, R2HTML v1.59
Hi.  I have tried searching this extensively but to no avail.  While using
the R2HTML package, everytime I use HTMLStart() followed by HTML.title or
HTML functions, I get a NULL in the output.  For instance, 

 HTMLStart(outdir='dir name',filename=file,extension=html,echo=FALSE)
 HTML.title(hello,HR=3);
 summary(regression_model);
 HTML(world); 
 HTMLStop();

gives the following output:

hello

NULL

summary values

world

NULL

I tried but couldn't figure out why this happens.  Any help please?

-- 
View this message in context: 
http://www.nabble.com/r2html-output-gives-%22NULL%22-tp20515832p20515832.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Lattice: groups and no groups with panel.superpose

2008-11-15 Thread Robert Buitenwerf

Dear R listers,
 
I am trying to create a lattice plot with independent regression lines per group
for each panel, plus one overall regression line per panel. I succeed in having
the separate regression lines for each group per panel, but I can't figure out
how to add the overall regression line over all groups. I have learnt a lot from
the list, but I can't find an example for what I want to do...
 
with the following example data (from another post):
  years-2000:2006
  weeks-1:20
  yr-rep(years,rep(length(weeks)*6,length(years)))
  wk-rep(weeks,rep(6,length(weeks)))
  temp-rep(4:9,length(years)*length(weeks))
  yvar-round(rnorm(length(years)*length(weeks)*6,mean=30,sd=4),0)
  xvar-(rnorm(length(years)*length(weeks)*6)+5)/10
  df-data.frame(year=yr,week=wk,temp=temp,   yvar=yvar,
  xvar=xvar)
 
I get the regression lines per group for each panel using:
  
  xyplot(yvar~year|week,data=df,layout = c(4, 5),
 type='p',
 groups = temp ,
 panel = panel.superpose,
 panel.groups = function(x, y, ..., lty) {
 panel.xyplot(x, y, ..., lty = lty)
 panel.abline(lm(y~x), lty=3, ...)
 })
   
And obviously the overall regression lines with:
  
  xyplot(yvar~year|week,data=df,layout = c(4, 5),
 type='p',
 panel = function(x, y, ...) {
 panel.xyplot(x, y, ...)
 panel.abline(lm(y~x))
 })
   
Any advice on how to merge the output from the two above graphs would be
greatly appreciated!
 
 
Kind regards,
 
Robert Buitenwerf
Ecologist
SAEON
South Africa
_
[[elided Hotmail spam]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] configuring graphics device in Linux

2008-11-15 Thread Peter Dalgaard

john polo wrote:

According to your setup, the system should believe that you have an
~8 inch screen (800/96) and the default X11 window is 7x7 inches so
there _should_ be plenty of room, but some systems try to outsmart
the user and use the actual physical dimensions, which could be
smaller (higher DPI).  You might want to check with xdpyinfo (from
the shell).

from xdpyinfo:
screen #0:
  dimensions:1280x800 pixels (289x21 millimeters)
  resolution:112x968 dots per inch


Ick!

Yes that will do that to you.

You might want to try putting

DisplaySize 339 212

in the Monitor section of xorg.conf

--
   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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Problems with rbind

2008-11-15 Thread tolga . i . uzuner
Dear R Users,

A recent update on base packages on my R installation has introduced a 
problem to my code which did not exist before the update. The offending 
function is rbind, which fails where it was working just fine before the 
update. 

I have two zoo objects, foo and bar, indexed by class Date. foo starts 
from 2007-10-09 and bar from 2007-10-10. I attempt to pad bar with a 
zero on Date 2007-10-09.

 foo-zoo(1,order.by=as.Date(2007-10-09))
 bar-zoo(2,order.by=as.Date(2007-10-10))
 bar - rbind(zoo(0, order.by = index(foo)[1]), bar)
Error in rep.int(, nrow(r)) : incorrect type for second argument
 

Weird. I am certain the problem is due to a recent update to this package 
as I have an R installation on two pcs, the same line of code works well 
on one and not on the other.

Any help/pointers appreciated ? Is this perhaps a bug in rbind ? I am on R 
version 2.7.2, Windows XP SP2.

Thanks in advance,
Tolga



Tolga Uzuner
Cross-Markets
Chief Investments Office
JP Morgan
6th Floor, 100 Wood Street
London EC2V 7RF
United Kingdom
Asst. Lee Hesketh
Tel: +44-20-3303
Fax: +44-20-77422840


Generally, this communication is for informational purposes only
and it is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation
of any transaction. In the event you are receiving the offering
materials attached below related to your interest in hedge funds or
private equity, this communication may be intended as an offer or
solicitation for the purchase or sale of such fund(s).  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice.
Any comments or statements made herein do not necessarily reflect
those of JPMorgan Chase  Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase 
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] creating matrices from vectors

2008-11-15 Thread James Rudge

If I have 4 vectors (a, b, c, and d) each of length 1000, how do I then create 
1000 two by two matrices from these vectors, such that:
 
myMatrix[i] = matrix(c(a[i],b[i],c[i],d[i]),2)
 
Then I'd like to create a single vector containing the largest eigenvalues of 
each matrix?
 
(Sorry I am quite new to R)
Many thanks,
James
 
_
[[elided Hotmail spam]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] warning : increasing the PDF version to 1.3

2008-11-15 Thread June Kim
What does the warning mean?

In dev.off() : increasing the PDF version to 1.3

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to calculate?

2008-11-15 Thread stat4u

hi,
How can i calculate means with catergory of variable...

like

x   yz
2   3y
3   4n
1   2y
6   3n
9   1y
2   2n
8   3y

i want to get mean of x and y with respective to  its category(y,n)

thanks...
regards,
Muhammad Faisal
-- 
View this message in context: 
http://www.nabble.com/How-to-calculate--tp20516515p20516515.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to calculate?

2008-11-15 Thread Erik Iverson

see ?tapply, for example:

tapply(df$x, df$z, mean)

Might also look at ?ave and ?aggregate depending on what form you want 
the result to have... or the plyr package on CRAN.  Lots of options!



stat4u wrote:

hi,
How can i calculate means with catergory of variable...

like

x   yz
2   3y
3   4n
1   2y
6   3n
9   1y
2   2n
8   3y

i want to get mean of x and y with respective to  its category(y,n)

thanks...
regards,
Muhammad Faisal


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to join these two models?

2008-11-15 Thread Sara Mouro
Dear R users,

I have this 2 models that fit to my data:


M3varI - update (M3, weights=varIdent(form= ~ 1|SITE))

M3AR1-update(M3,correlation=corAR1())

The first one, updates my M3 so that I can account for the variance  
structure of random erros.
The second one, updates my M3 so that I can account for the  
correlation structure of random errors.


How can I put them toghether in one final model?

I have tryed it using gls but I could not do it.

Could you please help me o this?

Bets regards,

Sara Maltez Mouro

Centro de Ecologia Funcional
Departamento de Botânica
Universidade de Coimbra

[EMAIL PROTECTED]
www.uc.pt/ecology/saramaltezmouro


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to join these two models?

2008-11-15 Thread Dieter Menne


Sara Mouro wrote:
 
 I have this 2 models that fit to my data:
 
 M3varI - update (M3, weights=varIdent(form= ~ 1|SITE))
 
 M3AR1-update(M3,correlation=corAR1())
 
 How can I put them toghether in one final model?
 
 

This looks like lme in package nlme, but it is pure guesswork, since your
example is incomplete. Probably you should not use update, but something
like

   lme(x~, random =., weights=varIdent..., correlation=corAR1())

but I am not sure if this somewhat overloaded fit will converge.

Dieter


-- 
View this message in context: 
http://www.nabble.com/how-to-join-these-two-models--tp20516771p20516980.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Which data structure in R can mimic hash in PERL best?

2008-11-15 Thread Duncan Temple Lang


You could use

  new.env(hash = TRUE, emptyenv())

and you can even specify an initial size.

Seth Falcon has a package named dict that allows
for different choices of hash function.

  D.


Leon Yee wrote:

Dear all,

Which data structure in R can mimic hash in PERL? I'd like to set up
a lookup table, which could be accomplished by HASH if using PERL. Which
of the data structures in R is the most efficient for lookup table?
Thanks for your help.

Best regards,
Leon

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Which data structure in R can mimic hash in PERL best?

2008-11-15 Thread Hans W. Borchers

 Dear all,

Which data structure in R can mimic hash in PERL? I'd like to set
 up a lookup table, which could be accomplished by HASH if using PERL.
 Which of the data structures in R is the most efficient for lookup
 table?
 Thanks for your help.
 
 Best regards,
 Leon

The regular answer to this is named arrays/vectors or environments 
and has been given several times here on R-help. Unfortunately, 
everybody is applying a different terminology such as 'maps', 'hashes', 
'tables' or 'dictionaries', etc., so it's difficult to search for those 
entries.

Below I enclose a solution that I have written some month ago. It is 
given in pythonic language, but you can easily translate it into the 
corresponding Perl terms. One drawback is that one cannot use numbers
as keys, only keys following the naming conventions for variable names
are allowed.

Hans Werner Borchers
ABB Corporate Research


#-- Define functions on Hash Tuples (Python alike) -

def.h - function() new.env(hash=TRUE)
len.h - function(dict) length(ls(envir=dict))
set.h - function(key, val, dict) assign(key, val, envir=dict)
get.h - function(key, dict, default=NULL) {
if (exists(key, envir=dict)) { get(key, dict)
} else { default } 
}
has_key - function(key, dict) exists(key, envir=dict)
keys.h - function(dict) ls(envir=dict)
items.h - function(dict) as.list(dict)
values.h - function(dict, mode='character') {
l - as.list(dict)
n - length(l)
if (n==0) invisible(NULL)
v - vector('character', n)
for (i in 1:n) v[i] - l[[i]]
if (mode=='numeric') v - as.numeric(v)
return(v)
}
del.h - function(key, dict) {
if (exists(key, envir=dict)) {
val - get.h(key, dict)
rm(list=c(key), envir=dict)
} else {
val - NULL
}
invisible(val)
}
clear.h - function(dict) {
rm(list=keys.h(dict), envir=dict)
}
#---

-- 
View this message in context: 
http://www.nabble.com/Which-data-structure-in-R-can-mimic-hash-in-PERL-best--tp20515707p20517058.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Which data structure in R can mimic hash in PERL best?

2008-11-15 Thread Duncan Temple Lang



Hans W. Borchers wrote:

Dear all,

   Which data structure in R can mimic hash in PERL? I'd like to set
up a lookup table, which could be accomplished by HASH if using PERL.
Which of the data structures in R is the most efficient for lookup
table?
Thanks for your help.

Best regards,
Leon


The regular answer to this is named arrays/vectors or environments 
and has been given several times here on R-help. Unfortunately, 
everybody is applying a different terminology such as 'maps', 'hashes', 
'tables' or 'dictionaries', etc., so it's difficult to search for those 
entries.


Below I enclose a solution that I have written some month ago. It is 
given in pythonic language, but you can easily translate it into the 
corresponding Perl terms. One drawback is that one cannot use numbers

as keys, only keys following the naming conventions for variable names
are allowed.


I imagine that you want to add inherits = FALSE
to calls to exists() and get() in your code or
else you risk quite unusual semantics of a hash table.

 D.



Hans Werner Borchers
ABB Corporate Research


#-- Define functions on Hash Tuples (Python alike) -

def.h - function() new.env(hash=TRUE)
len.h - function(dict) length(ls(envir=dict))
set.h - function(key, val, dict) assign(key, val, envir=dict)
get.h - function(key, dict, default=NULL) {
if (exists(key, envir=dict)) { get(key, dict)
} else { default } 
}

has_key - function(key, dict) exists(key, envir=dict)
keys.h - function(dict) ls(envir=dict)
items.h - function(dict) as.list(dict)
values.h - function(dict, mode='character') {
l - as.list(dict)
n - length(l)
if (n==0) invisible(NULL)
v - vector('character', n)
for (i in 1:n) v[i] - l[[i]]
if (mode=='numeric') v - as.numeric(v)
return(v)
}
del.h - function(key, dict) {
if (exists(key, envir=dict)) {
val - get.h(key, dict)
rm(list=c(key), envir=dict)
} else {
val - NULL
}
invisible(val)
}
clear.h - function(dict) {
rm(list=keys.h(dict), envir=dict)
}
#---



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Lattice: groups and no groups with panel.superpose

2008-11-15 Thread baptiste auguie

Hi,

I think the following code should do what you want,


 xyplot(yvar~year|week,data=df,layout = c(4, 5),
type='p',
groups = temp ,
panel = function(x, y, ...) {
panel.superpose(x, y, ...)
panel.abline(lm(y~x))
},
panel.groups = function(x, y, ..., lty) {
panel.xyplot(x, y, ..., lty = lty)
panel.abline(lm(y~x), lty=3, ...)
})

Hope this helps,

baptiste

On 15 Nov 2008, at 14:25, Robert Buitenwerf wrote:



Dear R listers,

I am trying to create a lattice plot with independent regression  
lines per group
for each panel, plus one overall regression line per panel. I  
succeed in having
the separate regression lines for each group per panel, but I can't  
figure out
how to add the overall regression line over all groups. I have  
learnt a lot from

the list, but I can't find an example for what I want to do...

with the following example data (from another post):
 years-2000:2006
 weeks-1:20
 yr-rep(years,rep(length(weeks)*6,length(years)))
 wk-rep(weeks,rep(6,length(weeks)))
 temp-rep(4:9,length(years)*length(weeks))
 yvar-round(rnorm(length(years)*length(weeks)*6,mean=30,sd=4),0)
 xvar-(rnorm(length(years)*length(weeks)*6)+5)/10
 df-data.frame(year=yr,week=wk,temp=temp,   yvar=yvar,
 xvar=xvar)

I get the regression lines per group for each panel using:

 xyplot(yvar~year|week,data=df,layout = c(4, 5),
type='p',
groups = temp ,
panel = panel.superpose,
panel.groups = function(x, y, ..., lty) {
panel.xyplot(x, y, ..., lty = lty)
panel.abline(lm(y~x), lty=3, ...)
})

And obviously the overall regression lines with:

 xyplot(yvar~year|week,data=df,layout = c(4, 5),
type='p',
panel = function(x, y, ...) {
panel.xyplot(x, y, ...)
panel.abline(lm(y~x))
})

Any advice on how to merge the output from the two above graphs  
would be

greatly appreciated!


Kind regards,

Robert Buitenwerf
Ecologist
SAEON
South Africa
_
[[elided Hotmail spam]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


_

Baptiste Auguié

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Statistics forums

2008-11-15 Thread ANJAN PURKAYASTHA
Hi,
Given that the R forum is mostly a site to discuss issues related to the
language, are there any forums that discuss statistical issues? I am
specifically interested in the statistical issues in experimental design.
TIA,
Anjan

-- 
=
anjan purkayastha, phd
bioinformatics analyst
whitehead institute for biomedical research
nine cambridge center
cambridge, ma 02142

purkayas [at] wi [dot] mit [dot] edu
703.740.6939

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problems with rbind

2008-11-15 Thread Dieter Menne



TU wrote:
 
 A recent update on base packages on my R installation has introduced a 
 problem to my code which did not exist before the update. The offending 
 function is rbind, which fails where it was working just fine before the 
 update. 
 
 I have two zoo objects, foo and bar, indexed by class Date. foo starts 
 from 2007-10-09 and bar from 2007-10-10. I attempt to pad bar with a 
 zero on Date 2007-10-09.
 
 

Your example works for me:

 library(zoo)
Attaching package: 'zoo'
The following object(s) are masked from package:base :
 as.Date.numeric 

 foo-zoo(1,order.by=as.Date(2007-10-09)) 
 bar-zoo(2,order.by=as.Date(2007-10-10)) 
 bar - rbind(zoo(0, order.by = index(foo)[1]), bar) 
 bar
2007-10-09 2007-10-10 
 0  2 

 sessionInfo()
R version 2.8.0 (2008-10-20) 
i386-pc-mingw32 

locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252

attached base packages:
[1] stats graphics  grDevices datasets  utils methods   base 

other attached packages:
[1] zoo_1.5-4

loaded via a namespace (and not attached):
[1] grid_2.8.0  lattice_0.17-15 tools_2.8.0
 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-rbind-tp20516377p20517592.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] GAMs and GAMMS with correlated acoustic data

2008-11-15 Thread David M Warner
Greetings
This is a long email. 

I'm struggling with a data set comprising 2,278 hydroacoustic estimates of 
fish biomass density made along line transects in two lakes (lakes 
Michigan and Huron, three years in each lake).  The data represent 
lakewide surveys in each year and each data point represents the estimate 
for a horizontal interval 1 km in length.

I'm interested in comparing biomass density and bathymetric distribution 
(bottom depth) in the two lakes and there is graphical evidence of a 
non-linear relationship between biomass density and bottom depth.  Hence 
my interest in GAMs.

Predictors of primary interest are lake (factor) and bottom depth 
(continuous).

The fish data are autocorrelated at varying ranges, depending on species 
and year.  I've tested this using correlog (package ncf)

The bottom depth data are also highly autocorrelated.

Because of the autocorrelations in data, autocorrelations in GAM residuals 
(up to 20 lags in some cases), patterns in residual plots from GAM models, 
and very narrow confidence intervals for the predictions, I feel that GAM 
results are biased and have attempted to use GAMM.

Data and procedure examples:
# fish[1:10, ]
   Transect yaoalebiom yaosmeltbiom yaobloaterbiom year depth lake  x  
y interval
1  nn_1  12.019655 34.910370110   2.647370 2005  97.075252 
526601.8 48502061
2  nn_1  12.164686 35.331548810   3.982028 2005  98.370242 
526742.2 48493392
3  nn_1  11.176009 32.460052230   1.646604 2005  99.982182 
526886.9 48483483
4  nn_1   0.00  0.036457091   5.306225 2005  81.446162 
526993.4 48508494
5  nn_1  40.808118 10.988825410   3.222485 2005 101.457072 
526997.5 48473595
6  nn_1   6.273421 18.176753520  18.832348 2005  98.691972 
527084.1 48463666
7  nn_1   6.225799 16.050983390  66.941892 2005  94.142832 
527214.7 48453727
8  nn_1   7.322910 19.001196850  47.273341 2005  91.217712 
527331.6 48446368
9  nn_1   0.00  0.067646462  20.912908 2005  87.761232 
527495.9 48433909
10 nn_1   0.00  0.006012106  26.611785 2005  87.597672 
527606.6 4842426   10

#GAM example
bloat.gam8 - gam(log10(yaobloaterbiom+0.00325) ~ lakef +s(depth, 
by=lakef), data=fish3)

#GAMM example:
bloat.gamm1 - gamm(log10(yaobloaterbiom+0.00325) ~ lakef +  s(depth, 
by=lakef), correlation=corAR1(form = ~ interval|tranf), data=fish3)

However, GAMM results from models including a wide variety of correlation 
structures (corExp, CorSpher, CorLin, AR1, ARMA) produce autocorrelated 
residuals (similar lag range as GAM), patterns in residuals plots, and 
confidence intervals for predictions that are only slightly large than for 
GAMs.  This suggests to me that GAMM is not performing much better than 
GAM (or I've not specified models correctly).

Is my assessment of the GAMM performance reasonable?  None of the models 
(GAM or GAMM) explain much of the deviance (~20%).

I'm interested in an information-theoretic approach to selecting the best 
model from a set of possible models (AICc, dAICc, AICc weights), but 
cannot run some of the GAM models with GAM because they lack a random 
term.  I'm not sure how to use the GAMM output to compare the models I can 
run with this procedure.

Finally, as a last resort, I've subsampled the original data set so that I 
have 1 record per transect per lake per year for a total N=99.

I get different best models from GAM (original data) GAMM (original data 
but including correlation structure), and GAM (subsetted data).  Selection 
of different models leads to fairly different conclusions about the 
similarities and differences between the lakes.

I'm not sure where to go with this as a result. 

Any thoughts/comments would be appreciated. 
Dave


 



David Warner
Research Fishery Biologist
USGS Great Lakes Science Center
1451 Green Road
Ann Arbor MI 48105
734.214.9392
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Superimposing y-variables in Lattice formulas

2008-11-15 Thread Stavros Macrakis
On Fri, Nov 14, 2008 at 6:55 PM, Deepayan Sarkar
[EMAIL PROTECTED] wrote:
 ...But how do I specify that I want to display all the Subjects on a... 
 single graph, superimposing them all?

 Have you tried
 xyplot ( conc ~ time , Indometh, groups = Subject ) ?

Thanks very much for your help!  That works beautifully.

Any particular reason this can't be specified in the formula?  For a
small number of levels, you can write

xyplot( ifelse(Subject==1,conc,NA) + ifelse(Subject==2,conc,NA) ~ time, ...)

but obviously that doesn't generalize.  I'd have thought that
something like conc*Subject or (conc | Subject) should mean the same
thing, but these aren't allowed for some reason. But I don't know what
the semantics of the formula operators are.  Neither the 'formula' nor
the 'logic' man page even defines `|`, and the 'xyplot' man page only
gives examples, not a definition of the general case: the formula is
generally of the form... can also be supplied as ... a special case is


Thanks,

   -s

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] PostScript File Dimensions

2008-11-15 Thread David Winsemius
You may be new to R but that does not mean you should stay new to  
the help pages. It looks as though postscript() is ignoring your  
setEPS efforts,,, with perfectly legitimate reason since that is not a  
defined parameter for that function. It is a separate function. What  
happens when you use the height= and width= parameters that the  
postscript help page defines for you? That worked for me (on a Mac  
OS X 10.5.5/ R2.8.0-64bit GUI device). Or you could try executing  
setEPS before your postscript call.


Further questions, as is always the case with output sorts of  
questions, should include your systemInfo. This is an example in the  
help page with an added plot. to make the otherwise blank 4 x 3 eps  
file look more interesting:


 postscript(cm_test.eps, width = 4.0, height = 3.0,
+horizontal = FALSE, onefile = FALSE, paper = special,
+family = ComputerModern, encoding = TeXtext.enc)
 plot(1:10,10:1)
 dev.off()

--
David Winsemius
Heritage Labs




On Nov 15, 2008, at 9:00 AM, Rodrigo Aluizio wrote:


Hi List, here I go again.

Well I need to save plotted objects as .eps using the postscript()  
function,
well I can do that but all resulting object are perfect squared  
dimensions
(x = y). I need a rectangular output something like x = 2y  
dimension. Is it

possible? The I’m new to R and postscript image format!



I’m doing this…



postscript('ClusterWardBC.eps',setEPS(),bg='white')

plot(WardBC,which.plots=2,main='Living Fauna')

dev.off()



and I got the square image



I tried this to solve



postscript 
('ClusterWardBC.eps',setEPS(width=600,height=300),bg='white')


plot(WardBC,which.plots=2,main='Living Fauna')

dev.off()



and I got and output but any software or printer can handle it. So  
it’s

useless.



Any ideas?!



Ps.: The plotted object is a cluster tree, but it also occurs with  
other

plots I’ve done.



Thank you for the attention.

___
MSc.  mailto:[EMAIL PROTECTED] Rodrigo Aluizio
Centro de Estudos do Mar/UFPR
Laboratório de Micropaleontologia
Avenida Beira Mar s/n - CEP 83255-000
Pontal do Paraná - PR - BRASIL


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] make a triple summation more efficient

2008-11-15 Thread Charles C. Berry

On Sat, 15 Nov 2008, kathie wrote:



Dear R users...


I made the R-code for this triple summation computation

http://www.nabble.com/file/p20517134/a.jpg

-
Here is my code..


x=seq(.1,1,.1); l=10
y=seq(1,10); m=10
z=seq(.1,1,.1); n=10

sum(sapply(1:l, function(i) {sum(sapply(1:m, function(j) {sum(sapply(1:n,
function(k){exp(x[i]*y[j]*z[k]  )/gamma(y[j]+1)}))^(1.5)  }))}))

-

In fact, this is a part of optimization and in my real data the number of x
is about 5000. So, I guess if it is vectorized, then the running time could
be shortened.

How could I vectorize this? or any suggestion will be greatly appreciated.



gamma and exp ARE vectorized. Do all the computations in the inner most 
loop in a single call, then sum those, then raise to 1.5, then sum the 
result


something like


foo - function(x,y,z) {exp( x * y * z  )/gamma( y+1 )}
dat - expand.grid( x=x, y=y, z=z )
res - do.call( foo, dat )
sum( rowSums( matrix( res, nc= n) )^1.5 )

[1] 1090.613

HTH,

Chuck



Kathryn Lord
--
View this message in context: 
http://www.nabble.com/make-a-triple-summation-more-efficient-tp20517134p20517134.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



Charles C. Berry(858) 534-2098
Dept of Family/Preventive Medicine
E mailto:[EMAIL PROTECTED]  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problems with rbind

2008-11-15 Thread Gabor Grothendieck
It also works for me using zoo 1.5-4 and R 2.7.2.  Try it running at the
beginning of a vanilla session.  If still a problem reinstall zoo:

install.packages(zoo, dep = TRUE)

If still a problem reinstall R and then reinstall zoo, preferable
going to R 2.8.0.

On Sat, Nov 15, 2008 at 12:19 PM, Dieter Menne
[EMAIL PROTECTED] wrote:



 TU wrote:

 A recent update on base packages on my R installation has introduced a
 problem to my code which did not exist before the update. The offending
 function is rbind, which fails where it was working just fine before the
 update.

 I have two zoo objects, foo and bar, indexed by class Date. foo starts
 from 2007-10-09 and bar from 2007-10-10. I attempt to pad bar with a
 zero on Date 2007-10-09.



 Your example works for me:

 library(zoo)
 Attaching package: 'zoo'
The following object(s) are masked from package:base :
 as.Date.numeric

 foo-zoo(1,order.by=as.Date(2007-10-09))
 bar-zoo(2,order.by=as.Date(2007-10-10))
 bar - rbind(zoo(0, order.by = index(foo)[1]), bar)
 bar
 2007-10-09 2007-10-10
 0  2

 sessionInfo()
 R version 2.8.0 (2008-10-20)
 i386-pc-mingw32

 locale:
 LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252

 attached base packages:
 [1] stats graphics  grDevices datasets  utils methods   base

 other attached packages:
 [1] zoo_1.5-4

 loaded via a namespace (and not attached):
 [1] grid_2.8.0  lattice_0.17-15 tools_2.8.0


 --
 View this message in context: 
 http://www.nabble.com/Problems-with-rbind-tp20516377p20517592.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] configuring graphics device in Linux

2008-11-15 Thread john polo
Peter Dalgaard wrote:
 from xdpyinfo:
 screen #0:
   dimensions:1280x800 pixels (289x21 millimeters)
   resolution:112x968 dots per inch

 Ick!

 Yes that will do that to you.

 You might want to try putting

 DisplaySize 339 212

 in the Monitor section of xorg.conf

it game me some kind of warning about low resolution on restart, but it
looks like it worked. thank you very much

john

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] configuring graphics device in Linux

2008-11-15 Thread Megha Patnaik
Great! You can navigate to choosing the resolution from the warning window.

2008/11/16 john polo [EMAIL PROTECTED]

 Peter Dalgaard wrote:
  from xdpyinfo:
  screen #0:
dimensions:1280x800 pixels (289x21 millimeters)
resolution:112x968 dots per inch
 
  Ick!
 
  Yes that will do that to you.
 
  You might want to try putting
 
  DisplaySize 339 212
 
  in the Monitor section of xorg.conf
 
 it game me some kind of warning about low resolution on restart, but it
 looks like it worked. thank you very much

 john


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Which data structure in R can mimic hash in PERL best?

2008-11-15 Thread Wacek Kusnierczyk
Duncan Temple Lang wrote:

 Hans W. Borchers wrote:
 Below I enclose a solution that I have written some month ago. It is
 given in pythonic language, but you can easily translate it into the
 corresponding Perl terms. One drawback is that one cannot use numbers
 as keys, only keys following the naming conventions for variable names
 are allowed.

 I imagine that you want to add inherits = FALSE
 to calls to exists() and get() in your code or
 else you risk quite unusual semantics of a hash table.

as far as i can see, an alternative is to use empty parent environments:

def.h - function() new.env(hash=TRUE, parent=emptyenv())


vQ



  D.


 Hans Werner Borchers
 ABB Corporate Research


 #-- Define functions on Hash Tuples (Python alike) -

 def.h - function() new.env(hash=TRUE)
 len.h - function(dict) length(ls(envir=dict))
 set.h - function(key, val, dict) assign(key, val, envir=dict)
 get.h - function(key, dict, default=NULL) {
 if (exists(key, envir=dict)) { get(key, dict)
 } else { default } }
 has_key - function(key, dict) exists(key, envir=dict)
 keys.h - function(dict) ls(envir=dict)
 items.h - function(dict) as.list(dict)
 values.h - function(dict, mode='character') {
 l - as.list(dict)
 n - length(l)
 if (n==0) invisible(NULL)
 v - vector('character', n)
 for (i in 1:n) v[i] - l[[i]]
 if (mode=='numeric') v - as.numeric(v)
 return(v)
 }
 del.h - function(key, dict) {
 if (exists(key, envir=dict)) {
 val - get.h(key, dict)
 rm(list=c(key), envir=dict)
 } else {
 val - NULL
 }
 invisible(val)
 }
 clear.h - function(dict) {
 rm(list=keys.h(dict), envir=dict)
 }
 #---


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
   

-- 
---
Wacek Kusnierczyk, MD PhD

Email: [EMAIL PROTECTED]
Phone: +47 73591875, +47 72574609

Department of Computer and Information Science (IDI)
Faculty of Information Technology, Mathematics and Electrical Engineering (IME)
Norwegian University of Science and Technology (NTNU)
Sem Saelands vei 7, 7491 Trondheim, Norway
Room itv303

Bioinformatics  Gene Regulation Group
Department of Cancer Research and Molecular Medicine (IKM)
Faculty of Medicine (DMF)
Norwegian University of Science and Technology (NTNU)
Laboratory Center, Erling Skjalgsons gt. 1, 7030 Trondheim, Norway
Room 231.05.060

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] warning : increasing the PDF version to 1.3

2008-11-15 Thread Prof Brian Ripley

On Sun, 16 Nov 2008, June Kim wrote:


What does the warning mean?

In dev.off() : increasing the PDF version to 1.3


It means you have an obsolete version of R, and failed to follow the 
posting guide in telling us what it is.  ?pdf should explain the message 
to you in your version of R.  E.g. 2.6.0 has


 version: a string describing the PDF version that will be required to
  view the output.  This is a minimum, and will be increased
  (with a warning) if necessary.

 The 'version' argument declares the version of PDF that gets
 produced.  The version must be at least 1.4 for semi-transparent
 output to be understood, and at least 1.3 if CID fonts are to be
 used: if these features are used the version number will be
 increased (with a warning).  Specifying a low version number (as
 the default) is useful if you want to produce PDF output that can
 be viewed on older or non-Adobe PDF viewers.  (PDF 1.4 requires
 Acrobat 5 or later.)

The default value is 1.4 these days.


--
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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Superimposing y-variables in Lattice formulas

2008-11-15 Thread Deepayan Sarkar
On 11/15/08, Stavros Macrakis [EMAIL PROTECTED] wrote:
 On Fri, Nov 14, 2008 at 6:55 PM, Deepayan Sarkar
  [EMAIL PROTECTED] wrote:
   ...But how do I specify that I want to display all the Subjects on a... 
 single graph, superimposing them all?

 
   Have you tried
   xyplot ( conc ~ time , Indometh, groups = Subject ) ?


 Thanks very much for your help!  That works beautifully.

  Any particular reason this can't be specified in the formula?  For a

Mostly historical, but the 'groups' approach makes the design cleaner
and more generalizable, although that fact is difficult to appreciate
without some experience.

  small number of levels, you can write

 xyplot( ifelse(Subject==1,conc,NA) + ifelse(Subject==2,conc,NA) ~ time, 
 ...)

  but obviously that doesn't generalize.  I'd have thought that
  something like conc*Subject or (conc | Subject) should mean the same
  thing, but these aren't allowed for some reason. But I don't know what
  the semantics of the formula operators are.  Neither the 'formula' nor
  the 'logic' man page even defines `|`, and the 'xyplot' man page only
  gives examples, not a definition of the general case: the formula is
  generally of the form... can also be supplied as ... a special case is
  

There is no general interpretation for a formula, it is always
function-specific. I consider the part of the help page you quoted
(without the omissions) a completely general description of the
formula as applicable to xyplot():

   The formula is generally of the form 'y ~ x | g1 * g2 * ...'  

(along with a later paragraph documenting the special interpretation of '+' ).

Note that a help page is intended to describe the capabilities of the
function/object it is documenting, not the capabilities that are
missing, even though those who have preconceived ideas of how certain
things should behave often think that it is somehow the responsibility
of the help page to anticipate all such misunderstandings.

If you want a holistic introduction to a suite of tools like lattice,
function documentation (which is by definition function-centric) is
not the best place to look.

-Deepayan

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R: How to enable R on-line search in HTML help

2008-11-15 Thread mauede


-Messaggio originale-
Da: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Inviato: ven 14/11/2008 18.27
A: [EMAIL PROTECTED]
Cc: r-help@r-project.org
Oggetto: Re: [R] How to enable R on-line search in HTML help
 
First, there is a R-sig-mac list for Mac OS questions.

I will try the channel you suggest if I cannot get this problem fixed soon.

On Fri, 14 Nov 2008, [EMAIL PROTECTED] wrote:

 I use FireFox as my favourite web browser on my Mac OS/X 10.5

Which version of Firefox?  There is a known issue with all released 
versions = 3, discussed in the R-admin manual (and R has had a workarounf 
in place for a while now).

In fact I am running version 3.0.4
I saw the suggestion:  This is a bug in the way Firefox is interpreting 
relative URLs, and can be circumvented by opening the HTML search page 
(.../doc/html/SearchEngine.html) directly rather than from 
.../doc/html/index.html as shown by help.start().
But I have no control on where OS generates the link to R help-search started 
from the top bar menu. 

 I double-checked that Java and Java scripts are enabled for FireFox. 
 Nevertheless, I cannot use R on-line search help.

How are you trying to use it?  And what exactly happens?

I click on the Help item in the top menu bar which appears as R GUI
is loaded. As a result a new window pops up which contains
three sections named Manuals, Reference, Miscellaneous Material.
I click on the link Search Engine  Keyword in the Reference section.
Another page pops up with a number of links to R main topics. None of
such links works for me no matter how many time I click on any of them.
The only lik that works is R Installation and Administration even if I 
double-checked that mybrowser (FireFox) has all Java boxes 
checked (flags enabled). In fact I do not see any 
Applet SearchEngine started anywhere on the browser window.
The help.search utility works fine when started on R command line.
There is no difference if I replace FireFox with Safari as the main 
web browser.


You might be using help.start (in which case check its help page for the 
workaround). Or are you referring to help in the R.app GUI (in which case 
this is the wrong list)?

Actually this problam arises when I click on the Help item of the top menu bar 
which is
loaded with R GUI

 I called Apple Tech Assistance but they do not support FireFox. We tried to 
 set Saphari as the favourite browser but
 evidently R does not support it.

In what sense?  I've used search in help.start() with Safari in the past: 
I even tested it on Windows.

With reference to the Hep item in the top menu bar, the behaviour is the same 
regardless of choosing 
either FireFox or Safari

 Does any one knw of a workaround this annoying problem ?

We need to understand the problem first: see the footer to this and every 
R-help message.

There may be a mailing list where these GUI-related issues are discussed. 
I would be happy to redirect my question to the pertinent channel.

Best regrds,
Maura E.

 Thanks a lot,
 Maura

 Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e 
 tutti i telefonini TIM!
 Vai su http://maileservizi.alice.it/alice_messenger/index.html?pmk=footer

   [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


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



Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e 
tutti i telefonini TIM!
Vai su http://maileservizi.alice.it/alice_messenger/index.html?pmk=footer

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] 3D trajectory plot?

2008-11-15 Thread Michael Grant
Are you talking about a 'streamline' like might be made with 'vtk'? or in a 
number of fluid dynamics, groundwater packages, particle physics codes, etc.? 
There was an exploratory hook up of R and vtk by M. Kondrin a year or two back 
(linux only). Search the archives. Parsing a vtk dataset in R should relatively 
straight-forward.

HTH
Michael Grant



--- On Tue, 11/11/08, Chris Jarman [EMAIL PROTECTED] wrote:

 From: Chris Jarman [EMAIL PROTECTED]
 Subject: [R] 3D trajectory plot?
 To: r-help@r-project.org
 Date: Tuesday, November 11, 2008, 9:55 PM
 Hello,
 I'm attempting to create a smooth, 3D plot of a
 trajectory (rather
 than the cloud or wireframe functions).  I would rather the
 individual
 data points not be visible.  I've had no luck finding
 this on the
 graphics or help pages.  Thank you in advance.  Chris
 Some example data, just in case:
 
 2532  40
 1225  32
 2 12  25
 2 2   12
 202   2
 1 20  2
 6 1   20
 5 6   1
 5 5   6
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained,
 reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] configuring graphics device in Linux

2008-11-15 Thread john polo
Megha Patnaik wrote:
 Great! You can navigate to choosing the resolution from the warning window.
   
will do. thanks for your help.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] HOW to provide a CITATION file?

2008-11-15 Thread Charles Annis, P.E.
Greetings, R-ians:

I am sure I am missing something obvious.  

How do I provide a CITATION file for my home-brew package, so that it will
be packaged using 

R CMD build --binary myPackage?

I have placed a CITATION file in the myPackage directory along with the
DESCRIPTION file, but it is ignored.

Thanks for your guidance.


Charles Annis, P.E.

[EMAIL PROTECTED]
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] rgamma with rate as vector

2008-11-15 Thread wcyee
Hi - I have a question about the following code from Bayesian
Computation with R (Jim Albert).

par(mfrow=c(2,2))
m = 500
alphas = c(5, 20, 80, 400)
for (j in 1:4) {
mu = rgamma(m, shape=10, rate=10)
lambda1 = rgamma(m, shape=alphas[j], rate=alphas[j]/mu)
lambda2 = rgamma(m, shape=alphas[j], rate=alphas[j]/mu)
plot(lambda1, lambda2)
title(main=paste('alpha=', alphas[j]))
}


How does the function rgamma work in the instance with the rate
specified as a vector of values?  My understanding is that rgamma
returns m random values from the gamma distribution for a given shape,
rate.  But I don't understand what the resulting lambda1's mean with
many rate values.

Thanks!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] RES: PostScript File Dimensions

2008-11-15 Thread Rodrigo Aluizio
Thanks David, you are absolutely right, the solution was more simple than I
was wondering, sorry for the mistake.
I always read the help files and search the older topic of the list before
posting, but this time I wasn't able found out a solution for such a simple
thing. I got very closer to your suggestion with other tries I've not
included in my first mail. But I got an error saying The image is to large
and gave up. It was only a question of changing the width and height
values...

Once again thank you, I'll try harder a next time.

Rodrigo.

-Mensagem original-
De: David Winsemius [mailto:[EMAIL PROTECTED] 
Enviada em: sábado, 15 de novembro de 2008 15:57
Para: Rodrigo Aluizio
Cc: R Help
Assunto: Re: [R] PostScript File Dimensions

You may be new to R but that does not mean you should stay new to  
the help pages. It looks as though postscript() is ignoring your  
setEPS efforts,,, with perfectly legitimate reason since that is not a  
defined parameter for that function. It is a separate function. What  
happens when you use the height= and width= parameters that the  
postscript help page defines for you? That worked for me (on a Mac  
OS X 10.5.5/ R2.8.0-64bit GUI device). Or you could try executing  
setEPS before your postscript call.

Further questions, as is always the case with output sorts of  
questions, should include your systemInfo. This is an example in the  
help page with an added plot. to make the otherwise blank 4 x 3 eps  
file look more interesting:

  postscript(cm_test.eps, width = 4.0, height = 3.0,
+horizontal = FALSE, onefile = FALSE, paper = special,
+family = ComputerModern, encoding = TeXtext.enc)
  plot(1:10,10:1)
  dev.off()

-- 
David Winsemius
Heritage Labs




On Nov 15, 2008, at 9:00 AM, Rodrigo Aluizio wrote:

 Hi List, here I go again.

 Well I need to save plotted objects as .eps using the postscript()  
 function,
 well I can do that but all resulting object are perfect squared  
 dimensions
 (x = y). I need a rectangular output something like x = 2y  
 dimension. Is it
 possible? The I’m new to R and postscript image format!



 I’m doing this…



 postscript('ClusterWardBC.eps',setEPS(),bg='white')

 plot(WardBC,which.plots=2,main='Living Fauna')

 dev.off()



 and I got the square image



 I tried this to solve



 postscript 
 ('ClusterWardBC.eps',setEPS(width=600,height=300),bg='white')

 plot(WardBC,which.plots=2,main='Living Fauna')

 dev.off()



 and I got and output but any software or printer can handle it. So  
 it’s
 useless.



 Any ideas?!



 Ps.: The plotted object is a cluster tree, but it also occurs with  
 other
 plots I’ve done.



 Thank you for the attention.

 ___
 MSc.  mailto:[EMAIL PROTECTED] Rodrigo Aluizio
 Centro de Estudos do Mar/UFPR
 Laboratório de Micropaleontologia
 Avenida Beira Mar s/n - CEP 83255-000
 Pontal do Paraná - PR - BRASIL


   [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Statistics forums

2008-11-15 Thread s j
On Sat, Nov 15, 2008 at 12:19 PM, ANJAN PURKAYASTHA 
[EMAIL PROTECTED] wrote:

 Hi,
 Given that the R forum is mostly a site to discuss issues related to the
 language, are there any forums that discuss statistical issues? I am
 specifically interested in the statistical issues in experimental design.
 TIA,
 Anjan

 --
 =
 anjan purkayastha, phd
 bioinformatics analyst
 whitehead institute for biomedical research
 nine cambridge center
 cambridge, ma 02142

 purkayas [at] wi [dot] mit [dot] edu
 703.740.6939

[[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] HOW to provide a CITATION file?

2008-11-15 Thread Henrik Bengtsson
See 'Writing R Extensions' via help.start() and then search for CITATION.

My $.02 /Henrik

On Sat, Nov 15, 2008 at 2:35 PM, Charles Annis, P.E.
[EMAIL PROTECTED] wrote:
 Greetings, R-ians:

 I am sure I am missing something obvious.

 How do I provide a CITATION file for my home-brew package, so that it will
 be packaged using

 R CMD build --binary myPackage?

 I have placed a CITATION file in the myPackage directory along with the
 DESCRIPTION file, but it is ignored.

 Thanks for your guidance.


 Charles Annis, P.E.

 [EMAIL PROTECTED]
 phone: 561-352-9699
 eFax:  614-455-3265
 http://www.StatisticalEngineering.com


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Statistics forums

2008-11-15 Thread s j
I am also curious if someone can direct us to a good statistical group
mailing list. I have been using R since few days and I find this groups
amazing (with so many discussions pouring in!! I just love it.) But, I also
seem to hit a roadblock for deciding which test to use, sometimes.

It will helpful, if someone would provide some advice about other mailing
lists.

Sagar

Doctoral Candidate in Bioengineering,
University of Pittsburgh

On Sat, Nov 15, 2008 at 8:26 PM, s j [EMAIL PROTECTED] wrote:



 On Sat, Nov 15, 2008 at 12:19 PM, ANJAN PURKAYASTHA 
 [EMAIL PROTECTED] wrote:

 Hi,
 Given that the R forum is mostly a site to discuss issues related to the
 language, are there any forums that discuss statistical issues? I am
 specifically interested in the statistical issues in experimental design.
 TIA,
 Anjan

 --
 =
 anjan purkayastha, phd
 bioinformatics analyst
 whitehead institute for biomedical research
 nine cambridge center
 cambridge, ma 02142

 purkayas [at] wi [dot] mit [dot] edu
 703.740.6939

[[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] I want my row name to be a variable

2008-11-15 Thread CE.KA

Hi R users

Imagine this data.frame:
X

Var1Var2
A   22   13
B5 2
C12   8
D199

A,B,C,D are the rows names (or index)

Is there a way to create a new variable in this data frame
which name is Var3 and which contains the rows names:

Var1Var2Var3
A   22   13A
B5 2 B
C12   8 C
D199D

I tried as.data.frame(array(x, dim(x), dimnames(x)))
but it doesn'work

Sincerely yours

-- 
View this message in context: 
http://www.nabble.com/I-want-my-row-name-to-be-a-variable-tp20520180p20520180.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] readPDF() -- unsure how to install xpdf to make this work?

2008-11-15 Thread [EMAIL PROTECTED]
Hello, I was just wondering if you had found a solution? I am having
the same difficulty of converting pdf's into plain text documents in
R. I originally thought I could use the readLines() function, but as
you can see below that did not work.

R my.destfile - C:\\Documents and Settings\\clair\\Desktop\\test\\r-
intro.pdf
R my.url - http://cran.r-project.org/doc/manuals/R-intro.pdf;
R download.file(url = my.url, destfile=my.destfile, mode='wb')
R txt - readLines(my.destfile)
R txt
[1]
%PDF-1.4
[2]
%ÐÔÅØ
[3] 1 0 obj

[4] /Length 587

[5] /Filter /
FlateDecode
[6]

[7]
stream
[8] [EMAIL PROTECTED]ÎÁ±?\024tBL\020$ñ°ãd4›½*´.‰\002\001øï·_•èÌf
\017’W¯_wÕ«îrðãc;Šòê`GæUŠOÛV׳£øç¾ö\006ƒ¤Ê®\027[vïÖæ6ïWÛ7ñÑTÙÖvb
\030¯“uYt/N¼.³ó5·½êÿ¢¥=\025åS‚b¸³¿G›�


Warm Regards,
Clair

On 13 Nov, 15:10, Tony Breyal [EMAIL PROTECTED] wrote:
 Dear R-Help,

 I need to convert a set of '.pdf' files into an equivalent set of
 '.txt' files. This is so that i can do some text mining on the
 content.

 In the latest R-News letter (http://cran.r-project.org/doc/Rnews/
 Rnews_2008-2.pdf), the package 'tm' for text mining is mentioned. In
 that lovely package, there is a function called 'readPDF()'. In order
 to use this, ?readPDF says

     Note that this PDF reader needs both the tools pdftotext and
 pdfinfo installed and accessable on your system.

 These tools are available fromhttp://www.foolabs.com/xpdf/download.html

 I am able to download this and use it easily from a dos window to
 convert a pdf file into a txt file.

 Question: how do i make these tools available to R, so that i can use
 the readPDF() function?

 Thank you in advance for any help, and I hope the above made sense.
 Tony Breyal

 ###OS = Windows Vista Ultimate sessionInfo()

 R version 2.8.0 (2008-10-20)
 i386-pc-mingw32

 locale:
 LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.
 1252;LC_MONETARY=English_United Kingdom.
 1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252

 attached base packages:
 [1] grid      stats     graphics  grDevices utils     datasets
 methods   base

 other attached packages:
 [1] tm_0.3-1           XML_1.98-1         Snowball_0.0-3
 RWeka_0.3-14       rJava_0.6-0        Matrix_0.999375-16
 lattice_0.17-15    filehash_2.0

 loaded via a namespace (and not attached):
 [1] proxy_0.4-1

 __
 [EMAIL PROTECTED] mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] I need to compare ranking (1-15) across 10 replicates to see if the ranking changes significantly- how???

2008-11-15 Thread nashford86

Hi there

all suggestions much appreciated! so our investigation is looking into the
time pairs of guppies spend interacting... we have raw data in minutes, but
have ranked each possible association between pairs (out of 15 possible) in
order of frequency of occurence during a 20 min recording period. then rinse
and repeat 10 times... :-D  
so this is what we have: (rows are replicates, columns different
interactions)

L/L L/S L/B L/D L/LTS/S S/B S/D S/LT
B/B B/D B/LTD/D D/LTLT/LT
1   12  10  3   1   8   11  6   5   15  
14  7   4   8   2   12
2   4   2   1   3   5   15  13  6   12  
11  14  6   8   10  9
3   12  14  8   6   2   15  12  4   5   
7   10  1   11  8   3
4   7   11  1   10  4   6   5   8   12  
14  13  2   9   14  3
5   4   10  2   10  12  8   7   3   6   
12  14  1   14  9   5
6   2   8   9   5   13  11  12  7   6   
1   15  4   13  3   10
7   3   4   6   13  11  8   2   14  12  
1   14  9   10  5   7
8   2   9   3   5   1   5   4   10  15  
11  13  12  7   7   14
9   5   6   1   9   11  13  4   10  3   
8   13  2   15  7   12
10  3   11  9   15  7   10  6   4   8   
1   13  2   12  4   14
Score   54  85  43  77  74  102 71  71  94  
80  126 43  107 69  89
Ranking 3   10  1   8   7   13  5   5   12  
9   15  1   14  4   11


is it possible to run an ANOVA on this, to assess the stability of
interactions? With the idea that if the ranking changes a significant amount
between replicates, associations are not being maintained...?? 

all help and advice gratefully received!

Thanks 
-- 
View this message in context: 
http://www.nabble.com/I-need-to-compare-ranking-%281-15%29-across-10-replicates-to-see-if-the-ranking-changes-significantly--howtp20515523p20515523.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Using n+1 instances of R to utilise n processors on one machine - something like R with tabbed browsing?

2008-11-15 Thread [EMAIL PROTECTED]
Dear R-help,

Please forgive me if any of the following sounds naieve/confused, i've
just got back from a mini-pub-crawl, slightly tipsy, and am feeling
brave to ask a possibly silly question... also, not to shiny on the
technical side of things.

Problem - I need to text mine a collection of 10,000 plain text
documents, all of which are sitting in a single folder. i don't have
any money to buy a database package, and even if i did i have no idea
how that would speed things up if i want to do all the processing in
R

Assumption - It is my understanding that R can only use one processor
on a machine when handeling calculations. If you wanted to use 4
processors, than you would have to open up 4 seperate instances of R
and share the work between them eg. give each instance of R 25% of the
documents you want processed

Question - It is possible to have one instance of R to divide the
workload, and then that instance opens up 4 other instances of R to do
the processing?

Or, is sometihng akin to tabbed browsing, where you have one main
window and several tabs, each corresponding to a different instance of
R?

appologies if none of hte above made sense  :o)

Clair xx


O/S: Windows Vista
R 2.8.0

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] unable to view vignette in R

2008-11-15 Thread Lionel Brooks

Hello All R-Gurus:

ISSUE:
Cannot view R vignettes due in Ubuntu Linux (a debian variant).
note: this issue has been posted to this list before with no responses given
see https://stat.ethz.ch/pipermail/r-help/2007-September/141178.html

DETAILS:
I am trying to view an R vignette.
Here is the situation: I issue the openvignette(), then select the 
vignette I wish to view...and the system returns:


Could not get a file descriptor referring to the console.

This action should spawn a ps viewer displaying the contents of the 
vignette for my enjoyment.
I suspect it may have something to do with the call to the postscript 
viewer application.

Is there a simple way to change this behavior within R?

Any Thoughts?

Here is the copy paste of my session

Code:

 openVignette()
Please select a vignette: 


1: annotate - Annotation Overview
2: annotate - Basic GO Usage
3: annotate - HowTo: Get HTML Output
4: annotate - HowTo: use chromosomal information
5: annotate - HOWTO: Use the online query tools
6: annotate - Using Affymetrix Probe Level Data
7: annotate - Using Data Packages
8: annotate - Using the homology package
9: AnnotationDbi - AnnotationDbi
10: AnnotationDbi - SQLForge
11: Biobase - An introduction to Biobase and ExpressionSets
12: Biobase - Bioconductor Overview
13: Biobase - esApply Introduction
14: Biobase - Notes for eSet developers
15: Biobase - Notes for writing introductory 'how to' documents
16: Biobase - quick views of eSet instances
17: geneplotter - How to assemble a chromLocation object
18: geneplotter - Visualization of Microarray Data
19: xtable - xtable Gallery

Selection: 17)
Opening 
/home/lbthrice/R/i486-pc-linux-gnu-library/2.8/geneplotter/doc/byChroms.pdf

 Couldnt get a file descriptor referring to the console
Could not get a file descriptor referring to the console

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Classes

2008-11-15 Thread Nick
Code:

# svm is an S3 class, so:
setOldClass(svm)

# Create the super class model:
setClass(model)

# For svm from e1071 this works (well gives no error):
setIs(svm, model)

# For rvm from kernlab this gives and error:
setIs(rvm, model)

# the superclass list for class rvm includes an undefined class
vm

Is there any way round this?

I am trying to write a super class so that I can use the same
interface for both of these classes.

Thanks.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] I want my row name to be a variable

2008-11-15 Thread Erik Iverson

X$Var3 - row.names(X)

CE.KA wrote:

Hi R users

Imagine this data.frame:

X


Var1Var2
A   22   13
B5 2
C12   8
D199

A,B,C,D are the rows names (or index)

Is there a way to create a new variable in this data frame
which name is Var3 and which contains the rows names:

Var1Var2Var3
A   22   13A
B5 2 B
C12   8 C
D199D

I tried as.data.frame(array(x, dim(x), dimnames(x)))
but it doesn'work

Sincerely yours



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] unable to view vignette in R

2008-11-15 Thread Erik Iverson
I never could figure this out, I had the exact same issue though.  My 
solution was to simply set


options(pdfviewer = evince)

in my .Rprofile.  Presumably, you could set it to whatever PDF viewer is 
your favorite.  I never looked further into why the default was doing 
what it was doing.


Lionel Brooks wrote:

Hello All R-Gurus:

ISSUE:
Cannot view R vignettes due in Ubuntu Linux (a debian variant).
note: this issue has been posted to this list before with no responses 
given

see https://stat.ethz.ch/pipermail/r-help/2007-September/141178.html

DETAILS:
I am trying to view an R vignette.
Here is the situation: I issue the openvignette(), then select the 
vignette I wish to view...and the system returns:


Could not get a file descriptor referring to the console.

This action should spawn a ps viewer displaying the contents of the 
vignette for my enjoyment.
I suspect it may have something to do with the call to the postscript 
viewer application.

Is there a simple way to change this behavior within R?

Any Thoughts?

Here is the copy paste of my session

Code:

  openVignette()
Please select a vignette:
1: annotate - Annotation Overview
2: annotate - Basic GO Usage
3: annotate - HowTo: Get HTML Output
4: annotate - HowTo: use chromosomal information
5: annotate - HOWTO: Use the online query tools
6: annotate - Using Affymetrix Probe Level Data
7: annotate - Using Data Packages
8: annotate - Using the homology package
9: AnnotationDbi - AnnotationDbi
10: AnnotationDbi - SQLForge
11: Biobase - An introduction to Biobase and ExpressionSets
12: Biobase - Bioconductor Overview
13: Biobase - esApply Introduction
14: Biobase - Notes for eSet developers
15: Biobase - Notes for writing introductory 'how to' documents
16: Biobase - quick views of eSet instances
17: geneplotter - How to assemble a chromLocation object
18: geneplotter - Visualization of Microarray Data
19: xtable - xtable Gallery

Selection: 17)
Opening 
/home/lbthrice/R/i486-pc-linux-gnu-library/2.8/geneplotter/doc/byChroms.pdf

  Couldnt get a file descriptor referring to the console
Could not get a file descriptor referring to the console

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

and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] HOW to provide a CITATION file?

2008-11-15 Thread Henrik Bengtsson
Are you referring to the update that you now reach 'R: Search
Engine'(*) when you call help.start() whereas before you got to the
'Statistical Data Analysis' main menu from where 'Writing R
Extensions' is available (in HTML format)?   You can reach the latter
from the former by clicking on the up-arrow icon.  [Suggestion to
R-core: Maybe clicking on the R-logo could also bring you to the main
menu.].

/Henrik

(*) At least with R v2.8.0 and Firefox 3.0

On Sat, Nov 15, 2008 at 5:51 PM, Spencer Graves [EMAIL PROTECTED] wrote:
 Writing R Extensions is no longer available via help.start(), at
 least not in the standard Windows install since R 2.7.2.  If there is a way
 to get it to work again like it used to, I'd like to know.  The only way I
 know to get it is to go to www.r-project.org - Manuals - Writing R
 Extensions.
 From there, if I want to make a local copy, I must avoid the obvious
 File - Save Page As, because that gives me HTML.  Instead, there is a
 Save a copy button in the upper left of the subwindow containing
 R-exts.pdf, which I must press to get that particular document.
 Best Wishes,
 Spencer

 Henrik Bengtsson wrote:

 See 'Writing R Extensions' via help.start() and then search for CITATION.

 My $.02 /Henrik

 On Sat, Nov 15, 2008 at 2:35 PM, Charles Annis, P.E.
 [EMAIL PROTECTED] wrote:


 Greetings, R-ians:

 I am sure I am missing something obvious.

 How do I provide a CITATION file for my home-brew package, so that it
 will
 be packaged using

 R CMD build --binary myPackage?

 I have placed a CITATION file in the myPackage directory along with the
 DESCRIPTION file, but it is ignored.

 Thanks for your guidance.


 Charles Annis, P.E.

 [EMAIL PROTECTED]
 phone: 561-352-9699
 eFax:  614-455-3265
 http://www.StatisticalEngineering.com


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.



 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Spatial ANCOVA in R

2008-11-15 Thread Camilo Mora
Hi:

Does anyone know if it is possible to run an ANCOVA in R while accounting or
controlling for spatial autocorrelation? I have found usefull information into
how to account for spatial autocorrelaion in regression models but not much
into how to deal with the problem in an ANCOVA.

Thanks,

Camilo

Camilo Mora, Ph.D.
SCRIPPS Institute of Oceanography
University of California San Diego
San Diego, USA
Phone: (858) 822 1642
http://cmbc.ucsd.edu/People/Faculty_and_Researchers/mora/
And
Department of Biology
Dalhouisie University
Halifax, Canada
Phone: (902) 494 3910
http://as01.ucis.dal.ca/fmap/people.php?pid=53

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] I want my row name to be a variable

2008-11-15 Thread Jorge Ivan Velez
Dear CE.KA,
Try this:

X=read.table(textConnection(
   Var1Var2
A   22   13
B5 2
C12   8
D199),header=TRUE)
closeAllConnections()

X$Var3-rownames(X)
X


HTH,

Jorge



On Sat, Nov 15, 2008 at 5:34 PM, CE.KA [EMAIL PROTECTED] wrote:


 Hi R users

 Imagine this data.frame:
 X

Var1Var2
 A   22   13
 B5 2
 C12   8
 D199

 A,B,C,D are the rows names (or index)

 Is there a way to create a new variable in this data frame
 which name is Var3 and which contains the rows names:

Var1Var2Var3
 A   22   13A
 B5 2 B
 C12   8 C
 D199D

 I tried as.data.frame(array(x, dim(x), dimnames(x)))
 but it doesn'work

 Sincerely yours

 --
 View this message in context:
 http://www.nabble.com/I-want-my-row-name-to-be-a-variable-tp20520180p20520180.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] birthday problem (factorial limit)---fortune candidate

2008-11-15 Thread Richard M. Heiberger
The function ... works for different values of two
Thomas Lumley

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Statistics forums

2008-11-15 Thread David Winsemius


There are three sci.stat.* newsgroups on the original USENET hierarchy  
and at least one GoogleGroups location with activity. The Medstats  
group has reputable people contributing. If you post a difficult  
problem in integration or numerical analysis to sci.math or  
sci.math.num-analysis you may get very credible responses.


One doc's opinion: The sci.stat.math groups has people of variable  
quality (as with any open Internet forum). Some such as Marc Schwartz  
and Frank Harrell who also post here, are extremely good, but some of  
the other regular contributors may not be as sophisticated. Caveat  
emptor. You can see all of these groups through a variety of news  
clients. USENET groups are canonically read with newsreaders but are  
also accessible through Google's interface. The Medstats group can  
only be seen with Google's interface.


--
David Winsemius, MD
(not speaking in any way for my employer.)

On Nov 15, 2008, at 12:19 PM, ANJAN PURKAYASTHA wrote:


Hi,
Given that the R forum is mostly a site to discuss issues related to  
the

language, are there any forums that discuss statistical issues? I am
specifically interested in the statistical issues in experimental  
design.

TIA,
Anjan

--
=
anjan purkayastha, phd
bioinformatics analyst
whitehead institute for biomedical research
nine cambridge center
cambridge, ma 02142


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] HOW to provide a CITATION file?

2008-11-15 Thread Prof Brian Ripley

On Sat, 15 Nov 2008, Spencer Graves wrote:

Writing R Extensions is no longer available via help.start(), at 
least not in the standard Windows install since R 2.7.2.  If there is a way 
to get it to work again like it used to, I'd like to know.  The only way I


Are you getting the search page?  Hit the 'Up' arrow icon.
Or use help.search(searchEngine=TRUE) .

Why have you (not anyone else) reported this over two releases?

know to get it is to go to www.r-project.org - Manuals - Writing R 
Extensions.
From there, if I want to make a local copy, I must avoid the obvious 
File - Save Page As, because that gives me HTML.  Instead, there is a 
Save a copy button in the upper left of the subwindow containing 
R-exts.pdf, which I must press to get that particular document.

Best Wishes,
Spencer

Henrik Bengtsson wrote:

See 'Writing R Extensions' via help.start() and then search for CITATION.

My $.02 /Henrik

On Sat, Nov 15, 2008 at 2:35 PM, Charles Annis, P.E.
[EMAIL PROTECTED] wrote:


Greetings, R-ians:

I am sure I am missing something obvious.

How do I provide a CITATION file for my home-brew package, so that it will
be packaged using

R CMD build --binary myPackage?

I have placed a CITATION file in the myPackage directory along with the
DESCRIPTION file, but it is ignored.

Thanks for your guidance.


Charles Annis, P.E.

[EMAIL PROTECTED]
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com


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

and provide commented, minimal, self-contained, reproducible code.




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

and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] unable to view vignette in R

2008-11-15 Thread Prof Brian Ripley
Why not ask on r-sig-debian?: presumably it is a setting in the binary 
install of R you are using that is inappropriate on your systems.


On Sat, 15 Nov 2008, Erik Iverson wrote:

I never could figure this out, I had the exact same issue though.  My 
solution was to simply set


options(pdfviewer = evince)

in my .Rprofile.  Presumably, you could set it to whatever PDF viewer is your 
favorite.  I never looked further into why the default was doing what it was 
doing.


You could also set the environment variable R_PDFVIEWER .


Lionel Brooks wrote:

Hello All R-Gurus:

ISSUE:
Cannot view R vignettes due in Ubuntu Linux (a debian variant).
note: this issue has been posted to this list before with no responses 
given

see https://stat.ethz.ch/pipermail/r-help/2007-September/141178.html

DETAILS:
I am trying to view an R vignette.
Here is the situation: I issue the openvignette(), then select the vignette 
I wish to view...and the system returns:


Could not get a file descriptor referring to the console.

This action should spawn a ps viewer displaying the contents of the 
vignette for my enjoyment.
I suspect it may have something to do with the call to the postscript 
viewer application.

Is there a simple way to change this behavior within R?

Any Thoughts?

Here is the copy paste of my session

Code:

  openVignette()
Please select a vignette:
1: annotate - Annotation Overview
2: annotate - Basic GO Usage
3: annotate - HowTo: Get HTML Output
4: annotate - HowTo: use chromosomal information
5: annotate - HOWTO: Use the online query tools
6: annotate - Using Affymetrix Probe Level Data
7: annotate - Using Data Packages
8: annotate - Using the homology package
9: AnnotationDbi - AnnotationDbi
10: AnnotationDbi - SQLForge
11: Biobase - An introduction to Biobase and ExpressionSets
12: Biobase - Bioconductor Overview
13: Biobase - esApply Introduction
14: Biobase - Notes for eSet developers
15: Biobase - Notes for writing introductory 'how to' documents
16: Biobase - quick views of eSet instances
17: geneplotter - How to assemble a chromLocation object
18: geneplotter - Visualization of Microarray Data
19: xtable - xtable Gallery

Selection: 17)
Opening 
/home/lbthrice/R/i486-pc-linux-gnu-library/2.8/geneplotter/doc/byChroms.pdf

  Couldnt get a file descriptor referring to the console
Could not get a file descriptor referring to the console

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

and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Spatial ANCOVA in R

2008-11-15 Thread Andrew Robinson
Hi Camilo,

try gls() in the nlme package.

Andrew

On Sat, Nov 15, 2008 at 11:34:57PM -0400, Camilo Mora wrote:
 Hi:
 
 Does anyone know if it is possible to run an ANCOVA in R while accounting or
 controlling for spatial autocorrelation? I have found usefull information into
 how to account for spatial autocorrelaion in regression models but not much
 into how to deal with the problem in an ANCOVA.
 
 Thanks,
 
 Camilo
 
 Camilo Mora, Ph.D.
 SCRIPPS Institute of Oceanography
 University of California San Diego
 San Diego, USA
 Phone: (858) 822 1642
 http://cmbc.ucsd.edu/People/Faculty_and_Researchers/mora/
 And
 Department of Biology
 Dalhouisie University
 Halifax, Canada
 Phone: (902) 494 3910
 http://as01.ucis.dal.ca/fmap/people.php?pid=53
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

-- 
Andrew Robinson  
Department of Mathematics and StatisticsTel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Using n+1 instances of R to utilise n processors on one machine - something like R with tabbed browsing?

2008-11-15 Thread Prof Brian Ripley
This is what e.g. package snow does: it will also collect the results for 
you.  See also package pvapply.


On Sat, 15 Nov 2008, [EMAIL PROTECTED] wrote:


Dear R-help,

Please forgive me if any of the following sounds naieve/confused, i've
just got back from a mini-pub-crawl, slightly tipsy, and am feeling
brave to ask a possibly silly question... also, not to shiny on the
technical side of things.

Problem - I need to text mine a collection of 10,000 plain text
documents, all of which are sitting in a single folder. i don't have
any money to buy a database package, and even if i did i have no idea
how that would speed things up if i want to do all the processing in
R

Assumption - It is my understanding that R can only use one processor
on a machine when handeling calculations. If you wanted to use 4
processors, than you would have to open up 4 seperate instances of R
and share the work between them eg. give each instance of R 25% of the
documents you want processed

Question - It is possible to have one instance of R to divide the
workload, and then that instance opens up 4 other instances of R to do
the processing?

Or, is sometihng akin to tabbed browsing, where you have one main
window and several tabs, each corresponding to a different instance of
R?

appologies if none of hte above made sense  :o)

Clair xx


O/S: Windows Vista
R 2.8.0

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Using n+1 instances of R to utilise n processors on one machine - something like R with tabbed browsing?

2008-11-15 Thread Prof Brian Ripley

On Sun, 16 Nov 2008, Prof Brian Ripley wrote:

This is what e.g. package snow does: it will also collect the results for 
you.  See also package pvapply.


Typo: 'papply'



On Sat, 15 Nov 2008, [EMAIL PROTECTED] wrote:


Dear R-help,

Please forgive me if any of the following sounds naieve/confused, i've
just got back from a mini-pub-crawl, slightly tipsy, and am feeling
brave to ask a possibly silly question... also, not to shiny on the
technical side of things.

Problem - I need to text mine a collection of 10,000 plain text
documents, all of which are sitting in a single folder. i don't have
any money to buy a database package, and even if i did i have no idea
how that would speed things up if i want to do all the processing in
R

Assumption - It is my understanding that R can only use one processor
on a machine when handeling calculations. If you wanted to use 4
processors, than you would have to open up 4 seperate instances of R
and share the work between them eg. give each instance of R 25% of the
documents you want processed

Question - It is possible to have one instance of R to divide the
workload, and then that instance opens up 4 other instances of R to do
the processing?

Or, is sometihng akin to tabbed browsing, where you have one main
window and several tabs, each corresponding to a different instance of
R?

appologies if none of hte above made sense  :o)

Clair xx


O/S: Windows Vista
R 2.8.0

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

and provide commented, minimal, self-contained, reproducible code.



--
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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
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@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.