Re: [R] What is the difference between expression and quote whenused with eval()?

2010-02-21 Thread Romain Francois

On 02/21/2010 01:45 AM, blue sky wrote:


On Sat, Feb 20, 2010 at 2:40 AM, Romain Francois
romain.franc...@dbmail.com  wrote:

On 02/19/2010 10:31 PM, William Dunlap wrote:



-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of blue sky
Sent: Friday, February 19, 2010 12:11 PM
To: Peter Dalgaard
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] What is the difference between expression
and quote whenused with eval()?

On Fri, Feb 19, 2010 at 12:39 PM, Peter Dalgaard
p.dalga...@biostat.ku.dkwrote:


blue sky wrote:


I made the following example to see what are the difference between
expression and quote. But I don't see any difference when they are
used with eval()? Could somebody let me know what the difference is
between expression and quote?


Expressions are vectors of unevaluated expressions, so one


difference is


that expressions can have more than one element.

Another difference is more subtle: objects of mode


expression are better


at retaining their identity as an unevaluated expression


eval(substitute(2+x,list(x=expression(pi


Error in 2 + expression(pi) : non-numeric argument to


binary operator


eval(substitute(2+x,list(x=quote(pi


[1] 5.141593

The really convincing application of this escapes me for


the moment, but the


gist of it is that there are cases where a quoted


expression may blend in a


bit too seemlessly when using computing on the language.

Also, expression objects are more easy to recognize


programmeatically,


quote() may result in objects of mode call, name, or


one of the base


classes.


I want to see how expression(something) and quote(something) are
represented in R internally. But it seems that str() doesn't go to
that low level. Is there a way to show the internal representation?


There is also the internal inspect function :


inspect- function(x, ...) .Internal(inspect(x,...))



inspect( expression(log(1), sqrt(2), trunc(pi)) )

@9657560 20 EXPRSXP g0c2 [NAM(2)] (len=3, tl=153865256)
  @97ab5e8 06 LANGSXP g0c0 []
@92cf3fc 01 SYMSXP g0c0 [MARK,gp=0x4000] log
@9709a28 14 REALSXP g0c1 [] (len=1, tl=0) 1
  @97aa750 06 LANGSXP g0c0 []
@92cf204 01 SYMSXP g0c0 [MARK,gp=0x4000] sqrt
@97099e8 14 REALSXP g0c1 [] (len=1, tl=0) 2
  @97aa84c 06 LANGSXP g0c0 []
@92cf15c 01 SYMSXP g0c0 [MARK,gp=0x4000] trunc
@9347c38 01 SYMSXP g0c0 [MARK,gp=0x4000] pi


Where is the internal inspect documented? Would you please help
explain what does '@9657560 20', 'g0c2', 'NAM(2)', 'MARK', 'tl' and
'gp' stand for?


Reading R internals gives some clues, otherwise you can read the 
source, it is only about 200 lines in src/main/inspect.c


--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/OIXN : raster images and RImageJ
|- http://tr.im/OcQe : Rcpp 0.7.7
`- http://tr.im/O1wO : highlight 0.1-5

__
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] Use of R in clinical trials

2010-02-21 Thread Dieter Menne

Looks like my message misunderstood:

I tried to explain that assay validation and validation for clinical
trials are mixed up by people working mainly in clinical applications, who
have to make judgments about statistical applications. 

There is nothing wrong in using SAS, R or Excel (with caveats) in
statistics.

Dieter

-- 
View this message in context: 
http://n4.nabble.com/Use-of-R-in-clinical-trials-tp1559402p1563402.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] Time series cross-sectional regression analysis

2010-02-21 Thread Shubha Vishwanath Karanth
Hi all,

 

Is there a package in R to perform time series cross-sectional regression 
analysis (like the TSCSREG procedure in SAS)? Thanks for the info.

 

Thanks and Regards,

Shubha Karanth | Amba Research

Ph +91 80 3980 8283 | Mob +91 94 4886 4510

Bangalore * Colombo * London * New York * San José * Singapore * 
www.ambaresearch.com

 

 

This e-mail may contain confidential and/or privileged i...{{dropped:13}}

__
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] a question about the command followup.plot of epicale package

2010-02-21 Thread Peter Ehlers

Works fine for me. Maybe you're messing up epicalc's use()
procedure. It would really help if you took the trouble to
read and follow the posting guide and provide *reproducible code*
to illustrate your problem. It's also customary to indicate
where the data can be found (Orthodont is in pkg nlme).

 -Peter Ehlers

On 2010-02-20 19:40, 孟欣 wrote:

Hi all:
I have a question about the command followup.plot of epicale package.

As to the demo data Orthodont, the command followup.plot works well.But if I delete some rows 
of data(delete Male data,and keep Female data only, for instance),the command can't work,and the warning is In 
attr(get(search()[2]), names) == as.character(substitute(ylab)) : Longer object length is not an integer 
multiples of the shorter object.

If anyone can give me some guidance,I'll appreciate your help deeply.

Thanks a lot.

My best regards
[[alternative HTML version deleted]]



--
Peter Ehlers
University of Calgary

__
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] Downloading data from Reuters - second trial

2010-02-21 Thread Thomas Schwander

Dear lists (I was not sure which list would be the better-one),

I'm trying to download data from Reuters (3000 Xtra) into R with the 
extension written by Rory Winston (http://www.theresearchkitchen.com). I 
first stored the dlls into the bin directory of R, tried to load it into 
R with dyn.load but the extension cannot be loaded.


So I hoped to find an answer in the R list and got the topic. It seems 
like I have the same problem as Shubha, because also on his PC 
dyn.load(reuters_ts.dll) fails to load. Unfortunately the topics ends 
with I'll email you off-list and we can work through it.


Maybe anyone's also tried to download data from Reuters (even via 
another way than Rorys) and got it to work?


Thanks for your help and have a nice weekend,
Thomas

Configuration: Windows 7, R 2.10.0, Reuters 3000 Xtra

__
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: Compare Two dendrograms (Hierarchical Clusterings) ?

2010-02-21 Thread Tal Galili
Hello all,

I wish to compare two dendrograms (representing Hierarchical Clusterings).

My problems are several:

1) how do I manually create a dendrogram object ?
That is, how can I reconstruct it as an hclust object that creates such a
dendrogram, when all I have is the dendrogram image (but don't have the
underlaying distance matrix that produced it) ?
I see that there is a function called as.dendrogram But I wasn't able to
find an example on how to use it.

2) Assuming that I have to hclust (or dendrogram ) objects, how can I
compare them ?
After some searching and asking, I found this article:
 http://www.jstor.org/pss/2288117
And a few others that cite it, that gives ideas on how to do this.
But I wasn't able to come a cross a R implementation of it.
Is there ?


Many thanks,
Tal



Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--

[[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] Tutorials and scripts of Stochastic Frontier Analysis and Linear Programming.

2010-02-21 Thread Marcus Vinicius
Dear all,
I want to program  my own models about Stochastic Frontier Analysis and
Linear programming (Data Envelopment Analysis). In this context, is there
anyone that may help me with some simple tutorials and scripts about these
issues?
Thanks a lot.

-- 
Marcus Vinicius Pereira de Souza, Prof.

[[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] aggregating using 'with' function

2010-02-21 Thread AC Del Re
Wow! Jim, this is really impressive. I can't wrap my head around how
you figured this out.

Thank you,

AC

On Sun, Feb 21, 2010 at 12:02 AM, jim holtman jholt...@gmail.com wrote:
 This will do it.  You can see two different values for id=1:

  x - with(datas,  aggregate(list(r = r),  by = list(id = id, mod1 =
 mod1),mean))
 x
    id mod1  r
 1   1    1  0.980
 2   4    1  0.640
 3   7    1  0.490
 4  10    1  0.180
 5   1    2  0.295
 6   5    2  0.490
 7   8    2  0.330
 8  11    2  0.600
 9   6    3 -0.040
 10  9    3  0.580
 11 12    3  0.210
 # choose random duplicate to use
 do.call(rbind, lapply(split(x, x$id), function(.data)
 .data[sample(nrow(.data), 1),]))
    id mod1 r
 1   1    1  0.98
 4   4    1  0.64
 5   5    2  0.49
 6   6    3 -0.04
 7   7    1  0.49
 8   8    2  0.33
 9   9    3  0.58
 10 10    1  0.18
 11 11    2  0.60
 12 12    3  0.21

 # choose random duplicate to use - try to see if a different one comes up
 do.call(rbind, lapply(split(x, x$id), function(.data)
 .data[sample(nrow(.data), 1),]))
    id mod1  r
 1   1    2  0.295
 4   4    1  0.640
 5   5    2  0.490
 6   6    3 -0.040
 7   7    1  0.490
 8   8    2  0.330
 9   9    3  0.580
 10 10    1  0.180
 11 11    2  0.600
 12 12    3  0.210




 On Sat, Feb 20, 2010 at 9:50 PM, AC Del Re acde...@gmail.com wrote:

 OK, this is great, Jim. Last question: How about if I want the 1 copy
 of each id to be selected randomly versus taking the first one?

 AC

 On Sat, Feb 20, 2010 at 8:37 PM, jim holtman jholt...@gmail.com wrote:
  I am not sure what you mean by eliminating a row.  Now if you want only
  one
  copy of each 'id', and it is the first one, the you can use
  'duplicated':
 
  x - with(datas,  aggregate(list(r = r),  by = list(id = id, mod1 =
  mod1),mean))
  x
     id mod1  r
  1   1    1  0.980
  2   4    1  0.640
  3   7    1  0.490
  4  10    1  0.180
  5   1    2  0.295
  6   5    2  0.490
  7   8    2  0.330
  8  11    2  0.600
  9   6    3 -0.040
  10  9    3  0.580
  11 12    3  0.210
  subset(x, !duplicated(id))
     id mod1 r
  1   1    1  0.98
  2   4    1  0.64
  3   7    1  0.49
  4  10    1  0.18
  6   5    2  0.49
  7   8    2  0.33
  8  11    2  0.60
  9   6    3 -0.04
  10  9    3  0.58
  11 12    3  0.21
 
 
  On Sat, Feb 20, 2010 at 8:07 PM, AC Del Re de...@wisc.edu wrote:
 
  Perfect! Thanks Jim.
 
  Do you know how I could then reduce the data even further?
  Specifically, reducing it to 1 id per row? In this dataset, id 1 would
  have one row eliminated.
  Assume the data is much larger and cannot be deleted by visual
  inspection and elimination one row at a time.
 
 
  Thank you,
 
  AC
 
  On Sat, Feb 20, 2010 at 6:26 PM, jim holtman jholt...@gmail.com
  wrote:
   This seems to work fine (notice the missing 'c(...)'; why did you
   think
   you
   needed it);
  
    with(datas,  aggregate(list(r = r),  by = list(id = id, mod1 =
   mod1),mean))
      id mod1  r
   1   1    1  0.980
   2   4    1  0.640
   3   7    1  0.490
   4  10    1  0.180
   5   1    2  0.295
   6   5    2  0.490
   7   8    2  0.330
   8  11    2  0.600
   9   6    3 -0.040
   10  9    3  0.580
   11 12    3  0.210
  
  
  
   On Sat, Feb 20, 2010 at 6:54 PM, AC Del Re de...@wisc.edu wrote:
  
   Hi All,
  
   I am interested in aggregating a data frame based on 2
   categories--mean effect size (r) for each 'id's' 'mod1'. The
   'with' function works well when aggregating on one category (e.g.,
   based on 'id' below) but doesnt work if I try 2 categories. How can
   this be accomplished?
  
   # sample data
  
   id-c(1,1,1,rep(4:12))
   n-c(10,20,13,22,28,12,12,36,19,12, 15,8)
   r-c(.98,.56,.03,.64,.49,-.04,.49,.33,.58,.18, .6,.21)
   mod1-factor(c(1,2,2, rep(c(1,2,3),3)))
   mod2-c(1,2,15,rep(3,9))
   datas-data.frame(id,n,r,mod1,mod2)
  
   # one category works perfect:
  
   with(datas,  aggregate(list(r = r),  by = list(id = id),mean))
  
    id          r
   1   1  0.523
   2   4  0.640
   3   5  0.490
   4   6 -0.040
   5   7  0.490
   6   8  0.330
   7   9  0.580
   8  10  0.180
   9  11  0.600
   10 12  0.210
  
   # trying with 2 categories:
  
    with(datas,  aggregate(list(r = r),  by = list(c(id = id, mod1 =
   mod1)),mean))
  
   Error in FUN(X[[1L]], ...) : arguments must have same length
  
   Thank you,
  
   AC
  
   __
   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.
  
  
  
   --
   Jim Holtman
   Cincinnati, OH
   +1 513 646 9390
  
   What is the problem that you are trying to solve?
  
 
 
 
  --
  Jim Holtman
  Cincinnati, OH
  +1 513 646 9390
 
  What is the problem that you are trying to solve?
 



 --
 Jim Holtman
 Cincinnati, OH
 +1 513 646 9390

 What is the problem that you are trying to solve?



[R] Intervention Analysis

2010-02-21 Thread Jian Kang
Dear Sir/Madam,

I am doing the intervention analysis on climate data (time series). Is there
any package or methods to estimate the parameters (delta  omega) by R?

Thank you very much,

Best,

Jian Kang

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

2010-02-21 Thread Duncan Murdoch

On 18/02/2010 11:43 AM, David A.G wrote:

Dearl list,

can anyone point me to a function or library that can create a graph similar to 
the one in the following powerpoint presentation?


It could be done in rgl with a lot of work.  I don't know of a package 
where someone has already done the work.


rgl can plot triangles and quadrilaterals in 3d, but not general 
polygons.  So you'd need to decompose each chromosome sequence into a 
sequence of simpler shapes.  For example,


n - 100
f - rnorm(n, mean=10, sd=1)
g - rnorm(n, mean=10, sd=1)
x - 1:n
fn - colorRamp(c(blue,white,red))
color - function(value) {
  vals - fn(value)
  rgb(vals[,1], vals[,2], vals[,3], max=255)
}

m - max(f,g)

quadx - cbind( x[-n], x[-1], x[-1], x[-n] )
quadh - cbind( 0, 0, f[-1], f[-n] )
quadcol - cbind( color(0), color(0), color(f[-1]/m), color(f[-n]/m))


quads3d( as.numeric(t(quadx)), 10, as.numeric(t(quadh)), 
col=as.character(t(quadcol)))

quadh - cbind( 0, 0, g[-1], g[-n] )
quadcol - cbind( color(0), color(0), color(g[-1]/m), color(g[-n]/m))
quads3d( as.numeric(t(quadx)), 20, as.numeric(t(quadh)), 
col=as.character(t(quadcol)))


This doesn't get the colours the way the presentation had them, that 
would be a bit more work.


Duncan Murdoch



http://bmi.osu.edu/~khuang/IBGP705/BMI705-Lecture7.ppt

(pages 36-37)

In order to try to explain the graph, the way I see it in R terms is something 
like this:

the p-q axis is a vector of positions (for example, seq(0,500,1))
the Chr1-Chrx is a vector of units, in this case chromosomes (so something 
like seq(1,10,1))
the plotted data is observations for each unit at each position

I guess the fancy gradient on the highest peaks is tougher to get (knowing I am 
not an R expert), but just plain blue would suffice.

I have checked some of the graphs in the R graph gallery but I don´t think any 
of them would work

Thanks in advance,

Dave
 		 	   		  
_

Hotmail: Trusted email with powerful SPAM protection.

[[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] Tutorials and scripts of Stochastic Frontier Analysis and Linear Programming.

2010-02-21 Thread Arne Henningsen
Hi Marcus!

On Sun, Feb 21, 2010 at 1:47 PM, Marcus Vinicius mvi...@gmail.com wrote:
 I want to program  my own models about Stochastic Frontier Analysis and
 Linear programming (Data Envelopment Analysis). In this context, is there
 anyone that may help me with some simple tutorials and scripts about these
 issues?

What do you mean with own models? Have you developed new theoretical
models that are not (yet) available in current software package?

Various types of Stochastic Frontier Analysis (SFA) can be performed
by the frontier package [1,2] and there are (at least) three R
packages for Data Envelopment Analysis: DEA [3], FEAR [4] (academic
use without payments but NOT open source :-( ), and one of my
colleagues has an unpublished package for DEA (I can ask him to send
it to you).

[1] http://cran.r-project.org/package=frontier
[2] http://r-forge.r-project.org/projects/frontier/
[3] http://cran.r-project.org/package=DEA
[4] http://www.clemson.edu/economics/faculty/wilson/Software/FEAR/fear.html

Best wishes,
Arne

-- 
Arne Henningsen
http://www.arne-henningsen.name

__
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] plot is not keeping the order of variable

2010-02-21 Thread Or Duek
Hi,
I created a simple data frame with one factor and one numerical variable.
The factor was actually a vector of names of techniques to trimm reaction
time data.
I want to create a plot that shows the value of F test for every trimming
method.
So the data frame has its trim factor (who has those labels
mean,2500,2000,1500,1000,log,inverse,1SD,2SD)
and the numerical variable of the data frame has the F values for each one
of those trimming method.
When I ask R to plot it, it doesn't keep the order of the trimm verctor
correctly and the plot confuses the order so the most left one will be 1500
and then 1SD etc.
The values are correct but it is important for me to keep it in the same
order I built it.
How can I do it?
Thank you very much,
Or D.

[[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] plot is not keeping the order of variable

2010-02-21 Thread Ista Zahn
Hi Or,
I can't know for sure what your problem is without an example, but the
first thing I would do is check to make sure that your labels are
stored as an ordered factor (and that the order is correct). See
?factor for details.

Best,
Ista

On Sun, Feb 21, 2010 at 10:57 AM, Or Duek ord...@gmail.com wrote:
 Hi,
 I created a simple data frame with one factor and one numerical variable.
 The factor was actually a vector of names of techniques to trimm reaction
 time data.
 I want to create a plot that shows the value of F test for every trimming
 method.
 So the data frame has its trim factor (who has those labels
 mean,2500,2000,1500,1000,log,inverse,1SD,2SD)
 and the numerical variable of the data frame has the F values for each one
 of those trimming method.
 When I ask R to plot it, it doesn't keep the order of the trimm verctor
 correctly and the plot confuses the order so the most left one will be 1500
 and then 1SD etc.
 The values are correct but it is important for me to keep it in the same
 order I built it.
 How can I do it?
 Thank you very much,
 Or D.

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




-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org

__
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] plot is not keeping the order of variable

2010-02-21 Thread Or Duek
Ok,
It seems that the problem lays in the order (as Ista mentioned),
But, when I ask R to order it he chooses to order it by size and not by the
specific order I mentioned when I built the vector.
Is it possible to tell him to keep the order as mentioned?
Thank you.


On Sun, Feb 21, 2010 at 6:16 PM, Ista Zahn istaz...@gmail.com wrote:

 Hi Or,
 I can't know for sure what your problem is without an example, but the
 first thing I would do is check to make sure that your labels are
 stored as an ordered factor (and that the order is correct). See
 ?factor for details.

 Best,
 Ista

 On Sun, Feb 21, 2010 at 10:57 AM, Or Duek ord...@gmail.com wrote:
  Hi,
  I created a simple data frame with one factor and one numerical variable.
  The factor was actually a vector of names of techniques to trimm reaction
  time data.
  I want to create a plot that shows the value of F test for every trimming
  method.
  So the data frame has its trim factor (who has those labels
  mean,2500,2000,1500,1000,log,inverse,1SD,2SD)
  and the numerical variable of the data frame has the F values for each
 one
  of those trimming method.
  When I ask R to plot it, it doesn't keep the order of the trimm verctor
  correctly and the plot confuses the order so the most left one will be
 1500
  and then 1SD etc.
  The values are correct but it is important for me to keep it in the same
  order I built it.
  How can I do it?
  Thank you very much,
  Or D.
 
 [[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.
 



 --
 Ista Zahn
 Graduate student
 University of Rochester
 Department of Clinical and Social Psychology
 http://yourpsyche.org


[[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] odfWeave - merged table cells, and adding information like totals and p-values

2010-02-21 Thread Polwart Calum (County Durham and Darlington NHS Foundation Trust)
I'm hoping I'm missing some (probably fundamental basic process) which might 
make my life easier!

Lets assume I have a 3 column table summarizing results from a trial from three 
arms (Arm A, B and C).
For each arm there will be a number of pieces of information to report.  The 
simplest example might be to compare this to the demographic comparisons often 
seen in clinical traisl where you are setting out to prove that your 
randomization produced similar populations

So I might have a table like this:

---
 A B   C
---

Male50  50  50
Female  49  51  50

Age  6530  29  31
Age 65+ 69  72  69
---

I've got a matrix with that data in it which I'm passing to odfWeave's table 
function.   I just want to check a few basic things.

Here's some short code which will create the matrix:
groups = c(A,B,C)
factors = c(Male,Female, Age lt; 65, Age 65+)
mydata = matrix (c(50,49,30,69,50,51,29,72,50,50,31,69), nrow=4, dimnames = 
list(factors,groups))

- Is there anyway to add a merged cell above ABC which would say Group?
- If I want to total column I can do that using:
total=as.numeric()
for (fact in 1:length(factors)) {
total[fact]=sum(mydata[fact,])
}
mydata = cbind(mydata,total)
Is there an easier way?

- Now lets say i want to do a chi-squ test between the ages differences in Gp A 
and Gp B I run
chisq.test(mydata[3:4,1:2])
What I really want is the p-value and I'll want to repeat that for Gp A vs Gp 
C.  If I was just using R I'd simply print those and then add them to my table 
by hand.  But I'm trying to be smart and use odfWeave.  Now I know I can put 
them in my caption but I'd probably have added them as an extra row in my table 
or added it in brackets similar to the SDs/ORs and CIs shown in this example 
http://www.bmj.com/cgi/content-nw/full/340/feb05_1/c199/TBL2 depending which 
was more appropriate.

- Is there an easy way to do anything like this?  I'm thinking that we often 
put crude numbers in and (%) in brackets, or CIs etc  - so my exported table 
would not ideally be pure numbers.

- As a p value usually links two columns I might have expected to use a merged 
cell which again brings me back to my original question ;-)

Thanks





Calum Polwart BSc(Hons) MSc MRPharmS SP IP
Network Pharmacist - North of England Cancer Network and
Pharmacy Clinical Team Manager (Cancer  Aseptic Services) - County Durham  
Darlington NHS Foundation Trust



This message may contain confidential information. If yo...{{dropped:21}}

__
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] Hotelling T-test in R - error?

2010-02-21 Thread stephalope

Hey there,

I am trying to do a series of hotelling t-tests in R. But I keep getting the
following error:

 mat -
 cbind(Dataset$Ula.l.sl1A,Dataset$incisordepth.residuals,Dataset$lclhm.residuals,Dataset$lclpsl2.residuals,Dataset$llaheight.residuals,Dataset$llas.residuals,Dataset$lm3.m1,Dataset$lmheight.residuals,Dataset$ucllalia.residuals,Dataset$uclppr.residuals,Dataset$ulaah.residuals,Dataset$ulm3.residuals,Dataset$um3.m1,Dataset$umah.residuals,Dataset$uprheight.residuals)
 # Hotelling T2 test for grps 1  2
 T2.test(mat[which(as.factor(Dataset$diet)==levels(as.factor(Dataset$diet))[1]),],mat[which(as.factor(Dataset$diet)==levels(as.factor(Dataset$diet))[2]),])
Error in drop(.Call(La_dgesv, a, as.matrix(b), tol, PACKAGE = base)) : 
  system is computationally singular: reciprocal condition number =
5.39931e-21

I am not sure what is going on but I assume it has to do with the matrix
math? I have 6 groups, and some of them will work, and others I get this
error. Does this have to do with group size? I am running the t-test using
15 variables, when I run the ttest w/ 7 (despite which 7 I choose) the test
will run fine for all 6 groups. What do you think could be causing this? 

Thanks,
Stephanie
-- 
View this message in context: 
http://n4.nabble.com/Hotelling-T-test-in-R-error-tp1563584p1563584.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] What is your system for WorkFlow and Source Code Organizing in R ?

2010-02-21 Thread Jeff Laake

On 2/20/2010 9:49 AM, Tal Galili wrote:

Hello dear R users,

Recently there has been several fascinating threads on the website
stackoverflowhttp://stackoverflow.com  regarding the subject of R WorkFlow
best practices:

- What best practices do you use for programming in
R?http://stackoverflow.com/questions/2258092/what-best-practices-do-you-use-for-programming-in-r
- Workflow for statistical analysis and report
writinghttp://stackoverflow.com/questions/1429907/workflow-for-statistical-analysis-and-report-writing/1434424
- How to organize large R
programs?http://stackoverflow.com/questions/1266279/how-to-organize-large-r-programs
- Organizing R Source
Codehttp://stackoverflow.com/questions/2284446/organizing-r-source-code

And although many people there gave very detailed answers, I have the
feeling that there is much more wisdom on the subject that is still only
available in this mailing list.


   
Thanks for this post as I was unaware of stackOverflow.  Most of my work 
is single user development with some projects with 2 or 3 
collaborators.  I'm a scientific analyst so my needs may be different 
than others. To sum up my comments, I'm a big proponent of package 
development for analysis and I've recently started incorporating 
Sweave/Tex via Lyx into my publication/reporting.

So I'll phrase a few questions, and I hope as many people will participate
in sharing work styles tips:
1) What IDE do you use (and what features in it do you find are most
important to you. besides syntax highlighting and indentation)
   
I'm using Tinn-R. Until recently I've only used it for syntax 
highlighting but I'm learning that the project capability is quite 
useful and I'm integrating that.  However, a lot more could be done to 
support package development.

2) Do you use a version control system? if so which, and how do you often
use it?
   
Since I do all my work in packages as a single user, I simply zip up the 
source directory and store in an archive directory.  My own experience 
using Source-Forge on a project has not left me impressed but maybe that 
is my own lack of experience with it.

3) How (and when) do you document your code ?
   
I document each function (to some degree) as I go and then use those 
comments and more in each package help file.

4) What guides you when you build/organize your folders, files (data, code
and results) for a given project (when the project is small, medium and
   
I develop everything as a package unless it is a very small one time 
only analysis. Thus I use the package structure.  I can see from the 
stackOverflow discussions that some use packages the way I do but in 
general I think package development is viewed by most users as something 
for CRAN submission only. They are missing out on a great system for 
organizing projects which enables you to document data and code for 
analysis which provides a simple system for sharing your analytical 
techniques and analysis with others. If the data are included in or with 
the package, another researcher can repeat your analysis and look at 
each component. I use the example() functionality in the package man 
file for the main script for the analysis.  If I understood correctly 
this handles the issue of using source() rather than functions for 
reading, cleaning data etc that was discussed in one of the 
stackOverflow threads. The script is contained in your example and your 
true functions for analysis etc are in the package along with any data 
(if appropriate).  I'm not a naturally organized person and this gives 
me the structure I need to stay organized.

large) ?
5) Did I leave any important aspect of this subject out?

   
With regard to one of the comments on stackOverflow, I recently wrote a 
small function to detach, build and reattach a package from within R.  I 
used to work on a package using a command window to build the package, 
Tinn-R to edit functions and R to test. At a recent Seattle RUsers 
meeting Joe Cheng suggested building the package from within Rgui, so I 
wrote this function which gets rid of the need for the command window 
and automates the detach and library() to reattach.  I'd be interested 
to know how others do this. What I'd like to see is for some way to 
initiate that within Tinn-R. I understand it is possible in Eclipse.


bpkg=function(pkg=RMark,pkg.dir=C:/Users/Jeff 
Laake/Desktop/MyDocuments/R Development/)

{
#  Detaches package if it is loaded; installs and builds package and 
reloads the package

#
# Arguments:
#   pkg - name of your package
#   pkg.dir - directory containing all of your package directories
# package source is assumed to be in pkg.dir/pkg/pkg
# I use this structure because this lets me keep binary 
zip's and other files
# under pkg.dir/pkg.  I also usually create 
pkg.dir/pkg/archive and keep previous
# zipped source and binary versions in the archive 
directory.  If you don't want
# to 

Re: [R] Unordered Factors For ggplot?

2010-02-21 Thread Juliet Hannah
It would be easier with some example data. Make sure the data is represented by
factors and check the levels and relevel if needed. Something like:

df$day - factor(df$day, levels = c(30, 29, 20))

Also search the ggplot2 mailing list for factor and order. I think
similar questions
are asked often (although I may not be interpreting your question correctly).



On Wed, Feb 17, 2010 at 1:50 PM, Ryan Garner
ryan.steven.gar...@gmail.com wrote:

 I have data that comes into R already ordered. When I use ggplot, it orders
 them which I don't want. How do I fix this without changing
 options(contrast)?

 The data I have is number of days:
 30
 29
 ...
 20
 19
 ...
 10
 9
 ...
 1

 When I plot with ggplot, it orders them by the first number only. So 3 ends
 up coming before 29.
 --
 View this message in context: 
 http://n4.nabble.com/Unordered-Factors-For-ggplot-tp1559146p1559146.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] error in using sample( )

2010-02-21 Thread Peter Ehlers

On 2010-02-18 8:48, j...@math.ucdavis.edu wrote:

Hi,

I am using the command


sample(c(0,1,2),1,prob=c(0.2,0.3,0.5))


and I have this error notification

Error in sample(c(0,1,2),1,prob=c(0.2,0.3,0.5)):
  unused argument(s)(1,prob=c(0.2,0.3,0.5))

I don't know what is going wrong. Please give me some suggestions.


Try this:

 rm(sample)
 sample(c(0,1,2),1,prob=c(0.2,0.3,0.5))

 -Peter Ehlers



Thank you


Best,
Jing

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




--
Peter Ehlers
University of Calgary

__
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] Exporting Graphs

2010-02-21 Thread Karthik
I am a beginner to R, and am working on exporting graphs. Even when I
reduce the quality, it takes 30 or 40 minutes to export the graph.
Does anyone have suggestions on how to make it faster?

Thank you!
Karthik

__
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] Exporting Graphs

2010-02-21 Thread Tal Galili
Hi Karthik,
Please give a sample code of what it is that you are doing that is causing
this.

Also, have a look at:
?pdf
Or
?png


Cheers,
Tal

Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sun, Feb 21, 2010 at 9:27 PM, Karthik kwr...@gmail.com wrote:

 I am a beginner to R, and am working on exporting graphs. Even when I
 reduce the quality, it takes 30 or 40 minutes to export the graph.
 Does anyone have suggestions on how to make it faster?

 Thank you!
 Karthik

 __
 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] machine precision problem

2010-02-21 Thread wendy

Dear all,

I am analysising a set of gene expression data using multiplicative Gaussian
Kernel function. I calculated the kernels between two gene sets with 2
genes for each set. The kernels are less than 1, therefore the product of
the kernels is out of the minimum precision in R. I wonder if there is a way
to lowering the minimum double precision in R. I am using R version 2.10.1. 

Thank you in advance.
Wendy 
-- 
View this message in context: 
http://n4.nabble.com/machine-precision-problem-tp1563732p1563732.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] PostgreSQL under Snow Leopard

2010-02-21 Thread Dr Eberhard W Lisse
Hi,

I have nicely used RdbiPgSQL under 10.5 but now that I run 10.6
I can't get this to work.

I am quite sure I will not be the first to have this problem, so
can someone please point me somewhere where this has been described
or let me have a cookbook?

greetings, el

__
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] Exporting Graphs

2010-02-21 Thread Karthik
Hello Tal,
This is the code.


 hist(rnorm(100))
 jpeg(histogram.jpeg)
---

Even when I decrease the quality, I still have the same problem.


 hist(rnorm(100))
 jpeg(histogram.jpeg,quality=30)


Thank you for taking a look.
Karthik

On Sun, Feb 21, 2010 at 11:32 AM, Tal Galili tal.gal...@gmail.com wrote:

 Hi Karthik,
 Please give a sample code of what it is that you are doing that is causing 
 this.
 Also, have a look at:
 ?pdf
 Or
 ?png

 Cheers,
 Tal

 Contact 
 Details:---
 Contact me: tal.gal...@gmail.com |  972-52-7275845
 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | 
 www.r-statistics.com (English)
 --




 On Sun, Feb 21, 2010 at 9:27 PM, Karthik kwr...@gmail.com wrote:

 I am a beginner to R, and am working on exporting graphs. Even when I
 reduce the quality, it takes 30 or 40 minutes to export the graph.
 Does anyone have suggestions on how to make it faster?

 Thank you!
 Karthik

 __
 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] Exporting Graphs

2010-02-21 Thread baptiste auguie
Hi,

just to make sure, you didn't forget to close the device with dev.off() ?

baptiste

On 21 February 2010 20:48, Karthik kwr...@gmail.com wrote:
 Hello Tal,
 This is the code.

 
 hist(rnorm(100))
 jpeg(histogram.jpeg)
 ---

 Even when I decrease the quality, I still have the same problem.

 
 hist(rnorm(100))
 jpeg(histogram.jpeg,quality=30)
 

 Thank you for taking a look.
 Karthik

 On Sun, Feb 21, 2010 at 11:32 AM, Tal Galili tal.gal...@gmail.com wrote:

 Hi Karthik,
 Please give a sample code of what it is that you are doing that is causing 
 this.
 Also, have a look at:
 ?pdf
 Or
 ?png

 Cheers,
 Tal

 Contact 
 Details:---
 Contact me: tal.gal...@gmail.com |  972-52-7275845
 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | 
 www.r-statistics.com (English)
 --




 On Sun, Feb 21, 2010 at 9:27 PM, Karthik kwr...@gmail.com wrote:

 I am a beginner to R, and am working on exporting graphs. Even when I
 reduce the quality, it takes 30 or 40 minutes to export the graph.
 Does anyone have suggestions on how to make it faster?

 Thank you!
 Karthik

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


Re: [R] Exporting Graphs

2010-02-21 Thread Stephan Kolassa

Hi Karthik,

I think you will need to do something like

jpeg(histograms.jpg)
hist(rnorm(100))
dev.off()

HTH
Stephan

Karthik schrieb:

Hello Tal,
This is the code.



hist(rnorm(100))
jpeg(histogram.jpeg)

---

Even when I decrease the quality, I still have the same problem.



hist(rnorm(100))
jpeg(histogram.jpeg,quality=30)



Thank you for taking a look.
Karthik

On Sun, Feb 21, 2010 at 11:32 AM, Tal Galili tal.gal...@gmail.com wrote:

Hi Karthik,
Please give a sample code of what it is that you are doing that is causing this.
Also, have a look at:
?pdf
Or
?png

Cheers,
Tal

Contact 
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | 
www.r-statistics.com (English)
--




On Sun, Feb 21, 2010 at 9:27 PM, Karthik kwr...@gmail.com wrote:

I am a beginner to R, and am working on exporting graphs. Even when I
reduce the quality, it takes 30 or 40 minutes to export the graph.
Does anyone have suggestions on how to make it faster?

Thank you!
Karthik

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


Re: [R] Exporting Graphs

2010-02-21 Thread Sharpie


Karthik wrote:
 
 Hello Tal,
 This is the code.
 
 
 hist(rnorm(100))
 jpeg(histogram.jpeg)
 ---
 
 Even when I decrease the quality, I still have the same problem.
 
 
 hist(rnorm(100))
 jpeg(histogram.jpeg,quality=30)
 
 
 Thank you for taking a look.
 Karthik
 

Hi Karthic,

You have things a little mixed around there-- use plotting commands after
you open an output device.  Like so:

  jpeg( histogram.jpeg )
  hist( rnorm(100) )

And when you're done, don't forget to call dev.off().  As you mentioned that
you are a beginner, I would strongly suggest flipping through the
Introduction to R manual.  A copy can be accessed online at:

  http://cran.r-project.org/doc/manuals/R-intro.html

Section 12 provides a good overview of graphics in R.

Good luck!

-Charlie
-- 
View this message in context: 
http://n4.nabble.com/Exporting-Graphs-tp1563718p1563753.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] PostgreSQL under Snow Leopard

2010-02-21 Thread David Winsemius


On Feb 21, 2010, at 1:47 PM, Dr Eberhard W Lisse wrote:


Hi,

I have nicely used RdbiPgSQL under 10.5 but now that I run 10.6
I can't get this to work.

I am quite sure I will not be the first to have this problem, so
can someone please point me somewhere where this has been described
or let me have a cookbook?



You should check the R-Mac-SIG archives:

http://dir.gmane.org/gmane.comp.lang.r.mac

http://markmail.org/browse/org.r-project.r-sig-mac

And if not found, then post on that list.

David.



greetings, el

__
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 get the single bar x coordinate in barchart when groups is used?

2010-02-21 Thread Peter Ehlers

On 2010-02-20 6:22, Walmes Marques Zeviani wrote:


Hi all,

I am using barchart() to plot values above the bars. When using groups argument 
we get bars grouped arround a given x level. By placing values above this bars 
we need to know the respective x coordinates. How can I get it?

require(lattice)
da- expand.grid(x=1:5, z=1:3, w=1:2)
da$y- rpois(da$x, lambda=23)

barchart(y~x|w, groups=z, data=da, horizontal=FALSE,
  panel=function(x, y, subscripts, groups, ...){
panel.barchart(x, y, subscripts=subscripts, groups=groups, ...)
d- 0.22 #-- how obtain d or coordinates?
panel.text(x+c(-d,0,d), y, label=y, pos=3)
  })



The width of each bar is 'd';
the width of the space between bars is 's';
the distance from the start of one group to the start of the
next group is 3*d + s = 1 unit on the x-scale;

Now we need to know the relationship of 's' to 'd': 3*d/s = 2;
Hence 3*d + 3*d/2 = 1 = d = 2/9 (so your 0.22 was spot-on).

How do we know that 3*d/s = 2? That's the default box.ratio value.
See what happens if you add box.ratio=3 (or whatever) to your call.

 -Peter Ehlers



Thanks in advance.
Walmes Zeviani, Lavras - MG, Brasil.

_

os.

dium=Taglineutm_campaign=InfuseSocial
[[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.




--
Peter Ehlers
University of Calgary

__
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] Exporting Graphs

2010-02-21 Thread Karthik
Thank you everyone. Your advice helped. Right now I am working through
Introductory Statistics with R (Dalgaard) and will also take a look at
the R Manual.
--Karthik

[:-)]+|=0=''



On Sun, Feb 21, 2010 at 12:01 PM, Sharpie ch...@sharpsteen.net wrote:


 Karthik wrote:

 Hello Tal,
 This is the code.

 
 hist(rnorm(100))
 jpeg(histogram.jpeg)
 ---

 Even when I decrease the quality, I still have the same problem.

 
 hist(rnorm(100))
 jpeg(histogram.jpeg,quality=30)
 

 Thank you for taking a look.
 Karthik


 Hi Karthic,

 You have things a little mixed around there-- use plotting commands after
 you open an output device.  Like so:

  jpeg( histogram.jpeg )
  hist( rnorm(100) )

 And when you're done, don't forget to call dev.off().  As you mentioned that
 you are a beginner, I would strongly suggest flipping through the
 Introduction to R manual.  A copy can be accessed online at:

  http://cran.r-project.org/doc/manuals/R-intro.html

 Section 12 provides a good overview of graphics in R.

 Good luck!

 -Charlie
 --
 View this message in context: 
 http://n4.nabble.com/Exporting-Graphs-tp1563718p1563753.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] Exporting Graphs

2010-02-21 Thread Tal Galili
BTW - if you are using an image with little color (but many lines),
I remember reading that png is better to use then jpeg.

Tal

Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sun, Feb 21, 2010 at 10:07 PM, Karthik kwr...@gmail.com wrote:

 Thank you everyone. Your advice helped. Right now I am working through
 Introductory Statistics with R (Dalgaard) and will also take a look at
 the R Manual.
 --Karthik

 [:-)]+|=0=''



 On Sun, Feb 21, 2010 at 12:01 PM, Sharpie ch...@sharpsteen.net wrote:
 
 
  Karthik wrote:
 
  Hello Tal,
  This is the code.
 
  
  hist(rnorm(100))
  jpeg(histogram.jpeg)
  ---
 
  Even when I decrease the quality, I still have the same problem.
 
  
  hist(rnorm(100))
  jpeg(histogram.jpeg,quality=30)
  
 
  Thank you for taking a look.
  Karthik
 
 
  Hi Karthic,
 
  You have things a little mixed around there-- use plotting commands after
  you open an output device.  Like so:
 
   jpeg( histogram.jpeg )
   hist( rnorm(100) )
 
  And when you're done, don't forget to call dev.off().  As you mentioned
 that
  you are a beginner, I would strongly suggest flipping through the
  Introduction to R manual.  A copy can be accessed online at:
 
   http://cran.r-project.org/doc/manuals/R-intro.html
 
  Section 12 provides a good overview of graphics in R.
 
  Good luck!
 
  -Charlie
  --
  View this message in context:
 http://n4.nabble.com/Exporting-Graphs-tp1563718p1563753.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.


[[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] Comparing two date columns

2010-02-21 Thread Newbie19_02

Hi everyone,

I have another fairly simple question.  I want to take the earliest of two
dates from these two date columns.  I've tried converting the dates to
numbers and just get a vector full of NA's.  I've also tried using the chron
function to compare the two and have been unsuccessful.  I then tried to
use:temp.2 - as.POSIXct(strptime(temp, '%d/%m/%Y')) where temp is character
vector of one of the date columns this did not work either.  I'm not sure
what to do now.  
 
date_1 date_2
2005-11-25   NA
2007-10-23   NA
NA   1999-12-13
2006-01-25   NA
2006-06-12   NA
2005-08-08   NA
2007-12-12   NA
2008-04-29   NA
2005-03-28   NA
2004-11-18 2000-11-02
2006-03-16   NA
2007-01-17   NA


Thanks for your help,
Natalie
-- 
View this message in context: 
http://n4.nabble.com/Comparing-two-date-columns-tp1563776p1563776.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] Comparing two date columns

2010-02-21 Thread David Winsemius


On Feb 21, 2010, at 2:19 PM, Newbie19_02 wrote:



Hi everyone,

I have another fairly simple question.  I want to take the earliest  
of two

dates from these two date columns.  I've tried converting the dates to
numbers and just get a vector full of NA's.  I've also tried using  
the chron
function to compare the two and have been unsuccessful.  I then  
tried to
use:temp.2 - as.POSIXct(strptime(temp, '%d/%m/%Y')) where temp is  
character
vector of one of the date columns this did not work either.  I'm not  
sure

what to do now.

date_1 date_2
2005-11-25   NA
2007-10-23   NA
NA   1999-12-13
2006-01-25   NA
2006-06-12   NA
2005-08-08   NA
2007-12-12   NA
2008-04-29   NA
2005-03-28   NA
2004-11-18 2000-11-02
2006-03-16   NA
2007-01-17   NA


We cannot tell from that output what data type you are working with.  
You may not be working with Dates at all. You also have not offered  
the code that is not working. If they are dates, then pmin should work  
well.


 pmin(as.Date(2004-11-18), as.Date(2000-11-02))
[1] 2000-11-02

Next time use dput to allow unambiguous communication. (The fact that  
you are not using either dput or dump suggests you have not yet spent  
enough effort at reading the Posting Guide.)


--
David



Thanks for your help,
Natalie
--
View this message in context: 
http://n4.nabble.com/Comparing-two-date-columns-tp1563776p1563776.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.


[R] cross-validation in plsr package

2010-02-21 Thread Peter Tillmann

Dear readers,

can anyone give an example how to use cross-validation in the plsr package.
I miss to find the number of factors proposed by cross-validation as
optimum.


Thank you

Peter
-- 
View this message in context: 
http://n4.nabble.com/cross-validation-in-plsr-package-tp1563815p1563815.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] Comparing two date columns

2010-02-21 Thread Newbie19_02

Dear David and Mark,

Thanks very much for your help.  THey were actually in date format so pmin
works really well.  I didn't realise that you could use it on dates that is
why I was trying to coerce the date into a numeric.  Thanks for both
suggestions and I will remember to use a working example next time.

Thanks again,
Natalie
-- 
View this message in context: 
http://n4.nabble.com/Comparing-two-date-columns-tp1563776p1563829.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] PostgreSQL under Snow Leopard

2010-02-21 Thread Dr Eberhard W Lisse
Thank you, last post 2007.

el

On 2010-02-21 22:05 , David Winsemius wrote:


 You should check the R-Mac-SIG archives:
 
 http://dir.gmane.org/gmane.comp.lang.r.mac
 
 http://markmail.org/browse/org.r-project.r-sig-mac
 
 And if not found, then post on that list.
 
 David.

__
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] Newbie woes with par:mar

2010-02-21 Thread Dimitri Shvorob

I have a simple barchart with horizontal bars and horizontal tick labels,
produced with

barplot(x, horiz = T, names.arg = c, las = 1)

The labels are longish strings, truncated on the plot. I wish to leave more
space for the left margin, and experiment with mar parameter,

barplot(x, horiz = T, names.arg = c, las = 1, mar = c(5, 15, 4, 2))

trying various values for the second vector element, but do not notice any
change. Consulting this nice tutorial

http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htm

has not helped. Can anyone point me in the right direction?

Thank you.
-- 
View this message in context: 
http://n4.nabble.com/Newbie-woes-with-par-mar-tp1563745p1563745.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] Error with write.table

2010-02-21 Thread jmgray


 I was trying to save a data frame to an excel file using the following
 command:

 write.table(myData, file=myData.csv,sep=,, row.names=F)

 The command works for some data frames, but for other data frames, I get
 the
 following error:

 Error in if (inherits(X[[j]], data.frame)  ncol(xj)  1L) X[[j]] -
 as.matrix(X[[j]]) :
   missing value where TRUE/FALSE needed
 

I got an identical error message when instead of combining two data frames
(a,b) with a method such as:

  a - cbind.data.frame(a,b)

I embedded a data.frame in another, e.g.,

  a$b - b

In the latter example, I have a column (a$b) that consists of a data frame
onto itself, which write.table apparently can't handle.

Jesse Gray
Neurobiology
Harvard Medical School

Here's my precise error message:

Error in if (inherits(X[[j]], data.frame)  ncol(xj)  1L) X[[j]] -
as.matrix(X[[j]]) : 
  missing value where TRUE/FALSE needed
-- 
View this message in context: 
http://n4.nabble.com/Error-with-write-table-tp1460198p1563869.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] Newbie woes with par:mar

2010-02-21 Thread Peter Ehlers

On 2010-02-21 12:51, Dimitri Shvorob wrote:


I have a simple barchart with horizontal bars and horizontal tick labels,
produced with

barplot(x, horiz = T, names.arg = c, las = 1)

The labels are longish strings, truncated on the plot. I wish to leave more
space for the left margin, and experiment with mar parameter,

barplot(x, horiz = T, names.arg = c, las = 1, mar = c(5, 15, 4, 2))



par(mar = c(5, 15, 4, 2))
barplot(x, .)

I always find it best to set my graphics pars first instead of
overloading the plot call (where, as you've discovered, some of
the par settings don't work).

 -Peter Ehlers


trying various values for the second vector element, but do not notice any
change. Consulting this nice tutorial

http://research.stowers-institute.org/efg/R/Graphics/Basics/mar-oma/index.htm

has not helped. Can anyone point me in the right direction?

Thank you.


--
Peter Ehlers
University of Calgary

__
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] plot is not keeping the order of variable

2010-02-21 Thread Don MacQueen

Perhaps this example will help.


 x - factor(c('b','a','d'), levels=c('a','d','b'))
 y - 1:3
 plot(x,y)


And compare with


 z - factor(c('b','a','d'))
 plot(z,y)


In the first, the plot is in the order that I chose. In the second it 
is in the order that R chose -- and R chose it according to a 
built-in and reasonable rule.


-Don

At 6:30 PM +0200 2/21/10, Or Duek wrote:

Ok,
It seems that the problem lays in the order (as Ista mentioned),
But, when I ask R to order it he chooses to order it by size and not by the
specific order I mentioned when I built the vector.
Is it possible to tell him to keep the order as mentioned?
Thank you.


On Sun, Feb 21, 2010 at 6:16 PM, Ista Zahn istaz...@gmail.com wrote:


 Hi Or,
 I can't know for sure what your problem is without an example, but the
 first thing I would do is check to make sure that your labels are
 stored as an ordered factor (and that the order is correct). See
 ?factor for details.

 Best,
 Ista

 On Sun, Feb 21, 2010 at 10:57 AM, Or Duek ord...@gmail.com wrote:
  Hi,
  I created a simple data frame with one factor and one numerical variable.
  The factor was actually a vector of names of techniques to trimm reaction
  time data.
  I want to create a plot that shows the value of F test for every trimming
  method.
  So the data frame has its trim factor (who has those labels
  mean,2500,2000,1500,1000,log,inverse,1SD,2SD)
  and the numerical variable of the data frame has the F values for each
 one
  of those trimming method.
  When I ask R to plot it, it doesn't keep the order of the trimm verctor
  correctly and the plot confuses the order so the most left one will be
 1500
  and then 1SD etc.
  The values are correct but it is important for me to keep it in the same
  order I built it.
  How can I do it?
  Thank you very much,

   Or D.
  
  [[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.
 



 --
 Ista Zahn
 Graduate student
 University of Rochester
 Department of Clinical and Social Psychology
 http://*yourpsyche.org



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



--
--
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062

__
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] Error with write.table

2010-02-21 Thread Peter Ehlers


On 2010-02-21 15:06, jmgray wrote:




I was trying to save a data frame to an excel file using the following
command:

write.table(myData, file=myData.csv,sep=,, row.names=F)

The command works for some data frames, but for other data frames, I get
the
following error:

Error in if (inherits(X[[j]], data.frame)  ncol(xj)  1L) X[[j]]-
as.matrix(X[[j]]) :
   missing value where TRUE/FALSE needed



I got an identical error message when instead of combining two data frames
(a,b) with a method such as:

   a- cbind.data.frame(a,b)

I embedded a data.frame in another, e.g.,

   a$b- b

In the latter example, I have a column (a$b) that consists of a data frame
onto itself, which write.table apparently can't handle.

Jesse Gray
Neurobiology
Harvard Medical School

Here's my precise error message:

Error in if (inherits(X[[j]], data.frame)  ncol(xj)  1L) X[[j]]-
as.matrix(X[[j]]) :
   missing value where TRUE/FALSE needed


This is one reason why I'm not fond of the '$' way of accessing
dataframe components. I like neither of your methods for
combining two dataframes. Try instead:

a - data.frame(a, b) ## no problem (assuming same number of rows)

or

a[, b] - b  ## R tells you that you're trying to do
  something you shouldn't.

 -Peter Ehlers

__
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 on 64-Bit…

2010-02-21 Thread Axel Urbiz
Dear R users,

I know this issue came up in the list several times.  I’m currently running
R on 32-bit on Windows and due to memory limitation problems would like to
move to a 64-bit environment.  I’m exploring my options and would appreciate
your expertise:

1)  Windows 64-bit: Prof. Brian Ripley recently posted the experimental
built of R for win 64-bit. I’ll appreciate any feedback on anyone who has
been testing this. He also mentioned that for now, “...this as only being of
interest for those who only use a few relatively simple packages”.  But if
one uses packages beyond those “relatively simple”, how possible is today to
have those installed?

2)  MacOS or Unix.  Sorry for my ignorance on this…but if I use any of
these environments on 64-bit and  installed R on any of those, this is all I
need to have R working on 64-bit. How about installing specialized packages?
Are the packages on the CRAN repositories “ready tho use” on these systems
or do I have to do any additional work to get them going?

Thanks in advance for your help!



Axel.

[[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] plot is not keeping the order of variable

2010-02-21 Thread Peter Dalgaard

Or Duek wrote:

Ok,
It seems that the problem lays in the order (as Ista mentioned),
But, when I ask R to order it he chooses to order it by size and not by the
specific order I mentioned when I built the vector.
Is it possible to tell him to keep the order as mentioned?
Thank you.


You're still not completely clear about how you built the factor, but I 
venture a guess:


Notice that factors tend to get their levels in alphabetical order, 
unless special tricks are used.


 d - data.frame(f=c(rare, medium,well-done))
 d$f
[1] rare  mediumwell-done
Levels: medium rare well-done

To get the cast in order of appearance, this can be used:

 d$f - factor(d$f, levels=unique(d$f))
 d$f
[1] rare  mediumwell-done
Levels: rare medium well-done





On Sun, Feb 21, 2010 at 6:16 PM, Ista Zahn istaz...@gmail.com wrote:


Hi Or,
I can't know for sure what your problem is without an example, but the
first thing I would do is check to make sure that your labels are
stored as an ordered factor (and that the order is correct). See
?factor for details.

Best,
Ista

On Sun, Feb 21, 2010 at 10:57 AM, Or Duek ord...@gmail.com wrote:

Hi,
I created a simple data frame with one factor and one numerical variable.
The factor was actually a vector of names of techniques to trimm reaction
time data.
I want to create a plot that shows the value of F test for every trimming
method.
So the data frame has its trim factor (who has those labels
mean,2500,2000,1500,1000,log,inverse,1SD,2SD)
and the numerical variable of the data frame has the F values for each

one

of those trimming method.
When I ask R to plot it, it doesn't keep the order of the trimm verctor
correctly and the plot confuses the order so the most left one will be

1500

and then 1SD etc.
The values are correct but it is important for me to keep it in the same
order I built it.
How can I do it?
Thank you very much,
Or D.

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




--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org



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



--
   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
~~ - (p.dalga...@biostat.ku.dk)  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] R on 64-Bit…

2010-02-21 Thread Mark Knecht
On Sun, Feb 21, 2010 at 2:43 PM, Axel Urbiz axel.ur...@gmail.com wrote:
 Dear R users,

 I know this issue came up in the list several times.  I’m currently running
 R on 32-bit on Windows and due to memory limitation problems would like to
 move to a 64-bit environment.  I’m exploring my options and would appreciate
 your expertise:

 1)      Windows 64-bit: Prof. Brian Ripley recently posted the experimental
 built of R for win 64-bit. I’ll appreciate any feedback on anyone who has
 been testing this. He also mentioned that for now, “...this as only being of
 interest for those who only use a few relatively simple packages”.  But if
 one uses packages beyond those “relatively simple”, how possible is today to
 have those installed?

 2)      MacOS or Unix.  Sorry for my ignorance on this…but if I use any of
 these environments on 64-bit and  installed R on any of those, this is all I
 need to have R working on 64-bit. How about installing specialized packages?
 Are the packages on the CRAN repositories “ready tho use” on these systems
 or do I have to do any additional work to get them going?

 Thanks in advance for your help!



 Axel.

I can certainly report the R is functional on Gentoo 64-bit Linux. I
wouldn't know how to test whether it's stuck with any form of 32-bit
limitations as my use of R is very remedial, but it's certainly
working.

R is supported in Gentoo portage. R-2.9.2 is marked stable, 2.10.0 and
2.10.1 are marked testing.

If you're not a Linux guy already then Gentoo might not be where you'd
want to start but the R programming language is here, alive and well.

Cheers,
Mark

__
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] Newbie woes with par:mar

2010-02-21 Thread Dimitri Shvorob

Thanks a lot, Peter!
-- 
View this message in context: 
http://n4.nabble.com/Newbie-woes-with-par-mar-tp1563745p1563905.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] R on 64-Bit…

2010-02-21 Thread Newbie19_02

I'm using R for x64bit on my Windows machine and I haven't had any problems. 
I've installed a number of packages for data analysis and they all seem to
work.  
-- 
View this message in context: 
http://n4.nabble.com/R-on-64-Bit-tp1563895p1563910.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] R on 64-Bit…

2010-02-21 Thread David Winsemius


On Feb 21, 2010, at 4:43 PM, Axel Urbiz wrote:


Dear R users,

I know this issue came up in the list several times.  I’m currently  
running
R on 32-bit on Windows and due to memory limitation problems would  
like to
move to a 64-bit environment.  I’m exploring my options and would  
appreciate

your expertise:

1)  Windows 64-bit: Prof. Brian Ripley recently posted the  
experimental
built of R for win 64-bit. I’ll appreciate any feedback on anyone  
who has
been testing this. He also mentioned that for now, “...this as only  
being of
interest for those who only use a few relatively simple packages”.   
But if
one uses packages beyond those “relatively simple”, how possible is  
today to

have those installed?

2)  MacOS or Unix.  Sorry for my ignorance on this
but if I use any of
these environments on 64-bit and  installed R on any of those, this  
is all I
need to have R working on 64-bit. How about installing specialized  
packages?
Are the packages on the CRAN repositories “ready tho use” on these  
systems

or do I have to do any additional work to get them going?


MacOS version of R from the att.research site can be run 64 bit as  
either a Terminal launched console or from the R64.app GUI. My  
experience is with the 64-bit GUI. Most packages are available as  
binaries on CRAN these days. The GUI offers a Package Installer so it  
really quite intuitive. It used to be that you often needed to compile  
from source, which wass still pretty easy if you have the necessary  
Apple and other tools from the att.research site. The source  
compilation generally proceeds automagically.  My work machine uses  
its 16GB very well. Occasionally it maxes out and paging to disk slows  
down computation for a bit, but eventually the garbage collection  
kicks in and cleans things up. Overall a very capable environment.





Thanks in advance for your help!



Axel.

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


[R] tests for measures of influence in regression

2010-02-21 Thread Frank Tamborello
influence.measures gives several measures of influence for each  
observation (Cook's Distance, etc) and actually flags observations  
that it determines are influential by any of the measures. Looks  
good! But how does it discriminate between the influential and non- 
influential observations by each of the measures? Like does it do a  
Bonferroni-corrected t on the residuals identified by the influence  
measures or some other test?

Cheers,

Frank Tamborello, PhD
W. M. Keck Postdoctoral Fellow
School of Health Information Sciences
University of Texas Health Science Center, Houston


[[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] R on 64-Bit…

2010-02-21 Thread Liviu Andronic
On 2/21/10, Axel Urbiz axel.ur...@gmail.com wrote:
  2)  MacOS or Unix.  Sorry for my ignorance on this…but if I use any of
  these environments on 64-bit and  installed R on any of those, this is all I
  need to have R working on 64-bit. How about installing specialized packages?
  Are the packages on the CRAN repositories “ready tho use” on these systems
  or do I have to do any additional work to get them going?

I am using R on Debian testing 64-bit. Debian has good support for R,
and provides most CRAN packages as binaries, via cran2deb (a rarity on
Linux). With a slight effort Debian can be good for a novice in Linux.
Liviu

__
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] vloopkup or search function

2010-02-21 Thread Roslina Zakaria
Hi,
 
Does R has something similar  to vlookup function in excel?
 
Thank you for the info.




  
[[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] vloopkup or search function

2010-02-21 Thread jim holtman
?match

and several other ways depending on exactly what you are trying to do.

On Sun, Feb 21, 2010 at 9:15 PM, Roslina Zakaria zrosl...@yahoo.com wrote:
 Hi,

 Does R has something similar  to vlookup function in excel?

 Thank you for the info.





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





-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

__
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] vloopkup or search function

2010-02-21 Thread Peter Alspach
Tena koe Roslina

?merge

HTH 

Peter Alspach 

 -Original Message-
 From: r-help-boun...@r-project.org 
 [mailto:r-help-boun...@r-project.org] On Behalf Of Roslina Zakaria
 Sent: Monday, 22 February 2010 3:15 p.m.
 To: r-help@r-project.org
 Subject: [R] vloopkup or search function
 
 Hi,
  
 Does R has something similar  to vlookup function in excel?
  
 Thank you for the info.
 
 
 
 
   
   [[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] (Somewhat) broken EPS files produced

2010-02-21 Thread Wartan Hachaturow
Hello.

I'm writing some simple text using sweave, and faced a strange problem
with eps files produced for my plots (one example attached).
Individual eps files are interpreted by ghostscript just fine, and
show up without errors. But once I try to include them into main
LaTeX/Sweave document (using regular \includegraphics, produced by
Sweave),
ghostscript gives me this error on those files:

Error: /undefinedresult in --stringwidth--
Operand stack:
   (600)   0.5
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
--nostringval--   --nostringval--   false   1   %stopped_push   1878
1   3   %oparray_pop   1877   1   3   %oparray_pop   1861   1   3
%oparray_pop   1755   1   3   %oparray_pop   --nostringval--
%errorexec_pop   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
--nostringval--
Dictionary stack:
   --dict:1157/1684(ro)(G)--   --dict:0/20(G)--   --dict:82/200(L)--
--dict:178/300(L)--   --dict:91/200(L)--
Current allocation mode is local
Current file position is 207944
GPL Ghostscript 8.71: Unrecoverable error, exit code 1

What might be the problem?

P.S. I get exactly the same behavior on Debian/sid and OS X.

-- 
Regards, Wartan.


Report-fig1.eps
Description: PostScript 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] Use of R in clinical trials

2010-02-21 Thread Kingsford Jones
A John Chambers article (published back when S was but a twinkle in
his eye) provides an interesting snapshop of pre-SAS statistical
computing:

@article{chambers67,
  title={Some general aspects of statistical computing},
  author={Chambers, J.M.},
  journal={Journal of the Royal Statistical Society. Series C (Applied
Statistics)},
  volume={16},
  number={2},
  pages={124--132},
  year={1967},
  publisher={Blackwell Publishing; Royal Statistical Society}
}

BMD and P-stat are discussed in some detail, while the following get
mention in the reference section: TISER, BOMM, ASCOP, AARDVARK,
TARSIER, ZORILLA, GENSTAT, and STORM, among others.

best,

Kingsford Jones



On Thu, Feb 18, 2010 at 9:05 PM, myrm...@earthlink.net wrote:

 I am old enough to have lived through this particular transition.
 Prior to the advent of SAS, trials were analyzed by in-house written
 programs (usually in Fortran maybe with the help of IMSL). These
 programs were huge card decks. Having the card reader eat a card
 half way through reading the deck was a not unusual occurrence.

 I was responsible for deploying the first version of SAS. This meant
 compiling PL/I code stored on a magnetic tape and storing it on limited
 and expensive disk drives. It was several years before the transition
 from using in-house programs to SAS was completed. Yes there was a
 great deal of angst and I spent a lot of time convincing people that
 in the end there would be a cost advantage and overcoming institutional
 inertia.

 By the way, this was all done on computers that you will probably find
 only in a museum, if at all. These systems filled whole rooms and required
 a staff just to keep them running.

 Murray M Cooper, PhD
 Richland Statistics
 9800 North 24th St
 Richland, MI  49083



 -Original Message-
 From: Christopher W. Ryan cr...@binghamton.edu
 Sent: Feb 18, 2010 1:08 PM
 To: r-help@r-project.org
 Cc: p.dalga...@biostat.ku.dk
 Subject: Re: [R] Use of R in clinical trials
 
 Pure Food and Drug Act: 1906
 FDA: 1930s
 founding of SAS: early 1970s
 
 (from the history websites of SAS and FDA)
 
 What did pharmaceutical companies use for data analysis before there was
 SAS? And was there much angst over the change to SAS from whatever was
 in use before?
 
 Or was there not such emphasis on and need for thorough data analysis
 back then?
 
 --Chris
 Christopher W. Ryan, MD
 SUNY Upstate Medical University Clinical Campus at Binghamton
 425 Robinson Street, Binghamton, NY  13904
 cryanatbinghamtondotedu
 
 If you want to build a ship, don't drum up the men to gather wood,
 divide the work and give orders. Instead, teach them to yearn for the
 vast and endless sea.  [Antoine de St. Exupery]
 
 Bert Gunter wrote:
  DISCLAIMER: This represents my personal view and in no way reflects that of
  my company.
 
  Warning: This is a long harangue that contains no useful information on R.
  May be wise to delete without reading.
  --
 
  Sorry folks, I still don't understand your comments. As Cody's original 
  post
  pointed out, there are a host of factors other than ease of programmability
  or even quality of results that weigh against any change. To reiterate, all
  companies have a huge infrastructure of **validated SAS code** that would
  have to be replaced. This, in itself, would take years and cost tens of
  millions of dollars at least. Also to reiterate, it's not only
  statistical/reporting functionality but even more the integration into the
  existing clinical database systems that would have to be rewritten **and
  validated**. All this would have to be done while continuing full steam on
  existing submissions. It is therefore not surprising to me that no pharma
  company in its right mind even contemplates undertaking such an effort.
 
  To put these things into perspective. Let's say Pfizer has 200 SAS
  programmers (it's probably more, as they are a large Pharma, but I dunno).
  If each programmer costs, conservatively, $200K U.S. per year fully loaded,
  that's $40 million U.S. for SAS Programmers. And this is probably a severe
  underestimate. So the $14M quoted below is chicken feed -- it doesn't even
  make the radar.
 
  To add further perspective, a single (large) pivotal clinical trial can
  easily cost $250M . A delay in approval due to fooling around trying to
  shift to a whole new software system could easily cause hundreds of million
  to billions if it means a competitor gets to the marketplace first. So, to
  repeat, SAS costs are chicken feed.
 
  Yes, I suppose that the present system institutionalizes mediocrity. How
  could it be otherwise in any such large scale enterprise? Continuity,
  reliability, and robustness are all orders of magnitude more important for
  both the FDA and Pharma to get safe and efficacious drugs to the public.
  Constantly hopping onto the latest and greatest craze (yes, I exaggerate
  here!) would be dangerous, unacceptable, and would probably delay drug
  approvals. 

Re: [R] R on 64-Bit…

2010-02-21 Thread Sharpie


Axel Urbiz wrote:
 
 Dear R users,
 
 I know this issue came up in the list several times.  I’m currently
 running
 R on 32-bit on Windows and due to memory limitation problems would like to
 move to a 64-bit environment.  I’m exploring my options and would
 appreciate
 your expertise:
 
 1)  Windows 64-bit: Prof. Brian Ripley recently posted the
 experimental
 built of R for win 64-bit. I’ll appreciate any feedback on anyone who has
 been testing this. He also mentioned that for now, “...this as only being
 of
 interest for those who only use a few relatively simple packages”.  But if
 one uses packages beyond those “relatively simple”, how possible is today
 to
 have those installed?
 

As far as I know, the problems with running 64-bit R on windows are due to
the lack of a well-developed, 64 bit minGW compiler.  Therefore I would
imagine that the packages that may have trouble installing under the
experimental 64 bit build are those that include either C or Fortran source
code that needs to be compiled.  You may also find that you need to compile
packages yourself-- prebuilt 64 bit versions for windows may not be
available on CRAN.



Axel Urbiz wrote:
 
 2)  MacOS or Unix.  Sorry for my ignorance on this…but if I use any of
 these environments on 64-bit and  installed R on any of those, this is all
 I
 need to have R working on 64-bit. How about installing specialized
 packages?
 Are the packages on the CRAN repositories “ready tho use” on these systems
 or do I have to do any additional work to get them going?
 
 Thanks in advance for your help!
 
 Axel.
 

MacOS/Unix/Linux shouldn't have a problem with running 64 bit R and building
64 bit R packages-- this is because the GNU project provides a very mature
set of 64 bit compilers that these systems can use.  I personally use 64 bit
R on Mac OS and have had no problems developing and installing packages for
the 64 bit system.

-Charlie
-- 
View this message in context: 
http://n4.nabble.com/R-on-64-Bit-tp1563895p1564056.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] retrieve from function

2010-02-21 Thread Petr PIKAL
Hi


r-help-boun...@r-project.org napsal dne 19.02.2010 19:06:52:

 
 Thank you for response. The problem is that using return(y1) in my 
function
 formula always returns y1, but what I want is to return it only when I 
wish,
 like p.value in
 t.test(rnorm(100),rnorm(100))$p.value

Put results in your function to list.

x=function(nbr){list(y-rnorm(nbr), y1 - mean(y);plot(y))}

x(whatever)$y
x(whatever)$y1

and when you do not want results immediately printed consult

?invisible

Regards
Petr



 
 robert
 -- 
 View this message in context: 
http://n4.nabble.com/retrieve-from-function-
 tp1561972p1562012.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] R on 64-Bit…

2010-02-21 Thread Prof Brian Ripley
Let's not speculate when doing basic research is so easy.  I guess the 
thread about 64-bit Windows referred to was 
https://stat.ethz.ch/pipermail/r-devel/2010-January/056301.html

https://stat.ethz.ch/pipermail/r-devel/2010-January/056411.html
(note the update).

The CRAN daily check 
http://cran.r-project.org/web/checks/check_summary.html shows that 
106/2170 packages are currently giving errors, and 20 or so of those 
are available from CRANextras.  See 
http://cran.r-project.org/bin/windows64/contrib/2.11/@ReadMe for more 
details.


Note that the x64 Windows builds are for the unreleased R pre-2.11.0: 
they will become more visible on CRAN once that is released.


For MacOS X: the CRAN build of 2.10.x for 10.5/6 includes the 64-bit 
x86_64 architecture, and many packages are available (about the same 
proportion as on x64 Windows).


For Unix-alikes (including Linux), 64-bit R has been available for 
about a decade and some of us have been running 64-bit R exclusively 
for years.  Again, the CRAN Daily Check page shows a high rate of 
success on x86_64 Linux.


Installation of packages without compiled code is done entirely in R 
and so is the same on any platform.  The difficulties in installing 
packages arise either with compiled code or with dependencies: for 
example as we do not yet have rgdal working on x64 Windows, none of 
the dozen or so packages which depend on it are available.



On Sun, 21 Feb 2010, Sharpie wrote:




Axel Urbiz wrote:


Dear R users,

I know this issue came up in the list several times.  I?m currently
running
R on 32-bit on Windows and due to memory limitation problems would like to
move to a 64-bit environment.  I?m exploring my options and would
appreciate
your expertise:

1)  Windows 64-bit: Prof. Brian Ripley recently posted the
experimental
built of R for win 64-bit. I?ll appreciate any feedback on anyone who has
been testing this. He also mentioned that for now, ?...this as only being
of
interest for those who only use a few relatively simple packages?.  But if
one uses packages beyond those ?relatively simple?, how possible is today
to
have those installed?



As far as I know, the problems with running 64-bit R on windows are due to
the lack of a well-developed, 64 bit minGW compiler.  Therefore I would
imagine that the packages that may have trouble installing under the
experimental 64 bit build are those that include either C or Fortran source
code that needs to be compiled.  You may also find that you need to compile
packages yourself-- prebuilt 64 bit versions for windows may not be
available on CRAN.



Axel Urbiz wrote:


2)  MacOS or Unix.  Sorry for my ignorance on this?but if I use any of
these environments on 64-bit and  installed R on any of those, this is all
I
need to have R working on 64-bit. How about installing specialized
packages?
Are the packages on the CRAN repositories ?ready tho use? on these systems
or do I have to do any additional work to get them going?

Thanks in advance for your help!

Axel.



MacOS/Unix/Linux shouldn't have a problem with running 64 bit R and building
64 bit R packages-- this is because the GNU project provides a very mature
set of 64 bit compilers that these systems can use.  I personally use 64 bit
R on Mac OS and have had no problems developing and installing packages for
the 64 bit system.

-Charlie
--
View this message in context: 
http://n4.nabble.com/R-on-64-Bit-tp1563895p1564056.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.



--
Brian D. Ripley,  rip...@stats.ox.ac.uk
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] plot is not keeping the order of variable

2010-02-21 Thread Dieter Menne


Peter Dalgaard wrote:
 
 d - data.frame(f=c(rare, medium,well-done))
 #To get the cast in order of appearance, this can be used:
 
   d$f - factor(d$f, levels=unique(d$f))
   d$f
 [1] rare  mediumwell-done
 Levels: rare medium well-done
 
 

.. which caused some head-scratching from me, because it made me believe
there was some hidden Kopenhagen-factor conserving the original order. 

To protect the innocent: for the more general case, unique() does not help.

Dieter

levs = c(rare, medium,well-done) 
set.seed(4711)
d - data.frame(f=sample(levs,10,TRUE)) 
unique(d$f)
d$f =  factor(d$f, levels=unique(d$f)) 
levels(d$f)
d$f =  factor(d$f, levels = levs) 
levels(d$f)

-- 
View this message in context: 
http://n4.nabble.com/plot-is-not-keeping-the-order-of-variable-tp1563553p1564087.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] how to generate graph from dataframe?

2010-02-21 Thread chinna

I connected to database  and i am accessing the tables  but i dont know how
to generate graphs from the database tables.

can anyone please help me
 i am new to R project
-- 
View this message in context: 
http://n4.nabble.com/how-to-generate-graph-from-dataframe-tp1564099p1564099.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] new to R Project

2010-02-21 Thread chinna

hi everyone,
i am new to R project can anyone please help me by providing documents

my goal is using R i have to connect to the database and i have to generate
reports.

Thanks in advance
chinna.
-- 
View this message in context: 
http://n4.nabble.com/new-to-R-Project-tp1564104p1564104.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] plot is not keeping the order of variable

2010-02-21 Thread Or Duek
Thank you very much,
You solved my problem.

On Mon, Feb 22, 2010 at 12:42 AM, Peter Dalgaard
p.dalga...@biostat.ku.dkwrote:

 Or Duek wrote:

 Ok,
 It seems that the problem lays in the order (as Ista mentioned),
 But, when I ask R to order it he chooses to order it by size and not by
 the
 specific order I mentioned when I built the vector.
 Is it possible to tell him to keep the order as mentioned?
 Thank you.


 You're still not completely clear about how you built the factor, but I
 venture a guess:

 Notice that factors tend to get their levels in alphabetical order, unless
 special tricks are used.

  d - data.frame(f=c(rare, medium,well-done))
  d$f
 [1] rare  mediumwell-done
 Levels: medium rare well-done

 To get the cast in order of appearance, this can be used:

  d$f - factor(d$f, levels=unique(d$f))
  d$f
 [1] rare  mediumwell-done
 Levels: rare medium well-done





 On Sun, Feb 21, 2010 at 6:16 PM, Ista Zahn istaz...@gmail.com wrote:

  Hi Or,
 I can't know for sure what your problem is without an example, but the
 first thing I would do is check to make sure that your labels are
 stored as an ordered factor (and that the order is correct). See
 ?factor for details.

 Best,
 Ista

 On Sun, Feb 21, 2010 at 10:57 AM, Or Duek ord...@gmail.com wrote:

 Hi,
 I created a simple data frame with one factor and one numerical
 variable.
 The factor was actually a vector of names of techniques to trimm
 reaction
 time data.
 I want to create a plot that shows the value of F test for every
 trimming
 method.
 So the data frame has its trim factor (who has those labels
 mean,2500,2000,1500,1000,log,inverse,1SD,2SD)
 and the numerical variable of the data frame has the F values for each

 one

 of those trimming method.
 When I ask R to plot it, it doesn't keep the order of the trimm verctor
 correctly and the plot confuses the order so the most left one will be

 1500

 and then 1SD etc.
 The values are correct but it is important for me to keep it in the same
 order I built it.
 How can I do it?
 Thank you very much,
 Or D.

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



 --
 Ista Zahn
 Graduate student
 University of Rochester
 Department of Clinical and Social Psychology
 http://yourpsyche.org


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



 --
   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
 ~~ - (p.dalga...@biostat.ku.dk)  FAX: (+45) 35327907


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