Hi, I'd like to unsubscribe from the list.
Thanks
 
Neyra  
 




________________________________
De: "r-help-request@r-project.org" <r-help-request@r-project.org>
Para: r-help@r-project.org
Enviado: sįb, octubre 30, 2010 5:30:07 AM
Asunto: R-help Digest, Vol 92, Issue 31

Send R-help mailing list submissions to
    r-help@r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://stat.ethz.ch/mailman/listinfo/r-help
or, via email, send a message with subject or body 'help' to
    r-help-request@r-project.org

You can reach the person managing the list at
    r-help-owner@r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-help digest..."


Today's Topics:

   1. Re: what?s wrong with this code? (Berwin A Turlach)
   2. Re: R and Matlab (Claudia Beleites)
   3. Re: what?s wrong with this code? (Berwin A Turlach)
   4. strftime vs strptime ?? (skan)
   5. multiple weights in MANOVA (Michael Hopkins)
   6. Checking existance of a directory (Ron Michael)
   7. true time series lags behind fitted values in arima model
      (Benedikt Gehr)
   8. Re: quiry on paste() function (Jan van der Laan)
   9. Re: Checking existance of a directory (Andris Jankevics)
  10. Re: Checking existance of a directory (Henrique Dallazuanna)
  11. Re: Checking existance of a directory (Rainer M Krug)
  12. Re: quiry on paste() function (Gabor Grothendieck)
  13. Re: check RAM usage (jim holtman)
  14. make many barplot into one plot (Sibylle St?ckli)
  15. Re: relsurv package (Laurence Lauvier)
  16. Simulating data, loop (Sarah)
  17. help pages do not open (Dimitri Liakhovitski)
  18. Printing data.frame data: alternatives to print? (Matthew Pettis)
  19. Re: Simulating data, loop (Ivan Calandra)
  20. Re: Printing data.frame data: alternatives to print?
      (Jan van der Laan)
  21. Re: quiry on paste() function (Jan van der Laan)
  22. Reading multiple .csv-files and assigning them to variable
      names (Sarah Moens)
  23. ksvm problem (Neeti)
  24. Re: Reading multiple .csv-files and assigning them to
      variable    names (jim holtman)
  25. Re: Clustering (David Winsemius)
  26. Re: strftime vs strptime ?? (Prof Brian Ripley)
  27. Re: Checking existance of a directory (Prof Brian Ripley)
  28. Re: Printing data.frame data: alternatives to print? (jim holtman)
  29. Re: strftime vs strptime ?? (David Winsemius)
  30. Re: Printing data.frame data: alternatives to print?
      (Matthew Pettis)
  31. Re: Reading multiple .csv-files and assigning them to
      variable    names (Gabor Grothendieck)
  32. Contract programming position at Merck (NJ, USA) (Liaw, Andy)
  33. doubt in climate variability analysis in R! (govindas@msu.edu)
  34. I got lot in the permutation (cbbaniya@gmail.com)
  35. Re: Clustering (dpender)
  36. Re: Please help me about Monte Carlo Permutation (Chitra)
  37. Re: Cox Proportional Models and Haplotypes (Brad McNeney)
  38. Re: draw path diagram using dot (eshi)
  39. Re: Clustering (David Winsemius)
  40. Tukey post hoc comparison (glht?) after 3factorial mixed
      model    (lmer) (Anna Radtke)
  41. Re: Clustering (David Winsemius)
  42. Repeated Measures MANOVA (Christopher Kurby)
  43. Re: scatterplot3d; scaling point symbols to depth of graph
      (Uwe Ligges)
  44. Re: Repeated Measures MANOVA (John Fox)
  45. Re: doubt in climate variability analysis in R! (Daniel Nordlund)
  46. Plotting 2 Lines on the Same Chart (Jason Kwok)
  47. Re: Dickey Fuller Test (Cuckovic Paik)
  48. Re: Plotting 2 Lines on the Same Chart (Gabor Grothendieck)
  49. Re: Plotting 2 Lines on the Same Chart (Jason Kwok)
  50. Re: Plotting 2 Lines on the Same Chart (Gabor Grothendieck)
  51. Re: doubt in climate variability analysis in R! - code
      included! (govindas@msu.edu)
  52. Tukey post hoc comparison (glht?) after 3factorial mixed
      model    (lmer) (Anna Radtke)
  53. Memory use in R (DM2010)
  54. Re: help pages do not open (Dimitri Liakhovitski)
  55. One-class SVM (ANJAN PURKAYASTHA)
  56. Re: help pages do not open (Dimitri Liakhovitski)
  57. Re: help pages do not open (Joshua Wiley)
  58. R version 2-12.0 - running as 32 or as 64 bit?
      (Dimitri Liakhovitski)
  59. Re: R version 2-12.0 - running as 32 or as 64 bit?
      (Berwin A Turlach)
  60. Re: One-class SVM (Steve Lianoglou)
  61.  NetWorkSpace from REvolution;    Distributed Computing setup
      questions (Timothy Murphy)
  62. Re: R version 2-12.0 - running as 32 or as 64 bit?
      (Duncan Murdoch)
  63. Re: Memory use in R (Duncan Murdoch)
  64. Re: SARIMA simulation using time series history (Knut Erik Vedahl)
  65. how to debug (mtrace) a function defined inside a function?
      (Andre Zege)
  66. Re: R version 2-12.0 - running as 32 or as 64 bit?
      (Dimitri Liakhovitski)
  67. Re: how to debug (mtrace) a function defined inside a
      function? (Duncan Murdoch)
  68. plot pdf (mmstat@comcast.net)
  69. How to scan df from a specific word? (M.Ribeiro)
  70. Re: How to scan df from a specific word? (M.Ribeiro)
  71. Re: How to scan df from a specific word? (M.Ribeiro)
  72. vertical list sum (Gregory Ryslik)
  73. Differenciate numbers from reference for rows (M.Ribeiro)
  74. Re: vertical list sum (Jorge Ivan Velez)
  75. Re: How to scan df from a specific word? (Phil Spector)
  76. Re: How to scan df from a specific word? (Peter Langfelder)
  77. Re: vertical list sum (Duncan Mackay)
  78. Re: vertical list sum (Duncan Mackay)
  79. Re: How to scan df from a specific word? (Gabor Grothendieck)
  80. date calculation (Shi, Tao)
  81. Re: date calculation (Phil Spector)
  82. Re: vertical list sum (Gregory Ryslik)
  83. Re: R and Matlab (Henrik Bengtsson)
  84. Re: vertical list sum (Jorge Ivan Velez)
  85. Re: plot pdf (Joshua Wiley)
  86. grouping question (will phillips)
  87. Re: grouping question (jim holtman)
  88. Re: grouping question (Jorge Ivan Velez)
  89. Re: grouping question (will phillips)
  90. Re: grouping question (will phillips)
  91. Re: date calculation (Ben Bolker)
  92. Re: Differenciate numbers from reference for rows (Dennis Murphy)
  93. Trouble installing gsl wrapper (Gang Chen)
  94. Re: Chrooted R + Rserve (Jeroen Ooms)
  95. Re: date calculation (Shi, Tao)
  96. Re: date calculation (Shi, Tao)
  97. Re: date calculation (Joshua Wiley)
  98. Re: Trouble installing gsl wrapper (Prof Brian Ripley)
  99. Re: Trouble installing gsl wrapper (Gang Chen)
  100. how to find a function for plotting polygon surfaces:
      polgon3d(xc, yc, obs) (Wolfgang Polasek)
  101. one function with 2 returnh points (Alaios)
  102. Re: one function with 2 returnh points (Liviu Andronic)


----------------------------------------------------------------------

Message: 1
Date: Fri, 29 Oct 2010 18:25:09 +0800
From: Berwin A Turlach <berwin@maths.uwa.edu.au>
To: Jos? Manuel Gavil?n Ruiz <gavi@us.es>
Cc: r-help@r-project.org
Subject: Re: [R] what?s wrong with this code?
Message-ID: <20101029182509.117e09e5@goodenia>
Content-Type: text/plain; charset=windows-1252

G'day Jose,

On Fri, 29 Oct 2010 11:25:05 +0200
Jos? Manuel Gavil?n Ruiz <gavi@us.es> wrote:

> Hello,  I  want  to  maximize  a  likelihood  function expressed as an
> integral  that  can not be symbolically evaluated. I expose my problem
> in a reduced form.
> 
> g<- function(x){
> integrand<-function(y) {exp(-x^2)*y}
> g<-integrate(integrand,0,1)
> }                        
> h<-function(x) log((g(x)))
> 
> g  is an object of the class function, but g(2) is a integrate object,
> I can print(g(2)) an get a result, but
> if I try h(2) R says is a nonnumeric argument for a mathematical
> function. 

R> print(g(2))
0.00915782 with absolute error < 1.0e-16

Indeed print(g(2)) gives an output, but it is obviously not just a
numeric number but something formatted, presumably based on the class
of the returned object from g(2) and the values that this object
contains.  (You may want to read up on R's way(s) to object oriented
programming).

So what does g() return?

R> str(g(2))
List of 5
$ value       : num 0.00916
$ abs.error   : num 1.02e-16
$ subdivisions: int 1
$ message     : chr "OK"
$ call        : language integrate(f = integrand, lower = 0, upper = 1)
- attr(*, "class")= chr "integrate"

The object is a list with several values, and class "integrate".  

> My goal is to maximize h. what?s wrong?

I guess you want to pass only the component value to h().  

R> g <- function(x){
+ integrand <- function(y) {exp(-x^2)*y}
+ integrate(integrand, 0, 1)$value}
R> g(2)
[1] 0.00915782
R> h(g(2))
[1] -0.693231

HTH,

Cheers,

    Berwin



------------------------------

Message: 2
Date: Fri, 29 Oct 2010 12:31:21 +0200
From: Claudia Beleites <cbeleites@units.it>
To: Henrik Bengtsson <hb@stat.berkeley.edu>, R Help
    <r-help@r-project.org>
Subject: Re: [R] R and Matlab
Message-ID: <4CCAA279.4070406@units.it>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dear Henrik,

sorry for bothering you with a report hastily pasted together and not 
particularly nice for you as I used my toy data flu from a non-standard package. 

I should have better used e.g. the iris.

I'm aware that writeMat doesn't deal with S4 objects. In fact, if I'd overlook 
the error message, there's the 2nd chance to see that the file size is 0B.
In fact the attempt to save flu directly was a classical "autopilot" error,
that's why I tried to save the x afterwards.

So the problem here was the unnamed storing of x.

> I intentionally do not try to "infer" the name "x" from
> writeMat("flu.mat", x), basically because I think using substitute()
> should be avoided as far as possible, but also because it is unclear
> what the name should be in cases such as writeMat("flu.mat", 1:10).
I was just going to suggest a patch that assigns the names of type Vnumber to 
the unnamed objects - but when I wanted to get the source I realized your 
version with the warning is already out.

I think, however, you may forgot a nchar?: any (nchar (names) == 0)

So here's my suggestion for l. 775-777 of writeMat.R:

   if (is.null(names) || any (nchar (names) == 0L)) {
     names [nchar (names) == 0L] <- paste ("V", which (nchar (names) == 0L), sep 

= "")
     names (args) <- names
     warning("All objects written have to be named, e.g. use writeMat(..., x=a, 
y=y) and not writeMat(..., x=a, y): ", deparse(sys.call()), "\nDummy names have 
been assigned.");
   }


After all, e.g. data.frame () will also rather create dummy names for unnamed 
columns. And, I think, a warning should make the user aware that he's doing
something that _may_ not work out as intendet. But here I think it is _most
likely_ not working as intended.


> MISCELLANEOUS:
> Note that writeMat() cannot write compressed MAT files.  It is
> documented in help("readMat"), and will be so in help("writeMat") in
> the next release.  Package Rcompression, loaded or not, has no effect
> on writeMat().  It is only readMat() that can read them, if
> Rcompression is installed.  You do not have to load it
> explicitly/yourself - if readMat() detects a compress MAT file, it
> will automatically try to load it;
OK, good to know.

Thanks a lot for your explanation in spite of my bad report.

Claudia


-- 
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Universit? degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste

phone: +39 0 40 5 58-37 68
email: cbeleites@units.it



------------------------------

Message: 3
Date: Fri, 29 Oct 2010 18:39:58 +0800
From: Berwin A Turlach <berwin@maths.uwa.edu.au>
To: Jos? Manuel Gavil?n Ruiz <gavi@us.es>
Cc: r-help@r-project.org
Subject: Re: [R] what?s wrong with this code?
Message-ID: <20101029183958.3e5b2b89@goodenia>
Content-Type: text/plain; charset=windows-1252

G'day Jose,

On Fri, 29 Oct 2010 11:25:05 +0200
Jos? Manuel Gavil?n Ruiz <gavi@us.es> wrote:

> Hello,  I  want  to  maximize  a  likelihood  function expressed as an
> integral  that  can not be symbolically evaluated. I expose my problem
> in a reduced form.
> 
> g<- function(x){
> integrand<-function(y) {exp(-x^2)*y}
> g<-integrate(integrand,0,1)
> }                        
> h<-function(x) log((g(x)))
> 
> g  is an object of the class function, but g(2) is a integrate object,
> I can print(g(2)) an get a result, but
> if I try h(2) R says is a nonnumeric argument for a mathematical
> function. My goal is to maximize h.

Which can be done without R quite trivially.

The result of g(x) is exp(-x^2)/2.
So h(x) is -x^2-log(2), which is maximised at x=0.

Cheers,

    Berwin



------------------------------

Message: 4
Date: Fri, 29 Oct 2010 03:55:58 -0700 (PDT)
From: skan <juanpide@gmail.com>
To: r-help@r-project.org
Subject: [R] strftime vs strptime ??
Message-ID: <1288349758355-3018865.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hello

Could anyone explain me the difference between strftime vs strptime, please
?

I've read the help but it's a little bit cionfusing for me.


cheers
-- 
View this message in context: 
http://r.789695.n4.nabble.com/strftime-vs-strptime-tp3018865p3018865.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 5
Date: Fri, 29 Oct 2010 12:00:59 +0100
From: Michael Hopkins <hopkins@upstreamsystems.com>
To: r-help@r-project.org
Subject: [R] multiple weights in MANOVA
Message-ID: <44E5CA63-ADDB-4958-87BC-8BFFE625052F@upstreamsystems.com>
Content-Type: text/plain



Hi all

I have 7 responses that I want to fit with MANOVA.  I have accumulated the
responses into a matrix Y and each response has a weight vector associated with 
it, so I have accumulated the weights into a matrix WT of the same dimensions as 
Y.  When I try

    fit <- manova( Y ~ X1 + X2 + X3, weights = WT )

I get the following message:

Error in lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok,  : 
  incompatible dimensions

Does this mean I have used manova() wrongly or does it not handle a matrix of 
weights as required here?

Thanks in advance and please CC replies to me


Michael Hopkins
Algorithm and Statistical Modelling Expert

Upstream
23 Old Bond Street
London
W1S 4PZ


    [[alternative HTML version deleted]]



------------------------------

Message: 6
Date: Fri, 29 Oct 2010 04:08:47 -0700 (PDT)
From: Ron Michael <ron_michael70@yahoo.com>
To: r-help@stat.math.ethz.ch
Subject: [R] Checking existance of a directory
Message-ID: <502340.16493.qm@web63804.mail.re1.yahoo.com>
Content-Type: text/plain

Hi all, I am wondering is there any way to check whether some Directory exists 
or not, given the parent path of that directory? After searching for a while I 
found that there is a function dir.create() to create some directory. However I 
need to know whether such directory already exists or not, otherwise I will
create that.

Thanks,


    [[alternative HTML version deleted]]



------------------------------

Message: 7
Date: Fri, 29 Oct 2010 13:12:31 +0200
From: Benedikt Gehr <benedikt.gehr@ieu.uzh.ch>
To: r-help@r-project.org
Subject: [R] true time series lags behind fitted values in arima model
Message-ID: <4CCAAC1F.5000507@ieu.uzh.ch>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi

I am fitting an arima model to some time series X. When I was comparing 
the fitted values of the model to the true time series I realized that 
the true time series lags one time step behind the fitted values of the 
arima model. And this is the case for any model. When I did a simple 
linear regression using lm to check, I also find the same results, that 
the true series lags behind the fitted values. I don't understand this, 
what am I doing wrong? Below I copied some of the code to demonstrate 
the issue.

## Analysis using arima()

X<-c(6.841067, 6.978443, 6.984755, 7.007225, 7.161198, 7.169790, 
7.251534,  # the true time series
    7.336429, 7.356600, 7.413271, 7.404165, 7.480869, 7.498686, 7.429809,
    7.302747,  7.168251, 7.124798, 7.094881, 7.119132, 7.049250, 6.961049,
    7.013442,  6.915243, 6.758036, 6.665078, 6.730523, 6.702005, 6.905522,
    7.005191, 7.308986)

model100<-arima(X,order=c(1,0,0),include.mean=T,method="ML")  # the 
arima model
resid100<-residuals(model100)
Xfit100<-X-resid100 # the fitted values
ts.plot(cbind(Xfit100,X),col=c(2,4),main="ARIMA(1,0,0)")  # plot the 
true ts vs the fitted values
legend(20,7.5,c("true values","fitted 
values"),pch=c(16,16),col=c("blue","red"))

## Same analysis using lm()

Y<-X[2:30]  # create X(t)-> a time series without the first value
X1<-X[1:29] # create the X(t-1)

time<-seq(1978,2006)
model1<-lm(Y~X1)
summary(model1)
arima.intercept<-model1[[1]][[1]]/(1-model1[[1]][[2]]);arima.intercept
model100[[1]][[2]]
plot(Y~time,type="b")  # plot the two series
points(fitted(model1)~time,type="b",col="green")
legend(1995,7.5,c("true values","fitted 
values"),pch=c(16,16),col=c("black","green"))


Thank you very much for the help

best wishes

Benedikt



------------------------------

Message: 8
Date: Fri, 29 Oct 2010 13:30:11 +0200
From: Jan van der Laan <rhelp@eoos.dds.nl>
To: r-help@r-project.org
Subject: Re: [R] quiry on paste() function
Message-ID: <4CCAB043.7010402@eoos.dds.nl>
Content-Type: text/plain

Perhaps the following construct does what you need:

  paste(c("a", "b", "c"), c(",", ":", ""), sep="",collapse="")

Regards,
Jan


On 29-10-2010 10:49, Ron Michael wrote:
> Hi all, I want to club different objects (character type) to a single one and 
>using paste() function that can be done happily. However the problem with paste 
>function is the separator field is unique for all underlying objects. If I put 
>separator as "-" then this will come in between all underlying objects which are 
>to be clubbed.
>  
> Therefore I am wondering whether there is any mechanism to put different
>separators for different places. Trivially this can be done by applying paste() 
>function repeatedly. However I feel there must be some single mechanism for 
>doing that.
>  
> Here is one example, where I apply paste() function twice to incorporate 2 
>different separators:
>> paste(paste("a", "b", sep=","), "c", sep=":")
> [1] "a,b:c"
>
> Can the same thing be done using paste() function once? something like:
> paste("a", "b", "c", sep=c(",", ":")) # this put 1st separator everywhere which 
>is not intended
>  
> Thanks,
>
>
>     [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

    [[alternative HTML version deleted]]



------------------------------

Message: 9
Date: Fri, 29 Oct 2010 12:33:55 +0100
From: Andris Jankevics <andza@osi.lv>

Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Checking existance of a directory
Message-ID:
    <AANLkTimeVPhXaYENDRyig5=KHvPm3gBXVQmiYodn8X_M@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi, something like this perhaps,

if("myfolder"%in%dir()==FALSE) dir.create("myfolder")

Command dir.create() is not overwriting an existing folder.

Best regards,
Andris


te:
> Hi all, I am wondering is there any way to check whether some Directory exists 
>or not, given the parent path of that directory? After searching for a while I 
>found that there is a function dir.create() to create some directory. However I 
>need to know whether such directory already exists or not, otherwise I will 
>create that.
>
> Thanks,
>
>
> ? ? ? ?[[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.
>
>



------------------------------

Message: 10
Date: Fri, 29 Oct 2010 09:41:39 -0200
From: Henrique Dallazuanna <wwwhsd@gmail.com>

Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Checking existance of a directory
Message-ID:
    <AANLkTik8kbwmQr5_uYyMjKBYD6wXs-aUO-aT2sRPP3+V@mail.gmail.com>
Content-Type: text/plain

Try this:

if(!file.info('myfolder')$isdir) dir.create('myfolder')




> Hi all, I am wondering is there any way to check whether some Directory
> exists or not, given the parent path of that directory? After searching for
> a while I found that there is a function dir.create() to create some
> directory. However I need to know whether such directory already exists or
> not, otherwise I will create that.
>
> Thanks,
>
>
>        [[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.
>
>


-- 
Henrique Dallazuanna
Curitiba-Paranį-Brasil
25° 25' 40" S 49° 16' 22" O

    [[alternative HTML version deleted]]



------------------------------

Message: 11
Date: Fri, 29 Oct 2010 13:51:57 +0200
From: Rainer M Krug <r.m.krug@gmail.com>

Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Checking existance of a directory
Message-ID: <4CCAB55D.3090800@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 29/10/10 13:08, Ron Michael wrote:
> Hi all, I am wondering is there any way to check whether some Directory exists 
>or not, given the parent path of that directory? After searching for a while I 
>found that there is a function dir.create() to create some directory. However I 
>need to know whether such directory already exists or not, otherwise I will 
>create that.

Just use

dir.create(showWarnings=FALSE)

This will create the directory if it does not exist, and do nothing if
it does. If showWarnings=TRUE, it will give you a warning that the
directory exists.

Cheers,

Rainer

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


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:        +33 - (0)9 53 10 27 44
Cell:       +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:      Rainer@krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkzKtV0ACgkQoYgNqgF2egpRSACgiB498c+M0ICsoJMZxS051lkw
k4UAn0XAI52H1LtRZAJSUQcB6haK8xWO
=66jA
-----END PGP SIGNATURE-----



------------------------------

Message: 12
Date: Fri, 29 Oct 2010 08:06:44 -0400
From: Gabor Grothendieck <ggrothendieck@gmail.com>

Cc: r-help@r-project.org
Subject: Re: [R] quiry on paste() function
Message-ID:
    <AANLkTimbAi37S=cLQWVkfhjGve4Hk4PCwrE_a0YpyTSh@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1


e:
> Hi all, I want to club different objects (character type) to a single one and 
>using paste() function that can be done happily. However the problem with paste 
>function is the separator field is unique for all underlying objects. If I put 
>separator as "-" then this will come in between all underlying objects which are 
>to be clubbed.
>
> Therefore I am wondering whether there is any mechanism to put different
>separators for different places. Trivially this can be done by applying paste() 
>function repeatedly. However I feel there must be some single mechanism for 
>doing that.
>
> Here is one example, where I apply paste() function twice to incorporate 2 
>different separators:
>> paste(paste("a", "b", sep=","), "c", sep=":")
> [1] "a,b:c"
>
> Can the same thing be done using paste() function once? something like:
> paste("a", "b", "c", sep=c(",", ":")) # this put 1st separator everywhere which 
>is not intended
>

Try sprintf instead:

   sprintf("%s,%s:%s", "a", "b", "c")


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



------------------------------

Message: 13
Date: Fri, 29 Oct 2010 08:32:31 -0400
From: jim holtman <jholtman@gmail.com>
To: Joel <joda2457@student.uu.se>
Cc: r-help@r-project.org
Subject: Re: [R] check RAM usage
Message-ID:
    <AANLkTim90L+FwX22GMf6q2J8jHrb6UA6RTtzgd+tR3a8@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

?memory.size

use before/after a sequence of commands to get an idea of the memory usage.

On Fri, Oct 29, 2010 at 5:21 AM, Joel <joda2457@student.uu.se> wrote:
>
> Hi
>
> Is there any way to check an certain command or procedure's RAM usage?
>
> Im after something similar to system.time(bla) that gives me the time the
> command took to preform but for RAM usage.
>
> Hope you understand what i mean.
>
> Best regards
> Joel
> --
> View this message in context: 
>http://r.789695.n4.nabble.com/check-RAM-usage-tp3018753p3018753.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.
>



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

What is the problem that you are trying to solve?



------------------------------

Message: 14
Date: Fri, 29 Oct 2010 14:33:40 +0200
From: "Sibylle St?ckli" <sibylle.stoeckli@gmx.ch>
To: r-help@r-project.org
Subject: [R] make many barplot into one plot
Message-ID: <20101029123340.301620@gmx.net>
Content-Type: text/plain; charset="utf-8"

Dear R users


I would like to group my barplot graph (see example on the R help link). The 
proposed R code, adding individual bars to the plot, looks really overwhelming. 
My specific dataset just consists of five groups and three different levels
within each groups (the individual bars). The .txt file is read as matrix 
(horizontal: group, vertical: levels).

The R trellis barchart (function group="") is an easy function, but 
unfortunately the upper plot part look much different from other graphs. I would 
therefore prefer barplot to stansdardize my plots within the manuscript.

It would be very  helpful for me to know if anyone else has worked on the 
barplot group function.

Thanks
Sibylle


http://onertipaday.blogspot.com/2007/05/make-many-barplot-into-one-plot.html

R code from the link
## I have 4 tables like this:satu <- array(c(5,15,20,68,29,54,84,119), 
dim=c(2,4), dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", 
"Blond")))dua <- array(c(50,105,30,8,29,25,84,9), dim=c(2,4), 
dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", 
"Blond")))tiga <- array(c(9,16,26,68,12,4,84,12), dim=c(2,4), 
dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", 
"Blond")))empat <- array(c(25,13,50,78,19,34,84,101), dim=c(2,4), 
dimnames=list(c("Negative", "Positive"), c("Black", "Brown", "Red", "Blond")))# 
rbind() the tables togetherTAB <- rbind(satu, dua, tiga, empat)# Do the barplot 
and save the bar midpointsmp <- barplot(TAB, beside = TRUE, axisnames = FALSE)# 
Add the individual bar labelsmtext(1, at = mp, text = c("N", "P"),line = 0, cex 
= 0.5)# Get the midpoints of each sequential pair of bars# within each of the 
four groupsat <- t(sapply(seq(1, nrow(TAB), by = 2),function(x) colMeans(mp[c(x, 
[[elided Yahoo spam]]
for each pairmtext(1, at = at, text = rep(c("satu", "dua", "tiga", "empat"), 
4),line = 1, cex = 0.75)# Add the color labels for each groupmtext(1, at = 
colMeans(mp), text = c("Black", "Brown", "Red", "Blond"), line = 2)
-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser



------------------------------

Message: 15
Date: Fri, 29 Oct 2010 05:41:37 -0700 (PDT)
From: Laurence Lauvier <lauvierlv@gmail.com>
To: r-help@r-project.org
Subject: Re: [R] relsurv package
Message-ID: <1288356097298-3019040.post@n4.nabble.com>
Content-Type: text/plain; charset=UTF-8


Hello,
I have a question about relsurv package particularly rsadd function:
Rsadd(Surv(time,cens)~sex+ratetable(age=age*365.24,sex=sex,year=year),data=,=ratetable=,int=5,method=?max.lik?).

In the tutorial, it is indicated that "the age and year must be given in the
date format, i.e. in number of days since 01.01.1960". Nethertheless, in
Pohar?s article,
http://ibmi.mf.uni-lj.si/ibmi/biostat-center/predtiski/CMPB_Pohar_Stare_relsurv.pdf,

there is no indication about that. What is the true way to use this
function.
Thanks for your help,

Laurence

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Re-relsurv-package-tp867129p3019040.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 16
Date: Fri, 29 Oct 2010 05:46:40 -0700 (PDT)
From: Sarah <s1327720@student.rug.nl>
To: r-help@r-project.org
Subject: [R] Simulating data, loop
Message-ID: <1288356400040-3019044.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hello,

I would like to run a script in which a loop is included. Since I'm new to
R, I cannot manage the following problem. I really hope someone could help
me out.

Data in the variable Y should be removed from the simulated data set with
probability 0.50 if the variable X has a value below zero, and with
probability 0.10 if X has a value above zero (see script).
However, the total number of removed values from Y should be 20 when X < 0,
and 4 when X>0. Whenever the total number of removed values is less than 20
(when X<0), R should remove more values from Y at random (until a total of
20 values has been removed). When R has removed more than 20 values from Y,
R should restore some removed values such that a maximum of 20 values has
been removed from variable Y. 

How can I tell R to put some removed values back in the data set, or to
remove more values until a maximum number of removed values has been
reached?

y <- rnorm(40,1,3)
x <- 1+2*y1+ rnorm(40,0,5)
#Remove values in Y dependent on X:
ynew <- rep(NA,40)
for (j in 1:40)
{
if (x[j] < 0){ynew[j] <- rbinom(1,1,0.50)}
if (x[j] > 0){ynew[j] <- rbinom(1,1,0.10)}
}
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Simulating-data-loop-tp3019044p3019044.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 17
Date: Fri, 29 Oct 2010 09:22:09 -0400
From: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
To: r-help <r-help@r-project.org>
Subject: [R] help pages do not open
Message-ID:
    <AANLkTi=ygbS09Dfhy+Rd_moh9XQENa+UGqL1BnZVNK3K@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I have just installed R 12.
I have Windows 7, 64-bit verison.
I currently have IE as my default browser. The internet connection is very good.

Whenever I try to run a help command (?lm, for example), I get this error:
Error in shell.exec(url) : access to
'http://127.0.0.1:20271/library/stats/html/lm.html' denied

I first got this message when Google Chrome was my default browser.
For some reason, Google Chrome stopped opening web pages. At the same
time R11 stopped showing help pages. Then, I uninstalled Google Chrome
and defined IE as my default browser. Then, I uninstalled R11 and
installed R12 instead. But I am getting the same error.

Any advice?


-- 
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com



------------------------------

Message: 18
Date: Fri, 29 Oct 2010 08:53:55 -0500
From: Matthew Pettis <matthew.pettis@gmail.com>
To: r-help@r-project.org
Subject: [R] Printing data.frame data: alternatives to print?
Message-ID:
    <AANLkTiknCaAnfJAawqeBD6_2nCNMH8D0QrPwZpfeVTmv@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I have a data frame with two factors (well, more, but 2 for simple
consideration), and I want to display the different combinations of
the them that actually occur in the data.  In reality, there are too
many of them to do to do a 'table' call and have one col vertical and
one col horizontal (I don't want any of the factors listed
horizontally).  Before I try to write a function to do this for me, I
was wondering if there were alternate printing styles for data that
already exist, and if someone could direct me to them?  Inclded is a
sample code and 2 possibilities (others welcome for consideration) of
how I want to display some data.

Thanks,
Matt

-----

df <- data.frame(
    f1=rep(c("Maj I", "Maj II", "Maj III"), each=3),
    f2=c("Minor A", "Minor A", "Minor A", "Minor A", "Minor B", "Minor
B", "Minor B", "Minor C", "Minor C")
)

-----

What I want printed is something like:

-------------------
      f1         f2
Maj I       Minor A

Maj II      Minor A
            Minor B

Maj III     Minor B
            Minor C
-------------------

or

-------------------
      f1         f2
Maj I       Minor A

Maj II      Minor A
Maj II      Minor B

Maj III     Minor B
Maj III     Minor C



------------------------------

Message: 19
Date: Fri, 29 Oct 2010 16:06:56 +0200
From: Ivan Calandra <ivan.calandra@uni-hamburg.de>
To: r-help@r-project.org
Subject: Re: [R] Simulating data, loop
Message-ID: <4CCAD500.7050104@uni-hamburg.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Sarah,

There is one thing you need to think about: how do you choose which 
values should not be removed if you have more than 20 and which should 
be if you have less than 20. In my code, I've just done it with 
sample(), which might not be what you need.

Here is what I have:
if (length(which(ynew==0))>20) {
    y <- y[c(which(ynew==1), 
sample(which(ynew==0),20-length(which(ynew==1))))]
} else {
    y <- y[sample(which(ynew==1),20)]
}

Does it make what you're looking for?

HTH,
Ivan


Le 10/29/2010 14:46, Sarah a ?crit :
> Hello,
>
> I would like to run a script in which a loop is included. Since I'm new to
> R, I cannot manage the following problem. I really hope someone could help
> me out.
>
> Data in the variable Y should be removed from the simulated data set with
> probability 0.50 if the variable X has a value below zero, and with
> probability 0.10 if X has a value above zero (see script).
> However, the total number of removed values from Y should be 20 when X<  0,
> and 4 when X>0. Whenever the total number of removed values is less than 20
> (when X<0), R should remove more values from Y at random (until a total of
> 20 values has been removed). When R has removed more than 20 values from Y,
> R should restore some removed values such that a maximum of 20 values has
> been removed from variable Y.
>
> How can I tell R to put some removed values back in the data set, or to
> remove more values until a maximum number of removed values has been
> reached?
>
> y<- rnorm(40,1,3)
> x<- 1+2*y1+ rnorm(40,0,5)
> #Remove values in Y dependent on X:
> ynew<- rep(NA,40)
> for (j in 1:40)
> {
> if (x[j]<  0){ynew[j]<- rbinom(1,1,0.50)}
> if (x[j]>  0){ynew[j]<- rbinom(1,1,0.10)}
> }

-- 
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. S?ugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra@uni-hamburg.de

**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php



------------------------------

Message: 20
Date: Fri, 29 Oct 2010 16:08:52 +0200
From: Jan van der Laan <rhelp@eoos.dds.nl>
To: r-help@r-project.org
Subject: Re: [R] Printing data.frame data: alternatives to print?
Message-ID: <4CCAD574.4030103@eoos.dds.nl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Matt,

Below are three (of the probably many more) possible ways of doing this:

aggregate(1:nrow(df), df, length)

ftable(1 ~ f1 + f2, data=df)

library(plyr)
ddply(df, .(f1,f2), nrow)

Regards,
Jan



On 29-10-2010 15:53, Matthew Pettis wrote:
> Hi,
>
> I have a data frame with two factors (well, more, but 2 for simple
> consideration), and I want to display the different combinations of
> the them that actually occur in the data.  In reality, there are too
> many of them to do to do a 'table' call and have one col vertical and
> one col horizontal (I don't want any of the factors listed
> horizontally).  Before I try to write a function to do this for me, I
> was wondering if there were alternate printing styles for data that
> already exist, and if someone could direct me to them?  Inclded is a
> sample code and 2 possibilities (others welcome for consideration) of
> how I want to display some data.
>
> Thanks,
> Matt
>
> -----
>
> df<- data.frame(
>      f1=rep(c("Maj I", "Maj II", "Maj III"), each=3),
>      f2=c("Minor A", "Minor A", "Minor A", "Minor A", "Minor B", "Minor
> B", "Minor B", "Minor C", "Minor C")
> )
>
> -----
>
> What I want printed is something like:
>
> -------------------
>        f1         f2
> Maj I       Minor A
>
> Maj II      Minor A
>              Minor B
>
> Maj III     Minor B
>              Minor C
> -------------------
>
> or
>
> -------------------
>        f1         f2
> Maj I       Minor A
>
> Maj II      Minor A
> Maj II      Minor B
>
> Maj III     Minor B
> Maj III     Minor C
>
> ______________________________________________
> 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.



------------------------------

Message: 21
Date: Fri, 29 Oct 2010 13:28:28 +0200
From: Jan van der Laan <eoos@dds.nl>
To: r-help@r-project.org
Subject: Re: [R] quiry on paste() function
Message-ID: <4CCAAFDC.5040806@dds.nl>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Perhaps, the following construct does what you need:

paste(c("a", "b", "c"), c(",", ":", ""), sep="",collapse="")

Regards,
Jan



On 29-10-2010 10:49, Ron Michael wrote:
> Hi all, I want to club different objects (character type) to a single one and 
>using paste() function that can be done happily. However the problem with paste 
>function is the separator field is unique for all underlying objects. If I put 
>separator as "-" then this will come in between all underlying objects which are 
>to be clubbed.
>  
> Therefore I am wondering whether there is any mechanism to put different
>separators for different places. Trivially this can be done by applying paste() 
>function repeatedly. However I feel there must be some single mechanism for 
>doing that.
>  
> Here is one example, where I apply paste() function twice to incorporate 2 
>different separators:
>> paste(paste("a", "b", sep=","), "c", sep=":")
> [1] "a,b:c"
>
> Can the same thing be done using paste() function once? something like:
> paste("a", "b", "c", sep=c(",", ":")) # this put 1st separator everywhere which 
>is not intended
>  
> Thanks,
>
>
>     [[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.



------------------------------

Message: 22
Date: Fri, 29 Oct 2010 11:16:36 +0200
From: Sarah Moens <sarah_m@telenet.be>
To: r-help@R-project.org
Subject: [R] Reading multiple .csv-files and assigning them to
    variable names
Message-ID:
    <AANLkTimakg+eFH4bjOfkp6oxK1CdO3Kow+vDc1rAasZc@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

I've been trying to find a solution for the problem of reading
multiple files and storing them in a variable that contains the names
by which I want to call the datasets later on.

For example (5 filenames):

- The filenames are stored in one variable:
filenames = paste(paste('name', '_', 1:5, sep = ''), '.csv', sep = '')

- Subsequently I have a variable just containing the meaningful names
for the dataset
meaningfulnames = c('name1','name2'...,'name5')

- I want to link each of these names to the data that is read

for (i in 1:5)
{
     meaningfulnames[i] = read.csv(filenames[i], header = TRUE, sep = ',')
}


I need to read in quite a lot of datafiles. I have a code doing this
one at a time, but since the number of datafiles I need to read will
increase in the future, I want to make sure I have a more flexible
solution for this.

Thanks a lot for your help. I have tried to look in the help pages and
also came across dbfread, but I can't seem to find something I can use
or understand at this point.


Sarah



------------------------------

Message: 23
Date: Fri, 29 Oct 2010 07:39:09 -0700 (PDT)
From: Neeti <nikkihathi@gmail.com>
To: r-help@r-project.org
Subject: [R] ksvm problem
Message-ID: <1288363149599-3019212.post@n4.nabble.com>
Content-Type: text/plain; charset=UTF-8


Hi to all!!!!!

When I use the example from kernlab::ksvm this works fine.. Give me the
result?

> filter <-
> ksvm(type~.,data=spamtrain,kernel="rbfdot",kpar=list(sigma=0.05),C=5,cross=3)

But as soon as I change the type data as follows

> type_train<-spamtrain[,ncol(spamtrain)]
> filter <-
>ksvm(type_train,data=spamtrain,kernel="rbfdot",kpar=list(sigma=0.05),C=5,cross=3)
>)
Error: evaluation nested too deeply: infinite recursion /
options(expressions=)?

This gives me error. I don?t know why?
I have also tried changing the expression values but it still doesn?t work?

> .Options$expressions
[1] 5000
> options(expressions=10000)
> .Options$expressions
[1] 10000
> filter <-
>ksvm(type_train,data=spamtrain,kernel="rbfdot",kpar=list(sigma=0.05),C=5,cross=3)
>)
Error: evaluation nested too deeply: infinite recursion /
options(expressions=)?

Why am I getting this error? And how to resolve it? 

thank you ..


-- 
View this message in context: 
http://r.789695.n4.nabble.com/ksvm-problem-tp3019212p3019212.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 24
Date: Fri, 29 Oct 2010 10:41:19 -0400
From: jim holtman <jholtman@gmail.com>
To: Sarah Moens <sarah_m@telenet.be>
Cc: r-help@r-project.org
Subject: Re: [R] Reading multiple .csv-files and assigning them to
    variable    names
Message-ID:
    <AANLkTimMSc=NHh1KxJozVPikgZvoO_piecgsL+p9GC_U@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Read them into a list; much easier to handle:

myList <- lapply(filenames, read.csv)


On Fri, Oct 29, 2010 at 5:16 AM, Sarah Moens <sarah_m@telenet.be> wrote:
> Hi all,
>
> I've been trying to find a solution for the problem of reading
> multiple files and storing them in a variable that contains the names
> by which I want to call the datasets later on.
>
> For example (5 filenames):
>
> - The filenames are stored in one variable:
> filenames = paste(paste('name', '_', 1:5, sep = ''), '.csv', sep = '')
>
> - Subsequently I have a variable just containing the meaningful names
> for the dataset
> meaningfulnames = c('name1','name2'...,'name5')
>
> - I want to link each of these names to the data that is read
>
> for (i in 1:5)
> {
> ? ? meaningfulnames[i] = read.csv(filenames[i], header = TRUE, sep = ',')
> }
>
>
> I need to read in quite a lot of datafiles. I have a code doing this
> one at a time, but since the number of datafiles I need to read will
> increase in the future, I want to make sure I have a more flexible
> solution for this.
>
> Thanks a lot for your help. I have tried to look in the help pages and
> also came across dbfread, but I can't seem to find something I can use
> or understand at this point.
>
>
> Sarah
>
> ______________________________________________
> 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?



------------------------------

Message: 25
Date: Fri, 29 Oct 2010 10:42:48 -0400
From: David Winsemius <dwinsemius@comcast.net>
To: dpender <d.pender@civil.gla.ac.uk>
Cc: r-help@r-project.org
Subject: Re: [R] Clustering
Message-ID: <7D6719D6-D03C-4AC9-9539-8BAF5A847B82@comcast.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Oct 29, 2010, at 5:14 AM, dpender wrote:

>
>
> That's helpful but the reason I'm using clusters in evd is that I  
> need to
> specify a time condition to ensure independence.

I believe this is the first we heard about any particular function or  
package.

>
> I therefore have an output

We would need to know the code that produced that output and either  
the data to which that code was applied or the structure of the  
output. (Use the str() function)

> in the form Cluster[[i]][j-k]  where i is the
> cluster number and j-k is the range of values above the threshold  
> taking
> account of the time condition.

Unless you find someone who uses that package in the manner you have,  
you will need to explain in much greater detail than you have so far.

>
>> From this I can get durations easily enough but the spacing is  
>> proving quite
> difficult.

There are quite possibly methods using rle() or possibly something  
like rollapply() from the zoo package, but you need to provide a  
specific and richer test case.

>
> The data is for ocean waves and therefore it may be possible that  
> the wave
> height drops below the threshold for a short period but should still  
> be
> considered part of the same event, hence the time conditon.
>
> Hope this clarifies the problem.

It clarifies it to the extent that it show how much more you will need  
to further clarify.

-- 

David Winsemius, MD
West Hartford, CT



------------------------------

Message: 26
Date: Fri, 29 Oct 2010 15:44:01 +0100 (BST)
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
To: skan <juanpide@gmail.com>
Cc: r-help@r-project.org
Subject: Re: [R] strftime vs strptime ??
Message-ID:
    <alpine.LFD.2.00.1010291538170.27141@toucan.stats.ox.ac.uk>
Content-Type: text/plain; charset="iso-8859-7"; Format="flowed"

strptime() takes a character vector and makes a date-time object. 
That is input.

strftime() takes a date-time object and makes an character vector.
That is output, and it is normally called via format() or print().

Let's see what the help says (slightly edited to refer just to these 
two):

Date-time Conversion Functions to and from Character

(One is 'to' and one is 'from.)

      Functions to convert between character representations and objects
      of classes ?"POSIXlt"? and ?"POSIXct"? representing calendar dates
      and times.

      ?strftime? converts objects from the class ?"POSIXlt"? to
       character vectors.

      ?strptime? converts character vectors to class ?"POSIXlt"?



On Fri, 29 Oct 2010, skan wrote:

>
> Hello
>
> Could anyone explain me the difference between strftime vs strptime, please
> ?
>
> I've read the help but it's a little bit cionfusing for me.
>
>
> cheers
> -- 
> View this message in context: 
>http://r.789695.n4.nabble.com/strftime-vs-strptime-tp3018865p3018865.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,                  ripley@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, UK                Fax:  +44 1865 272595

------------------------------

Message: 27
Date: Fri, 29 Oct 2010 15:47:22 +0100 (BST)
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>

Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Checking existance of a directory
Message-ID:
    <alpine.LFD.2.00.1010291544090.27141@toucan.stats.ox.ac.uk>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Fri, 29 Oct 2010, Ron Michael wrote:

> Hi all, I am wondering is there any way to check whether some 
> Directory exists or not, given the parent path of that directory? 
> After searching for a while I found that there is a function 
> dir.create() to create some directory. However I need to know 
> whether such directory already exists or not, otherwise I will 
> create that.

Well, as others have also pointed out, you don't need to do that (and 
I created dir.create() deliberately so you don't).

But see ?file_test and op = "-d" if you actually need to in some other 
application.  (This is linked from ?file.exists which is linked from 
?dir.create.)


> ?
> Thanks,

-- 
Brian D. Ripley,                  ripley@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, UK                Fax:  +44 1865 272595



------------------------------

Message: 28
Date: Fri, 29 Oct 2010 10:45:55 -0400
From: jim holtman <jholtman@gmail.com>
To: Matthew Pettis <matthew.pettis@gmail.com>
Cc: r-help@r-project.org
Subject: Re: [R] Printing data.frame data: alternatives to print?
Message-ID:
    <AANLkTikBqLp-Lq67mMtiZtm0BjhqPZ+U=CWn54e4eo4a@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Is this what you want:

> df
       f1      f2
1   Maj I Minor A
2   Maj I Minor A
3   Maj I Minor A
4  Maj II Minor A
5  Maj II Minor B
6  Maj II Minor B
7 Maj III Minor B
8 Maj III Minor C
9 Maj III Minor C
> df[!duplicated(df),]
       f1      f2
1   Maj I Minor A
4  Maj II Minor A
5  Maj II Minor B
7 Maj III Minor B
8 Maj III Minor C
>


On Fri, Oct 29, 2010 at 9:53 AM, Matthew Pettis
<matthew.pettis@gmail.com> wrote:
> Hi,
>
> I have a data frame with two factors (well, more, but 2 for simple
> consideration), and I want to display the different combinations of
> the them that actually occur in the data. ?In reality, there are too
> many of them to do to do a 'table' call and have one col vertical and
> one col horizontal (I don't want any of the factors listed
> horizontally). ?Before I try to write a function to do this for me, I
> was wondering if there were alternate printing styles for data that
> already exist, and if someone could direct me to them? ?Inclded is a
> sample code and 2 possibilities (others welcome for consideration) of
> how I want to display some data.
>
> Thanks,
> Matt
>
> -----
>
> df <- data.frame(
> ? ?f1=rep(c("Maj I", "Maj II", "Maj III"), each=3),
> ? ?f2=c("Minor A", "Minor A", "Minor A", "Minor A", "Minor B", "Minor
> B", "Minor B", "Minor C", "Minor C")
> )
>
> -----
>
> What I want printed is something like:
>
> -------------------
> ? ? ?f1 ? ? ? ? f2
> Maj I ? ? ? Minor A
>
> Maj II ? ? ?Minor A
> ? ? ? ? ? ?Minor B
>
> Maj III ? ? Minor B
> ? ? ? ? ? ?Minor C
> -------------------
>
> or
>
> -------------------
> ? ? ?f1 ? ? ? ? f2
> Maj I ? ? ? Minor A
>
> Maj II ? ? ?Minor A
> Maj II ? ? ?Minor B
>
> Maj III ? ? Minor B
> Maj III ? ? Minor C
>
> ______________________________________________
> 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?



------------------------------

Message: 29
Date: Fri, 29 Oct 2010 10:54:19 -0400
From: David Winsemius <dwinsemius@comcast.net>
To: skan <juanpide@gmail.com>
Cc: r-help@r-project.org
Subject: Re: [R] strftime vs strptime ??
Message-ID: <60F1A7A1-C4AF-4257-8ABE-81685A03ED6A@comcast.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Oct 29, 2010, at 6:55 AM, skan wrote:

>
> Hello
>
> Could anyone explain me the difference between strftime vs strptime,  
> please
> ?
>
> I've read the help but it's a little bit cionfusing for me.

You should focus on the "Value" section of the help page. They return  
vectors of different classes.

-- 

David Winsemius, MD
West Hartford, CT



------------------------------

Message: 30
Date: Fri, 29 Oct 2010 09:59:40 -0500
From: Matthew Pettis <matthew.pettis@gmail.com>
To: jim holtman <jholtman@gmail.com>
Cc: r-help@r-project.org
Subject: Re: [R] Printing data.frame data: alternatives to print?
Message-ID:
    <AANLkTikq+minAWa+86rESreJaZZGbAdCEDEWKTa8FBu9@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

[[elided Yahoo spam]]

matt

On Fri, Oct 29, 2010 at 9:45 AM, jim holtman <jholtman@gmail.com> wrote:
> Is this what you want:
>
>> df
> ? ? ? f1 ? ? ?f2
> 1 ? Maj I Minor A
> 2 ? Maj I Minor A
> 3 ? Maj I Minor A
> 4 ?Maj II Minor A
> 5 ?Maj II Minor B
> 6 ?Maj II Minor B
> 7 Maj III Minor B
> 8 Maj III Minor C
> 9 Maj III Minor C
>> df[!duplicated(df),]
> ? ? ? f1 ? ? ?f2
> 1 ? Maj I Minor A
> 4 ?Maj II Minor A
> 5 ?Maj II Minor B
> 7 Maj III Minor B
> 8 Maj III Minor C
>>
>
>
> On Fri, Oct 29, 2010 at 9:53 AM, Matthew Pettis
> <matthew.pettis@gmail.com> wrote:
>> Hi,
>>
>> I have a data frame with two factors (well, more, but 2 for simple
>> consideration), and I want to display the different combinations of
>> the them that actually occur in the data. ?In reality, there are too
>> many of them to do to do a 'table' call and have one col vertical and
>> one col horizontal (I don't want any of the factors listed
>> horizontally). ?Before I try to write a function to do this for me, I
>> was wondering if there were alternate printing styles for data that
>> already exist, and if someone could direct me to them? ?Inclded is a
>> sample code and 2 possibilities (others welcome for consideration) of
>> how I want to display some data.
>>
>> Thanks,
>> Matt
>>
>> -----
>>
>> df <- data.frame(
>> ? ?f1=rep(c("Maj I", "Maj II", "Maj III"), each=3),
>> ? ?f2=c("Minor A", "Minor A", "Minor A", "Minor A", "Minor B", "Minor
>> B", "Minor B", "Minor C", "Minor C")
>> )
>>
>> -----
>>
>> What I want printed is something like:
>>
>> -------------------
>> ? ? ?f1 ? ? ? ? f2
>> Maj I ? ? ? Minor A
>>
>> Maj II ? ? ?Minor A
>> ? ? ? ? ? ?Minor B
>>
>> Maj III ? ? Minor B
>> ? ? ? ? ? ?Minor C
>> -------------------
>>
>> or
>>
>> -------------------
>> ? ? ?f1 ? ? ? ? f2
>> Maj I ? ? ? Minor A
>>
>> Maj II ? ? ?Minor A
>> Maj II ? ? ?Minor B
>>
>> Maj III ? ? Minor B
>> Maj III ? ? Minor C
>>
>> ______________________________________________
>> 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?
>



-- 
Seven Deadly Sins (Gandhi):
??- Wealth without work ? ? ? ? ? ? - Politics without principle
??- Pleasure without conscience ? ? - Commerce without morality
??- Science without humanity ? ? ? ?- Worship without sacrifice
??- Knowledge without character



------------------------------

Message: 31
Date: Fri, 29 Oct 2010 11:18:05 -0400
From: Gabor Grothendieck <ggrothendieck@gmail.com>
To: Sarah Moens <sarah_m@telenet.be>
Cc: r-help@r-project.org
Subject: Re: [R] Reading multiple .csv-files and assigning them to
    variable    names
Message-ID:
    <AANLkTi=ydsreUztjbX0LENw+gBW5TE6Lgo4r0ngJ7dC+@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 29, 2010 at 5:16 AM, Sarah Moens <sarah_m@telenet.be> wrote:
> Hi all,
>
> I've been trying to find a solution for the problem of reading
> multiple files and storing them in a variable that contains the names
> by which I want to call the datasets later on.
>
> For example (5 filenames):
>
> - The filenames are stored in one variable:
> filenames = paste(paste('name', '_', 1:5, sep = ''), '.csv', sep = '')
>
> - Subsequently I have a variable just containing the meaningful names
> for the dataset
> meaningfulnames = c('name1','name2'...,'name5')
>
> - I want to link each of these names to the data that is read
>
> for (i in 1:5)
> {
> ? ? meaningfulnames[i] = read.csv(filenames[i], header = TRUE, sep = ',')
> }
>
>
> I need to read in quite a lot of datafiles. I have a code doing this
> one at a time, but since the number of datafiles I need to read will
> increase in the future, I want to make sure I have a more flexible
> solution for this.
>

Try this:

   filenames <- sprintf("%s_%d.csv", "name", 1:5)
   L <- sapply(filenames, read.csv, simplify = FALSE)

L will be a list with the data frames as components and the file names
as the component names.  If you wish to change the names from the
filenames to some other names you can do this:

   names(L) <- vector.of.other.names

If the data frames all have the same number of columns and the same
names in the same order then you could also put them into a single
data frame like this:

   do.call("rbind", L)

or if you want to retain the knowledge of which each came from:

   library(lattice)
   do.call("make.groups", L)

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



------------------------------

Message: 32
Date: Fri, 29 Oct 2010 11:32:10 -0400
From: "Liaw, Andy" <andy_liaw@merck.com>
To: <r-help@r-project.org>
Subject: [R] Contract programming position at Merck (NJ, USA)
Message-ID:
    <B10BAA7D28D88B45AF82813C4A6FFA93D33DD0@usctmx1157.merck.com>
Content-Type: text/plain

Job: Scientific programmer at Merck, Biostatistics, Rahway, NJ, USA
[Job Description] 
This position works closely with statisticians to process and analyze
ultrasound, MRI, and radiotelemetry longitudinal studies using a series
of programs developed in R and Mathworks/Matlab.  This position provides
support for the analysis of several pre-clinical and clinical functional
MRI studies by preprocessing and processing data using the software FSL.
Qualified candidates must have a proficiency and experience with
statistical software and technical computing packages including Matlab,
R, SAS, and S-Plus as well as familiarity with medical image concepts
(e.g., functional MRI) and an understanding of analysis tools for fMRI
(FSL, SPM).

This is contract position for an ongoing need in Biometrics Research.
It is a term contract position (1 year) with the possibility to extend
up to 2 years in length based on continued business need and available
budget. 

If you are interested, please contact:
amy_gillespie@merck.com

Notice:  This e-mail message, together with any attachme...{{dropped:14}}



------------------------------

Message: 33
Date: Fri, 29 Oct 2010 11:32:39 -0400
From: govindas@msu.edu
To: r-help@r-project.org
[[elided Yahoo spam]]
Message-ID: <20101029113239.20944zrffdl4rqxj@mail.msu.edu>
Content-Type: text/plain



Hello all,

I  am trying to use "clim.pact" package for my work, but since this is  the  
beginning for me to use gridded datasets in "R", I am having some   trouble. 


I want to do seasonal analyses like   trends, anomalies, variograms, EOF and 
probably kriging too to   downscale my 1 degree gridded data to 0.5.  So, as a 
first step, I   compiled my entire dataset (with 25 yeears of daily dataset
which were   present as 25 files) into a single netcdf file. 


Then, I downloaded clim.pact to do further analysis, which works but  seems  to 
change dataset's original dimensions' order for  "retrieve.nc"   function (i.e. 
original lon, lat, time order was changed  to time,  lat,  lon after using this 
function to get a subset). I am not  sure as  to why  this happened and not able 
to get any plots such as box  plot  (showing  trend in "lon", "lat", "time"), 
variogram (or variance),   correlation  analysis done because of this conversion 
problem. 


Further, basic "R"  functions seem to work well with objects such as  
dataframe, matrix ..etc  with time in a separate column, and the data   values 
(precipitation, or  temperature) in a separate coulmn with   corresponding
station values  (lon/lat). So, now I have very little idea   about what I have 
to do. Can anyone suggest me a better (probably  more refined way) way than what 
I am currently doing to analyze these  data? 


  

-- 
Regards,
Mahalakshmi
Graduate Student
#20, Department of Geography
Michigan State University
East Lansing, MI 48824
    [[alternative HTML version deleted]]



------------------------------

Message: 34
Date: Fri, 29 Oct 2010 08:36:35 -0700
From: cbbaniya@gmail.com
To: R-help@r-project.org
Subject: [R] I got lot in the permutation
Message-ID: <28414471.9737.1288366595093.JavaMail.root@joe.nabble.com>
Content-Type: text/plain; charset=us-ascii

Thanks for your help.
May be I can not make clear by my writing. The statement which I am going to do 
is like this

"To test such null hypotheses we used the Monte Carlo test, i.e. we chose 
randomly (5000 times) a value for the
current dependent characteristic (richness or actual species pool) in the 
interval 0 to the maximum possible
value of the dependent variable for each observed value of the current 
independent variable. The maximum observed
value was either the calculated size of the regional pool, or the measured size 
of the actual pool. Each time,
we calculated the correlation coefficient r between the independent and 
dependent variables in order to achieve
the empirical distribution of r for the null hypothesis conditions. The 
empirical probability of cases with a correlation
between the two studied variables positive and stronger than that observed in 
the real data, served as an estimate
of the significance level for rejecting the null hypotheses. Thus, by saying 
that there exists a significant
relationship, we mean that the relationship is significantly stronger than
expected from our null model".


I hope you will figure out and provide me all code for analyses.
Thanks.
Chitra



------------------------------

Message: 35
Date: Fri, 29 Oct 2010 08:37:41 -0700 (PDT)
From: dpender <d.pender@civil.gla.ac.uk>
To: r-help@r-project.org
Subject: Re: [R] Clustering
Message-ID: <1288366661566-3019323.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii



Apologies for being vague,

The structure of the output is as follows:

$ cluster1  : Named num [1:131] 3.05 2.71 3.26 2.91 2.88 3.11 3.21 -1 2.97
3.39 ...
  ..- attr(*, "names")= chr [1:131] "6667" "6668" "6669" "6670" ...

With 613 clusters.  What I require is abstracting the first and last value
of 

- attr(*, "names")= chr [1:131] "6667" "6668" "6669" "6670"

This will give a start and end point of the cluster and allow for the
spacing to be determined.

Thanks,

Doug
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Clustering-tp3017056p3019323.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 36
Date: Fri, 29 Oct 2010 08:40:57 -0700 (PDT)
From: Chitra <cbbaniya@gmail.com>
To: r-help@r-project.org
Subject: Re: [R] Please help me about Monte Carlo Permutation
Message-ID: <1288366857445-3019329.post@n4.nabble.com>
Content-Type: text/plain; charset=UTF-8


Hi dear Mi?ego dnia,
I am sorry I got lost here.
May be it it sound if I write you about what I am going to do.

"To test such null hypotheses we used the Monte Carlo test, i.e. we chose
randomly (5000 times) a value for the
current dependent characteristic (richness or actual species pool) in the
interval 0 to the maximum possible
value of the dependent variable for each observed value of the current
independent variable. The maximum observed
value was either the calculated size of the regional pool, or the measured
size of the actual pool. Each time,
we calculated the correlation coefficient r between the independent and
dependent variables in order to achieve
the empirical distribution of r for the null hypothesis conditions. The
empirical probability of cases with a correlation
between the two studied variables positive and stronger than that observed
in the real data, served as an estimate
of the significance level for rejecting the null hypotheses. Thus, by saying
that there exists a significant
relationship, we mean that the relationship is significantly stronger than
expected from our null model".


I hope I can get all necessary R code for analyses.
Chitra
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Please-help-me-about-Monte-Carlo-Permutation-tp3017131p3019329.html

Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 37
Date: Fri, 29 Oct 2010 08:51:22 -0700
From: Brad McNeney <mcneney@gmail.com>
To: David Winsemius <dwinsemius@comcast.net>
Cc: r-help@r-project.org, sr500 <stephanie.ross@phri.ca>
Subject: Re: [R] Cox Proportional Models and Haplotypes
Message-ID:
    <AANLkTikm5GSbgNW-r4kh==ZcuzBsmFaLsSbYuTXapCns@mail.gmail.com>
Content-Type: text/plain; charset=windows-1252

You could do a weighted cox ph model, with possible haplotype
configurations for each subject weighted by their posterior
probabilities given genotype data.

Are your markers SNPs?  If so you can use a utility function from the
hapassoc package to get started. For example, if your data is in a
dataframe dat, with nsnp SNPs in the last nsnps columns, you could
create an augmented data frame (augmented by pseudo-individuals for
each subject with ambiguous phase) with

library(hapassoc)
ph<-pre.hapassoc(dat,nsnps)
augdat<-cbind(ph$nonHaploDM,ph$haploDM)
wts<-ph$wt

and then use coxph with augdat as the data frme and  wts as the
weights. See ?pre.hapassoc for details on accepted formats for the SNP
data.

Brad
--
Brad McNeney
Statistics and Actuarial Science
Simon Fraser University

On Tue, Oct 26, 2010 at 12:01 PM, David Winsemius
<dwinsemius@comcast.net> wrote:
>
> On Oct 26, 2010, at 8:57 AM, sr500 wrote:
>
>>
>> Hello,
>>
>> I was wondering if anyone knew of a function that fits haplotype data into
>> a
>> cox proportional hazard model. I have computed my Haplotype frequencies
>> using the haplo.stats package. I have also been using the haplo.glm
>> function
>> but this is a linear regression and is not quite what I am looking for?
>>
>
> I think you need to describe your data situation more completely and ideally
> would include a small extract of your data to allow testing and
> illustration. Cox proportional hazards models are typically used to analyze
> time to event data and you have not alluded to any "events".
>
> --
> David.
>
>> Thank you very much,
>> SR
>>
>> --
>> View this message in context:
>>http://r.789695.n4.nabble.com/Cox-Proportional-Models-and-Haplotypes-tp3013989p3013989.html
>>l
>> 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.
>



------------------------------

Message: 38
Date: Fri, 29 Oct 2010 08:54:44 -0700 (PDT)
From: eshi <linshi@knox.edu>
To: r-help@r-project.org
Subject: Re: [R] draw path diagram using dot
Message-ID: <1288367684543-3019359.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Dear John,

Thank you very much for your help! I appreciate it. 

eshi
-- 
View this message in context: 
http://r.789695.n4.nabble.com/draw-path-diagram-using-dot-tp3017987p3019359.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 39
Date: Fri, 29 Oct 2010 12:08:16 -0400
From: David Winsemius <dwinsemius@comcast.net>
To: dpender <d.pender@civil.gla.ac.uk>
Cc: r-help@r-project.org
Subject: Re: [R] Clustering
Message-ID: <B95FCD45-38BE-4578-85D6-D1C422439C8E@comcast.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Oct 29, 2010, at 11:37 AM, dpender wrote:

>
>
> Apologies for being vague,
>
> The structure of the output is as follows:

Still no code?

>
> $ cluster1  : Named num [1:131] 3.05 2.71 3.26 2.91 2.88 3.11 3.21  
> -1 2.97
> 3.39 ...
>  ..- attr(*, "names")= chr [1:131] "6667" "6668" "6669" "6670" ...
>
> With 613 clusters.  What I require is abstracting the first and last  
> value
> of
>
> - attr(*, "names")= chr [1:131] "6667" "6668" "6669" "6670"

Those values are in an attribute:

? attribute
? attr

Your specific request may (perhaps) be addressed by something like:

attrnames <- attr(objname["cluster1"], "names")
attrnames[c(1, length(attrnames)]

I don't really think this is optimal. For one thing it won't  
generalize to the rest of the clusters. Generally when data are put  
into an attribute, the programmer also provides an extraction  
function. Since Nabble posters are prone to not retaining thread  
context, the name of your function and package are probably elsewhere  
further up the thread but not available as I read this on a mail- 
client. Perhaps if you read more of the documentation? (Just a guess.)

>
> This will give a start and end point of the cluster and allow for the
> spacing to be determined.

Those would be character values and, if you want to do calculations,  
would obviously need to be coerced to numeric.

>
> Thanks,
>
> Doug
> -- 

David Winsemius, MD
West Hartford, CT



------------------------------

Message: 40
Date: Fri, 29 Oct 2010 18:14:27 +0200
From: Anna Radtke <annaradtke2309@googlemail.com>
To: r-help@r-project.org
Subject: [R] Tukey post hoc comparison (glht?) after 3factorial mixed
    model    (lmer)
Message-ID:
    <AANLkTim9y9vehPLWzF5Chi9z5eh5jCYB71WGC-kdFymd@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello, dear R-community.

This is a question about TukeyHSD between factor combinations of a Three-Way
ANOVA, which is - since it is a multi measure ANOVA - not a simple ANOVA but
a Generalised Linear Mixed Model (GLMM), calculated with "lmer".

> growth <-
groupedData(length~meas|box_id,outer=~spec*comp*water,data=all.spec)
> model <- lmer(length~spec*comp*water+(meas|box_id),data=growth)
> summary(model)

This works fine. But now, I would like to calculate Tukey HSD among certain
factor combinations. Formerly (before version 1.0), Tukey contrasts
including all levels of interactions could be calculated with the multcomp
package more or less automatically like this:

> summary (glht (model, linfct = mcp (spec*comp*water = "Tukey")))

Now, Mr Hothorn et al. have changed the function and it is "suggestet to the
users that they write out, manually, the set of contrasts they want". I
think that is not a bad idea, but I got problems with the syntax in my case.
And I would really grateful if anybody could help me. So far I tried:

> K <- cbind(0,diag(length(fixef(model))-1))
> rownames(K) <- names(fixef(model))[-1]
> model_glht <- glht(model,linfct=K)
> summary(model_glht)  # but actually this is not what I want

I'm rather looking for a Tukey output like this

specSt:compControl - specSt:compRoot         p that they are equal < 0.05
specSt:compControl - specSt:compShoot
specSt:compControl - specSt:compFull
specSt:compRoot - specSt:compShoot
specSt:compRoot - specSt:compFull
specSt:compShoot - specSt:compFull

and that for each of the 3 studied species, i.e. compare all-pairwise
combinations of the levels of the second factor within each level of the
first factor. We are not interested in the third factor, so data can be
averaged over that.


THANKS A LOT FOR ANY ADVICE, Sincerely

Anna Radtke



-----> model output:

Linear mixed model fit by REML
Formula: length ~ spec * comp * water + (meas | box_id)
   Data: growth
  AIC  BIC logLik deviance REMLdev
4800 4909  -2372     4988    4744
Random effects:
Groups   Name        Variance Std.Dev. Corr
box_id   (Intercept)      0.0   0.000
          meas        222484.2 471.682    NaN
Residual               9439.4  97.157
Number of obs: 360, groups: box_id, 120

Fixed effects:
                            Estimate Std. Error t value
(Intercept)                 -353.554     65.777  -5.375
specSt                      -103.111     93.023  -1.108
specSv                        -4.485     93.023  -0.048
comproot                     -41.686     93.023  -0.448
compshoot                    241.847     93.023   2.600
compxfull                    316.849     93.023   3.406
watermoist                   -48.620     93.023  -0.523
specSt:comproot               97.168    131.554   0.739
specSv:comproot               54.849    131.554   0.417
specSt:compshoot              10.416    131.554   0.079
specSv:compshoot               6.584    131.554   0.050
specSt:compxfull              90.949    131.554   0.691
specSv:compxfull              43.284    131.554   0.329
specSt:watermoist              9.222    131.554   0.070
specSv:watermoist            104.229    131.554   0.792
comproot:watermoist           15.931    131.554   0.121
compshoot:watermoist          28.999    131.554   0.220
compxfull:watermoist          39.363    131.554   0.299
specSt:comproot:watermoist    45.513    186.046   0.245
specSv:comproot:watermoist   -24.350    186.046  -0.131
specSt:compshoot:watermoist   46.027    186.046   0.247
specSv:compshoot:watermoist    1.232    186.046   0.007
specSt:compxfull:watermoist   23.749    186.046   0.128
specSv:compxfull:watermoist  -57.109    186.046  -0.307
-------------- next part --------------
"meas" "spec" "comp" "water" "box_id" "sprouts" "leaves" "length" "long.sprout"
"81" 1 "Sf" "xfull" "moist" 81 6.8 13.6 150.4 43.8
"82" 1 "Sf" "root" "moist" 82 6.5 18.5 104.25 25.75
"83" 1 "Sf" "control" "moist" 83 9.25 29 146 27
"84" 1 "Sf" "control" "moist" 84 6.8 31.4 163.8 46.6
"85" 1 "Sf" "shoot" "moist" 85 4.8 19.8 127.6 32.8
"86" 1 "Sf" "control" "moist" 86 8.2 30.6 144.4 31.6
"87" 1 "Sf" "root" "moist" 87 7.8 32.8 174 38.8
"88" 1 "Sf" "shoot" "moist" 88 5 8.5 54 22.25
"89" 1 "Sf" "xfull" "moist" 89 2.25 7 54.25 27
"90" 1 "Sf" "control" "moist" 90 5.6 21.2 103 30
"91" 1 "Sf" "shoot" "moist" 91 4.25 18 84.25 29.25
"92" 1 "Sf" "root" "moist" 92 5.8 26.4 133.2 33
"93" 1 "Sf" "shoot" "moist" 93 11.25 35.25 215 44.25
"94" 1 "Sf" "root" "moist" 94 6 17.33333333 90.66666667 19.33333333
"95" 1 "Sf" "root" "moist" 95 4.666666667 5.333333333 33.66666667 9.333333333
"96" 1 "Sf" "shoot" "moist" 96 6.5 11.5 88.25 25.5
"97" 1 "Sf" "xfull" "moist" 97 9.8 13 184.4 40.2
"98" 1 "Sf" "xfull" "moist" 98 5.8 15.2 156.6 41.6
"99" 1 "Sf" "control" "moist" 99 7.5 26.5 140.75 36.5
"100" 1 "Sf" "xfull" "moist" 100 4.2 10.4 91 41.2
"101" 1 "Sf" "control" "awater-logged" 101 9 35.8 222.2 43.6
"102" 1 "Sf" "shoot" "awater-logged" 102 10.8 40.6 245.4 47.6
"103" 1 "Sf" "xfull" "awater-logged" 103 4.6 10.6 134.6 47
"104" 1 "Sf" "shoot" "awater-logged" 104 8.2 35.4 263.4 56.2
"105" 1 "Sf" "xfull" "awater-logged" 105 8.4 8 207.8 45.6
"106" 1 "Sf" "control" "awater-logged" 106 8.5 38.5 243.25 45.25
"107" 1 "Sf" "root" "awater-logged" 107 9 41 205 43.2
"108" 1 "Sf" "shoot" "awater-logged" 108 8.4 24.6 170.4 39.2
"109" 1 "Sf" "root" "awater-logged" 109 8.8 29.2 176.4 31.4
"110" 1 "Sf" "control" "awater-logged" 110 7 28.8 167 44
"111" 1 "Sf" "shoot" "awater-logged" 111 10.2 41.2 283.4 50.6
"112" 1 "Sf" "root" "awater-logged" 112 8.6 35.6 211.6 37.4
"113" 1 "Sf" "root" "awater-logged" 113 10.6 39 221 44.6
"114" 1 "Sf" "xfull" "awater-logged" 114 8 11.8 253.6 64.4
"115" 1 "Sf" "shoot" "awater-logged" 115 8.4 25 148 30.6
"116" 1 "Sf" "control" "awater-logged" 116 8.6 37.2 213 46.6
"117" 1 "Sf" "root" "awater-logged" 117 9.8 28 165.4 35.4
"118" 1 "Sf" "xfull" "awater-logged" 118 6.2 2.6 124 34
"119" 1 "Sf" "control" "awater-logged" 119 6.2 25.6 145 39.8
"120" 1 "Sf" "xfull" "awater-logged" 120 8.5 9.75 247.25 62.25
"811" 2 "Sf" "xfull" "moist" 81 4.4 41.6 464.6 217.6
"821" 2 "Sf" "root" "moist" 82 4.6 58.4 800 271.8
"831" 2 "Sf" "control" "moist" 83 7 79.2 967.8 248.8
"841" 2 "Sf" "control" "moist" 84 5.8 68.6 923 256.4
"851" 2 "Sf" "shoot" "moist" 85 4.4 46.4 549.6 263.8
"861" 2 "Sf" "control" "moist" 86 6.8 81.2 1077 309
"871" 2 "Sf" "root" "moist" 87 6.6 72.6 914.8 307.4
"881" 2 "Sf" "shoot" "moist" 88 3 28.25 361 242
"891" 2 "Sf" "xfull" "moist" 89 2.2 19.8 221.8 139.2
"901" 2 "Sf" "control" "moist" 90 5.8 72.4 1038.4 328.6
"911" 2 "Sf" "shoot" "moist" 91 4.5 39 423.25 253.25
"921" 2 "Sf" "root" "moist" 92 4.8 66.8 930.8 296.8
"931" 2 "Sf" "shoot" "moist" 93 7.75 69.5 843 323.25
"941" 2 "Sf" "root" "moist" 94 5.75 56.75 710.75 205
"951" 2 "Sf" "root" "moist" 95 6.666666667 68.33333333 703.6666667 136.3333333
"961" 2 "Sf" "shoot" "moist" 96 4.5 40.5 524.5 235.25
"971" 2 "Sf" "xfull" "moist" 97 4.2 26.4 277.2 159.8
"981" 2 "Sf" "xfull" "moist" 98 2.2 17.6 197.2 143.6
"991" 2 "Sf" "control" "moist" 99 5.8 63.6 660.4 230
"1001" 2 "Sf" "xfull" "moist" 100 2.2 24.8 252.6 179.8
"1011" 2 "Sf" "control" "awater-logged" 101 6.8 87 1356.6 346.6
"1021" 2 "Sf" "shoot" "awater-logged" 102 7.4 73.2 887 350.8
"1031" 2 "Sf" "xfull" "awater-logged" 103 3.8 42 582.4 330
"1041" 2 "Sf" "shoot" "awater-logged" 104 6.2 66.8 818.4 381.8
"1051" 2 "Sf" "xfull" "awater-logged" 105 4.6 28.4 258.8 136
"1061" 2 "Sf" "control" "awater-logged" 106 6.8 78.8 957.8 286
"1071" 2 "Sf" "root" "awater-logged" 107 6.6 85.6 1345.2 351.2
"1081" 2 "Sf" "shoot" "awater-logged" 108 5.6 61 861.6 371
"1091" 2 "Sf" "root" "awater-logged" 109 6.2 71.8 1051.6 337.2
"1101" 2 "Sf" "control" "awater-logged" 110 5.8 67.2 992.4 338
"1111" 2 "Sf" "shoot" "awater-logged" 111 7 74.4 936 362.6
"1121" 2 "Sf" "root" "awater-logged" 112 6.8 110.6 1490.4 369.8
"1131" 2 "Sf" "root" "awater-logged" 113 7.8 89 1328.6 373.8
"1141" 2 "Sf" "xfull" "awater-logged" 114 3.8 28.4 330 165.8
"1151" 2 "Sf" "shoot" "awater-logged" 115 5.8 54 647 301.2
"1161" 2 "Sf" "control" "awater-logged" 116 7 83.4 1332.2 384
"1171" 2 "Sf" "root" "awater-logged" 117 7 83.6 1212 341
"1181" 2 "Sf" "xfull" "awater-logged" 118 4.6 28.2 405.2 193.8
"1191" 2 "Sf" "control" "awater-logged" 119 5.2 70 815.4 271
"1201" 2 "Sf" "xfull" "awater-logged" 120 6 45.25 507 205.75
"812" 3 "Sf" "xfull" "moist" 81 3.4 38.4 635.6 387.8
"822" 3 "Sf" "root" "moist" 82 4.8 64.2 1163 441.2
"832" 3 "Sf" "control" "moist" 83 5.2 78.2 1470.4 481.2
"842" 3 "Sf" "control" "moist" 84 4 72.2 1401.8 499.4
"852" 3 "Sf" "shoot" "moist" 85 2.4 40.8 797.8 519.2
"862" 3 "Sf" "control" "moist" 86 4.8 80.8 1562.6 563.6
"872" 3 "Sf" "root" "moist" 87 3.4 57.8 1224.8 499.4
"882" 3 "Sf" "shoot" "moist" 88 2.6 30 565 430
"892" 3 "Sf" "xfull" "moist" 89 2 25.4 435.2 362.4
"902" 3 "Sf" "control" "moist" 90 3.8 68.4 1353.8 508.4
"912" 3 "Sf" "shoot" "moist" 91 3.25 34.5 593 465.5
"922" 3 "Sf" "root" "moist" 92 4.6 73.8 1406.4 495.8
"932" 3 "Sf" "shoot" "moist" 93 3 43.4 873.2 516.6
"942" 3 "Sf" "root" "moist" 94 5 72.75 1301.25 457
"952" 3 "Sf" "root" "moist" 95 6.333333333 90.33333333 1401.333333 350.6666667
"962" 3 "Sf" "shoot" "moist" 96 2.25 39.75 738.25 433.75
"972" 3 "Sf" "xfull" "moist" 97 3.6 35.6 428.2 281
"982" 3 "Sf" "xfull" "moist" 98 3.4 28.8 412.6 303.8
"992" 3 "Sf" "control" "moist" 99 4.8 89.4 1151.4 443.8
"1002" 3 "Sf" "xfull" "moist" 100 2.2 29.2 467.4 377
"1012" 3 "Sf" "control" "awater-logged" 101 6 83.6 1659.4 473.2
"1022" 3 "Sf" "shoot" "awater-logged" 102 3.4 56.2 1122.4 566.2
"1032" 3 "Sf" "xfull" "awater-logged" 103 2.8 46.4 882.4 633.2
"1042" 3 "Sf" "shoot" "awater-logged" 104 4 58.8 1052.8 636.4
"1052" 3 "Sf" "xfull" "awater-logged" 105 3.6 40.6 516.6 345
"1062" 3 "Sf" "control" "awater-logged" 106 4.6 71.6 1441 509.8
"1072" 3 "Sf" "root" "awater-logged" 107 5.4 92.6 1879 609
"1082" 3 "Sf" "shoot" "awater-logged" 108 2.2 46.8 1038.8 639.2
"1092" 3 "Sf" "root" "awater-logged" 109 5.4 73.6 1364.8 538.4
"1102" 3 "Sf" "control" "awater-logged" 110 4.4 80.4 1382.6 548.6
"1112" 3 "Sf" "shoot" "awater-logged" 111 3.4 67.6 1403.4 632.4
"1122" 3 "Sf" "root" "awater-logged" 112 6.4 103.6 1917.2 504.2
"1132" 3 "Sf" "root" "awater-logged" 113 5 89.8 1817.8 606
"1142" 3 "Sf" "xfull" "awater-logged" 114 2.2 27.8 424.8 347
"1152" 3 "Sf" "shoot" "awater-logged" 115 1.6 30.8 646 523.4
"1162" 3 "Sf" "control" "awater-logged" 116 5.2 84.4 1804.8 598.2
"1172" 3 "Sf" "root" "awater-logged" 117 5.8 80 1388.4 461.2
"1182" 3 "Sf" "xfull" "awater-logged" 118 3.4 42.8 630.4 341.4
"1192" 3 "Sf" "control" "awater-logged" 119 3.8 82.4 1276.8 541.6
"1202" 3 "Sf" "xfull" "awater-logged" 120 3.75 57 870.75 483.75
"1" 1 "Sv" "control" "moist" 1 8.8 37.8 211.2 60.6
"2" 1 "Sv" "xfull" "moist" 2 7 8 174.8 62.8
"3" 1 "Sv" "control" "moist" 3 9 42 255.2 66
"4" 1 "Sv" "root" "moist" 4 7.8 35 225.8 78.2
"5" 1 "Sv" "root" "moist" 5 7.8 31.4 182.6 59.4
"6" 1 "Sv" "shoot" "moist" 6 8.8 50.8 247.6 53.4
"7" 1 "Sv" "root" "moist" 7 7 26.2 169.2 63
"8" 1 "Sv" "xfull" "moist" 8 4.6 4 71.8 35.8
"9" 1 "Sv" "root" "moist" 9 8.8 40 246.8 69.4
"10" 1 "Sv" "shoot" "moist" 10 8 48.2 266.8 67.6
"11" 1 "Sv" "control" "moist" 11 15 71.8 380.2 53.6
"12" 1 "Sv" "shoot" "moist" 12 10.4 41.2 271.8 58.6
"13" 1 "Sv" "shoot" "moist" 13 8.2 44 243.8 53.4
"14" 1 "Sv" "xfull" "moist" 14 6.2 10 171.6 67.2
"15" 1 "Sv" "root" "moist" 15 9.6 42.2 187.6 57.8
"16" 1 "Sv" "xfull" "moist" 16 6.2 7.8 164 63.6
"17" 1 "Sv" "control" "moist" 17 11 53.4 262.4 59.6
"18" 1 "Sv" "control" "moist" 18 8.8 45 245.4 63.8
"19" 1 "Sv" "xfull" "moist" 19 6.2 7.4 161 61.6
"20" 1 "Sv" "shoot" "moist" 20 9.4 38.4 209 74.8
"21" 1 "Sv" "root" "awater-logged" 21 8.6 42 252 75.2
"22" 1 "Sv" "shoot" "awater-logged" 22 7.8 34.8 238.8 80.8
"23" 1 "Sv" "control" "awater-logged" 23 9.75 37.25 182.25 55.5
"24" 1 "Sv" "control" "awater-logged" 24 8.2 51 287.2 77.8
"25" 1 "Sv" "control" "awater-logged" 25 8.5 45.25 290.5 85
"26" 1 "Sv" "xfull" "awater-logged" 26 8.8 11.6 204.4 58.8
"27" 1 "Sv" "shoot" "awater-logged" 27 6.6 22 138.6 68.6
"28" 1 "Sv" "shoot" "awater-logged" 28 10.4 34.4 225.2 70
"29" 1 "Sv" "root" "awater-logged" 29 5 22.4 113.4 60.2
"30" 1 "Sv" "control" "awater-logged" 30 7.4 38 220.4 73.8
"31" 1 "Sv" "xfull" "awater-logged" 31 7.6 5 143.8 54.8
"32" 1 "Sv" "xfull" "awater-logged" 32 3.6 10.2 124.6 74.2
"33" 1 "Sv" "xfull" "awater-logged" 33 7.2 6 162.6 60.8
"34" 1 "Sv" "shoot" "awater-logged" 34 7.4 26.4 210.4 86.2
"35" 1 "Sv" "root" "awater-logged" 35 8.6 34.8 257.6 81.6
"36" 1 "Sv" "root" "awater-logged" 36 9.4 31 196.2 70.4
"37" 1 "Sv" "root" "awater-logged" 37 6.8 34.2 204.4 85.4
"38" 1 "Sv" "xfull" "awater-logged" 38 7.2 6.6 151.6 66
"39" 1 "Sv" "shoot" "awater-logged" 39 7.6 39.6 227.4 63.8
"40" 1 "Sv" "control" "awater-logged" 40 8.4 51.6 257.6 78.6
"41" 2 "Sv" "control" "moist" 1 5.4 100.8 1104.4 392.6
"42" 2 "Sv" "xfull" "moist" 2 5.2 33.6 404.4 182.4
"43" 2 "Sv" "control" "moist" 3 6.4 108.6 1060 364.2
"44" 2 "Sv" "root" "moist" 4 5 91.4 1017.6 394.4
"45" 2 "Sv" "root" "moist" 5 5.2 78.4 772.4 312.4
"46" 2 "Sv" "shoot" "moist" 6 5.6 77.6 775.6 318
"47" 2 "Sv" "root" "moist" 7 4.6 73.2 730.2 314.4
"48" 2 "Sv" "xfull" "moist" 8 3.6 17.4 238.8 136.6
"49" 2 "Sv" "root" "moist" 9 4.6 94.2 980.4 366.8
"50" 2 "Sv" "shoot" "moist" 10 7.75 96.5 876.25 327
"51" 2 "Sv" "control" "moist" 11 10 127.2 1209.6 327.2
"52" 2 "Sv" "shoot" "moist" 12 7.4 83.4 818.6 314
"53" 2 "Sv" "shoot" "moist" 13 6.8 83.8 812.4 283.6
"54" 2 "Sv" "xfull" "moist" 14 3.8 29.8 325 183.4
"55" 2 "Sv" "root" "moist" 15 4.6 72.2 734.8 378
"56" 2 "Sv" "xfull" "moist" 16 2.6 24.4 282 189
"57" 2 "Sv" "control" "moist" 17 8 124.6 1246.8 371.4
"58" 2 "Sv" "control" "moist" 18 4.4 84.4 1061.4 377.2
"59" 2 "Sv" "xfull" "moist" 19 4.2 29 353.8 193.4
"60" 2 "Sv" "shoot" "moist" 20 5.6 74.4 743.2 378.8
"61" 2 "Sv" "root" "awater-logged" 21 6.6 93.6 912.4 351.6
"62" 2 "Sv" "shoot" "awater-logged" 22 4 62 714.8 401
"63" 2 "Sv" "control" "awater-logged" 23 5 82 881.6 323.2
"64" 2 "Sv" "control" "awater-logged" 24 5.6 110.8 1264.8 424.8
"65" 2 "Sv" "control" "awater-logged" 25 5.8 89.6 930.8 346.2
"66" 2 "Sv" "xfull" "awater-logged" 26 4 39.6 455.2 268.8
"67" 2 "Sv" "shoot" "awater-logged" 27 3.4 55.4 614.6 384.2
"68" 2 "Sv" "shoot" "awater-logged" 28 5.4 71 698 320.6
"69" 2 "Sv" "root" "awater-logged" 29 3 66.4 757.4 427.8
"70" 2 "Sv" "control" "awater-logged" 30 4.8 83 990.4 413.4
"71" 2 "Sv" "xfull" "awater-logged" 31 3.2 23.2 300.6 238.8
"72" 2 "Sv" "xfull" "awater-logged" 32 1.4 24.6 210.8 192.8
"73" 2 "Sv" "xfull" "awater-logged" 33 3.2 28.6 344.8 185.8
"74" 2 "Sv" "shoot" "awater-logged" 34 3.6 59.6 631 402
"75" 2 "Sv" "root" "awater-logged" 35 5.2 86.4 826.4 289.8
"76" 2 "Sv" "root" "awater-logged" 36 7.2 87.4 918.8 351
"77" 2 "Sv" "root" "awater-logged" 37 4.2 84.8 840 422
"78" 2 "Sv" "xfull" "awater-logged" 38 2.4 29.8 355.6 239.6
"79" 2 "Sv" "shoot" "awater-logged" 39 6.2 71.2 683.8 282
"80" 2 "Sv" "control" "awater-logged" 40 5.4 106.4 1083.6 388.6
"813" 3 "Sv" "control" "moist" 1 5.2 149.6 1863.8 682
"823" 3 "Sv" "xfull" "moist" 2 2.5 42.25 427.5 344.5
"833" 3 "Sv" "control" "moist" 3 4.2 134 1496.2 572
"843" 3 "Sv" "root" "moist" 4 3.6 121 1488.8 706.8
"853" 3 "Sv" "root" "moist" 5 4 115 1340.2 587.2
"863" 3 "Sv" "shoot" "moist" 6 2.6 80 976 613.2
"873" 3 "Sv" "root" "moist" 7 3.6 94.4 1187.2 555
"883" 3 "Sv" "xfull" "moist" 8 3.5 41.75 367 195.5
"893" 3 "Sv" "root" "moist" 9 3.6 120.2 1450.4 630.6
"903" 3 "Sv" "shoot" "moist" 10 2.6 85 1007.2 586
"913" 3 "Sv" "control" "moist" 11 4 118.8 1386 626.6
"923" 3 "Sv" "shoot" "moist" 12 2.2 72.4 942.6 578.4
"933" 3 "Sv" "shoot" "moist" 13 2.2 80.6 957.6 606
"943" 3 "Sv" "xfull" "moist" 14 1.25 27 308 297
"953" 3 "Sv" "root" "moist" 15 2.6 85.8 1080.2 676.8
"963" 3 "Sv" "xfull" "moist" 16 1.666666667 41 475.6666667 374
"973" 3 "Sv" "control" "moist" 17 4.4 148 1795.6 681.8
"983" 3 "Sv" "control" "moist" 18 3.4 107.8 1484.4 653.6
"993" 3 "Sv" "xfull" "moist" 19 2.4 49.8 450.6 326.2
"1003" 3 "Sv" "shoot" "moist" 20 2.8 73.6 896.2 663.8
"1013" 3 "Sv" "root" "awater-logged" 21 4.8 119 1431.6 585
"1023" 3 "Sv" "shoot" "awater-logged" 22 1.8 61.2 896.8 654
"1033" 3 "Sv" "control" "awater-logged" 23 4.6 123.8 1471.6 552
"1043" 3 "Sv" "control" "awater-logged" 24 5 144 1906.6 734.2
"1053" 3 "Sv" "control" "awater-logged" 25 3.4 107.8 1388.4 639
"1063" 3 "Sv" "xfull" "awater-logged" 26 1.8 53.2 586.8 439.4
"1073" 3 "Sv" "shoot" "awater-logged" 27 1.8 68.4 910.6 704.4
"1083" 3 "Sv" "shoot" "awater-logged" 28 3.4 88.2 1092 615
"1093" 3 "Sv" "root" "awater-logged" 29 2.8 101.2 1342.8 740.4
"1103" 3 "Sv" "control" "awater-logged" 30 4 125.4 1556.6 769.6
"1113" 3 "Sv" "xfull" "awater-logged" 31 2 52.2 534.8 451
"1123" 3 "Sv" "xfull" "awater-logged" 32 1.8 40.4 428.6 375.6
"1133" 3 "Sv" "xfull" "awater-logged" 33 2 41.2 420.6 295.6
"1143" 3 "Sv" "shoot" "awater-logged" 34 1.8 74.6 978.8 760.6
"1153" 3 "Sv" "root" "awater-logged" 35 4 110.8 1262.8 494.4
"1163" 3 "Sv" "root" "awater-logged" 36 6.4 129.2 1518.8 590.4
"1173" 3 "Sv" "root" "awater-logged" 37 4.6 124.6 1389.8 746
"1183" 3 "Sv" "xfull" "awater-logged" 38 2 39 472.6 398.4
"1193" 3 "Sv" "shoot" "awater-logged" 39 1.6 59.8 809.4 576.4
"1203" 3 "Sv" "control" "awater-logged" 40 4.4 134.6 1622.6 664.4
"413" 1 "St" "root" "moist" 41 4.6 17.6 83 35.2
"423" 1 "St" "xfull" "moist" 42 3 4.6 29.6 15.6
"433" 1 "St" "root" "moist" 43 5.333333333 26.33333333 110.3333333 52.33333333
"443" 1 "St" "control" "moist" 44 8 38 187 63.4
"453" 1 "St" "control" "moist" 45 5.6 23.8 96.4 38.8
"463" 1 "St" "root" "moist" 46 7.5 18.75 92.25 33
"473" 1 "St" "xfull" "moist" 47 6.333333333 8 73 23
"483" 1 "St" "shoot" "moist" 48 6.4 20.6 93.4 22.4
"493" 1 "St" "xfull" "moist" 49 6 2.6 63 15
"503" 1 "St" "xfull" "moist" 50 5.4 2.8 56.4 21.2
"513" 1 "St" "shoot" "moist" 51 8 24.33333333 117 42.33333333
"523" 1 "St" "shoot" "moist" 52 7 13.4 80 25.8
"533" 1 "St" "root" "moist" 53 4.5 16 66.25 31
"543" 1 "St" "control" "moist" 54 6.8 19.4 83.8 32.6
"553" 1 "St" "control" "moist" 55 9.25 36.75 158.5 34.25
"563" 1 "St" "control" "moist" 56 5.2 18.2 97.6 39
"573" 1 "St" "shoot" "moist" 57 6.25 12.75 55.75 25
"583" 1 "St" "shoot" "moist" 58 6.333333333 30.66666667 131.3333333 39
"593" 1 "St" "xfull" "moist" 59 5.8 7.8 69.2 28.6
"603" 1 "St" "root" "moist" 60 5 19.8 84 27.6
"613" 1 "St" "xfull" "awater-logged" 61 6.2 3.2 73.4 21
"623" 1 "St" "control" "awater-logged" 62 7.2 15 89.2 32
"633" 1 "St" "shoot" "awater-logged" 63 6.5 15.25 85.25 35
"643" 1 "St" "root" "awater-logged" 64 4.666666667 18.66666667 99 40.33333333
"653" 1 "St" "control" "awater-logged" 65 5.8 16.8 75.8 26.2
"663" 1 "St" "xfull" "awater-logged" 66 5.666666667 4 62.33333333 28.33333333
"673" 1 "St" "control" "awater-logged" 67 9 33.25 120 37
"683" 1 "St" "root" "awater-logged" 68 6 16 70 24.25
"693" 1 "St" "shoot" "awater-logged" 69 7 15.4 71.6 31.4
"703" 1 "St" "xfull" "awater-logged" 70 5.2 1.2 57.4 23.6
"713" 1 "St" "control" "awater-logged" 71 7.25 23.5 114 33
"723" 1 "St" "shoot" "awater-logged" 72 6.75 30.5 125 40.75
"733" 1 "St" "shoot" "awater-logged" 73 7.25 13.75 81.5 29.5
"743" 1 "St" "root" "awater-logged" 74 8.2 18.2 89.8 35.6
"753" 1 "St" "shoot" "awater-logged" 75 5.6 15.8 69.6 29.4
"763" 1 "St" "control" "awater-logged" 76 7.4 27.8 100.2 28.8
"773" 1 "St" "root" "awater-logged" 77 6.4 15.4 79.2 36
"783" 1 "St" "xfull" "awater-logged" 78 6.2 0.6 42.6 13.4
"793" 1 "St" "xfull" "awater-logged" 79 3.8 3.8 46.4 22.6
"803" 1 "St" "root" "awater-logged" 80 5.2 26 92.4 25.6
"411" 2 "St" "root" "moist" 41 3 45.6 658.4 364.8
"421" 2 "St" "xfull" "moist" 42 3.4 9.2 130 93.2
"431" 2 "St" "root" "moist" 43 3.25 36 520.75 382.25
"441" 2 "St" "control" "moist" 44 5.6 68.2 966.2 456.4
"451" 2 "St" "control" "moist" 45 4.8 60.4 765.4 347.8
"461" 2 "St" "root" "moist" 46 6.8 57.2 631.4 282.8
"471" 2 "St" "xfull" "moist" 47 4.8 10 133.8 50.8
"481" 2 "St" "shoot" "moist" 48 6.6 61.2 547.4 233.6
"491" 2 "St" "xfull" "moist" 49 7.6 24.6 241.2 88
"501" 2 "St" "xfull" "moist" 50 5.4 19.4 138.2 43
"511" 2 "St" "shoot" "moist" 51 5 42.4 353.8 188
"521" 2 "St" "shoot" "moist" 52 4.6 39.2 417 256
"531" 2 "St" "root" "moist" 53 3.75 51 607.75 298.25
"541" 2 "St" "control" "moist" 54 6.2 66.8 771.4 303.4
"551" 2 "St" "control" "moist" 55 7 79 998 398
"561" 2 "St" "control" "moist" 56 4.6 58.8 782.4 365
"571" 2 "St" "shoot" "moist" 57 4.4 37.6 331 143
"581" 2 "St" "shoot" "moist" 58 4.25 44.25 466.5 261.25
"591" 2 "St" "xfull" "moist" 59 6.6 18.8 160.6 64.6
"601" 2 "St" "root" "moist" 60 3.8 49 668.8 311
"611" 2 "St" "xfull" "awater-logged" 61 6 17.8 204.2 96.4
"621" 2 "St" "control" "awater-logged" 62 4.2 56.8 800.4 353.6
"631" 2 "St" "shoot" "awater-logged" 63 3.5 45 534 305
"641" 2 "St" "root" "awater-logged" 64 4.666666667 61.33333333 665.6666667
338.6666667
"651" 2 "St" "control" "awater-logged" 65 4.2 58.8 759 323.2
"661" 2 "St" "xfull" "awater-logged" 66 4.5 14.25 171 97
"671" 2 "St" "control" "awater-logged" 67 5.5 72 851.5 363
"681" 2 "St" "root" "awater-logged" 68 5.75 62.75 616.75 262.25
"691" 2 "St" "shoot" "awater-logged" 69 3.2 41.6 587.8 415.4
"701" 2 "St" "xfull" "awater-logged" 70 3.8 14 141.4 79.8
"711" 2 "St" "control" "awater-logged" 71 4.2 57 774 298.2
"721" 2 "St" "shoot" "awater-logged" 72 3.8 41.4 468.4 227.2
"731" 2 "St" "shoot" "awater-logged" 73 3.75 42.25 492.25 235
"741" 2 "St" "root" "awater-logged" 74 4.4 52.4 691.2 342
"751" 2 "St" "shoot" "awater-logged" 75 2.4 30.6 379.4 294.2
"761" 2 "St" "control" "awater-logged" 76 6.6 80.2 966.6 340.6
"771" 2 "St" "root" "awater-logged" 77 3.4 38 526.8 361.2
"781" 2 "St" "xfull" "awater-logged" 78 4.6 17.4 198.2 107.4
"791" 2 "St" "xfull" "awater-logged" 79 3 14.2 166.6 104.4
"801" 2 "St" "root" "awater-logged" 80 5.4 63.8 636.6 292.6
"412" 3 "St" "root" "moist" 41 2.6 60.6 1161 617.6
"422" 3 "St" "xfull" "moist" 42 3.4 16.8 313.8 250.6
"432" 3 "St" "root" "moist" 43 2.75 46 906 707.25
"442" 3 "St" "control" "moist" 44 3 74.8 1550.4 742.4
"452" 3 "St" "control" "moist" 45 3.8 73 1324.6 627.6
"462" 3 "St" "root" "moist" 46 4.4 62.2 1096 496.4
"472" 3 "St" "xfull" "moist" 47 3.2 13.8 133.6 64.4
"482" 3 "St" "shoot" "moist" 48 3.2 53 776.8 447.2
"492" 3 "St" "xfull" "moist" 49 3.8 21.4 303.4 239.6
"502" 3 "St" "xfull" "moist" 50 7.5 18.75 207.5 58
"512" 3 "St" "shoot" "moist" 51 4.6 56.8 689 421.8
"522" 3 "St" "shoot" "moist" 52 1.6 34.6 640.4 575.8
"532" 3 "St" "root" "moist" 53 3.75 67.5 1164.25 586.75
"542" 3 "St" "control" "moist" 54 3 73.4 1325 617.2
"552" 3 "St" "control" "moist" 55 4.75 99 1730.75 678
"562" 3 "St" "control" "moist" 56 3.6 75.4 1386.6 713.8
"572" 3 "St" "shoot" "moist" 57 2.25 31 463.5 343
"582" 3 "St" "shoot" "moist" 58 2.5 47 799 551.5
"592" 3 "St" "xfull" "moist" 59 5.5 14.5 243 155
"602" 3 "St" "root" "moist" 60 2.8 55.6 1086.6 513
"612" 3 "St" "xfull" "awater-logged" 61 5.4 27 345 220
"622" 3 "St" "control" "awater-logged" 62 4 80.4 1154.4 496.2
"632" 3 "St" "shoot" "awater-logged" 63 2.25 50.5 835.5 425.25
"642" 3 "St" "root" "awater-logged" 64 4.333333333 83.33333333 1354.333333
551.6666667
"652" 3 "St" "control" "awater-logged" 65 4 71.4 1351.4 576.4
"662" 3 "St" "xfull" "awater-logged" 66 3.75 17 224.5 160.25
"672" 3 "St" "control" "awater-logged" 67 4.25 78.5 1268.5 549.75
"682" 3 "St" "root" "awater-logged" 68 5.25 92.75 1189.5 462
"692" 3 "St" "shoot" "awater-logged" 69 2.2 45 865.6 642.8
"702" 3 "St" "xfull" "awater-logged" 70 3.6 22.4 246.2 181.6
"712" 3 "St" "control" "awater-logged" 71 3.8 74.6 1284 545.4
"722" 3 "St" "shoot" "awater-logged" 72 2.2 42.2 647 405.2
"732" 3 "St" "shoot" "awater-logged" 73 2.25 47.25 798.75 491.75
"742" 3 "St" "root" "awater-logged" 74 3 61 1105.8 551.4
"752" 3 "St" "shoot" "awater-logged" 75 1.8 36.6 585.8 534.4
"762" 3 "St" "control" "awater-logged" 76 5.8 98 1633.8 640.4
"772" 3 "St" "root" "awater-logged" 77 3.4 51.6 876.8 572.6
"782" 3 "St" "xfull" "awater-logged" 78 4.8 25.6 295.6 175.6
"792" 3 "St" "xfull" "awater-logged" 79 2.6 21.4 295.2 228.2
"802" 3 "St" "root" "awater-logged" 80 4 72.2 1072.8 576

------------------------------

Message: 41
Date: Fri, 29 Oct 2010 12:25:21 -0400
From: David Winsemius <dwinsemius@comcast.net>
To: David Winsemius <dwinsemius@comcast.net>
Cc: r-help@r-project.org, dpender <d.pender@civil.gla.ac.uk>
Subject: Re: [R] Clustering
Message-ID: <0C0C943B-D729-48FC-95C5-42182C645A81@comcast.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes


On Oct 29, 2010, at 12:08 PM, David Winsemius wrote:

>
> On Oct 29, 2010, at 11:37 AM, dpender wrote:
>
>> Apologies for being vague,
>>
>> The structure of the output is as follows:
>
> Still no code?
>
>>
>> $ cluster1  : Named num [1:131] 3.05 2.71 3.26 2.91 2.88 3.11 3.21  
>> -1 2.97
>> 3.39 ...
>> ..- attr(*, "names")= chr [1:131] "6667" "6668" "6669" "6670" ...
>>
>> With 613 clusters.  What I require is abstracting the first and  
>> last value
>> of
>>
>> - attr(*, "names")= chr [1:131] "6667" "6668" "6669" "6670"
>
> Those values are in an attribute:

Corrections:
>
> ? attribute

?attributes

> ? attr
>
> Your specific request may (perhaps) be addressed by something like:
>
> attrnames <- attr(objname["cluster1"], "names")
                            ^          ^   should be doubled square- 
brackets
> attrnames[c(1, length(attrnames)]
                                  ^  missing right-paren

Might work:
attrnames <- attr(clusobj[["cluster1"]], "names")
attrnames[c(1, length(attrnames))]
--

David Winsemius, MD
West Hartford, CT



------------------------------

Message: 42
Date: Fri, 29 Oct 2010 12:24:13 -0400
From: Christopher Kurby <kurbyc@gvsu.edu>
To: r-help@r-project.org
Subject: [R] Repeated Measures MANOVA
Message-ID: <7E46DD4C-A0E6-45E8-9C80-8306734618C9@gvsu.edu>
Content-Type: text/plain; charset=us-ascii

Hello all,

Is there an r function that exists that will perform repeated measures MANOVAs? 
For example, let's say I have 3 DVs, one between-subjects IV, and one 
within-subjects IV. Based on the documentation for the manova command, a 
function like that below is not appropriate because it cannot take Error 
arguments.

manova(cbind(DV1,DV2,DV3) ~ BetweenSubjectsIV * WithinSubjectsIV + 
Error(SubjNum/WithinSubjectsIV), data=dat)

Do you know of any functions that would allow me to perform such an analysis? I 
realize that I could turn the DVs into levels of a new IV, and then perform a 
standard repeated measures ANOVA. But, I do not feel that would be appropriate 
in this case.

Thanks so much for your time,
Chris


------------------------------

Message: 43
Date: Fri, 29 Oct 2010 18:37:41 +0200
From: Uwe Ligges <ligges@statistik.tu-dortmund.de>
To: John Coulthard <bahhab@hotmail.com>
Cc: r-help@r-project.org
Subject: Re: [R] scatterplot3d; scaling point symbols to depth of
    graph
Message-ID: <4CCAF855.5080404@statistik.tu-dortmund.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I had a look:

I fixed it 5 months ago and forgot to make a new release.
The version on R-forge contains the fix already.

New release on its way to CRAN.

Best wishes;
Uwe


On 28.10.2010 11:28, John Coulthard wrote:
>
> Hi
>
> I'm trying to scale the point symbols on a 3d plot so that the ones at the 
>front are larger than the ones at the back.  I'm trying to give the image some 
>perspective.
>
> Given this code...
>
> library(scatterplot3d)
> data=array(c(0,5,9), c(3,3))
> scatterplot3d(data, pch=19, cex.symbols=10-data[,2], 
>color=c("red","blue","black"));
>> data
>
>
>       [,1] [,2] [,3]
>
>
> [1,]    0    0    0
>
>
> [2,]    5    5    5
>
>
> [3,]    9    9    9
>
>
>
> which gives a vector for  cex.symbols as
>> 10-data[,2]
>
> [1] 10  5  1
>
>
>   I would expect the largest point to be the red one at the origin but
> the image I get has the black symbol at co-ords 9,9,9 as the largest and red at 
>0,0,0 the smallest.
>
> Then if I do...
>> data=array(c(0,9,5), c(3,3))
>> data
>       [,1] [,2] [,3]
> [1,]    0    0    0
> [2,]    9    9    9
> [3,]    5    5    5
>> scatterplot3d(data, pch=19, cex.symbols=10-data[,2], 
>>color=c("red","blue","black"));
>> 10-data[,2]
> [1] 10  1  5
>
> I'd expect the position and size of the points to be the same but the colour of 
>blue and black to be exchanged.  But the size of the points also changes such 
>that the red point at 0,0,0 is the medium size and the black at 5,5,5 is the 
>smallest.
>
> So is it possible to get the points described by each row in data to be scaled 
>by the values in data[,2]?
>
> Many thanks
>
> John
>
>
>
>> sessionInfo()
> R version 2.11.1 (2010-05-31)
> i386-redhat-linux-gnu
>
> locale:
>   [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
>   [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
>   [5] LC_MONETARY=C             LC_MESSAGES=en_US.utf8
>   [7] LC_PAPER=en_US.utf8       LC_NAME=C
>   [9] LC_ADDRESS=C              LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] scatterplot3d_0.3-30
>
> loaded via a namespace (and not attached):
> [1] tools_2.11.1
>
>                           
>     [[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.



------------------------------

Message: 44
Date: Fri, 29 Oct 2010 13:09:08 -0400
From: "John Fox" <jfox@mcmaster.ca>
To: "'Christopher Kurby'" <kurbyc@gvsu.edu>, <r-help@r-project.org>
Subject: Re: [R] Repeated Measures MANOVA
Message-ID: <006601cb778b$ff9d00b0$fed70210$@ca>
Content-Type: text/plain;    charset="us-ascii"

Dear Chris,

See the examples in ?Anova in the car package (but it works with a model fit
by lm).

I hope this helps,
John

--------------------------------
John Fox
Senator William McMaster 
  Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox


> -----Original Message-----
> From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org]
On
> Behalf Of Christopher Kurby
> Sent: October-29-10 12:24 PM
> To: r-help@r-project.org
> Subject: [R] Repeated Measures MANOVA
> 
> Hello all,
> 
> Is there an r function that exists that will perform repeated measures
> MANOVAs? For example, let's say I have 3 DVs, one between-subjects IV, and
> one within-subjects IV. Based on the documentation for the manova command,
a
> function like that below is not appropriate because it cannot take Error
> arguments.
> 
> manova(cbind(DV1,DV2,DV3) ~ BetweenSubjectsIV * WithinSubjectsIV +
> Error(SubjNum/WithinSubjectsIV), data=dat)
> 
> Do you know of any functions that would allow me to perform such an
analysis?
> I realize that I could turn the DVs into levels of a new IV, and then
perform
> a standard repeated measures ANOVA. But, I do not feel that would be
> appropriate in this case.
> 
> Thanks so much for your time,
> Chris
> ______________________________________________
> 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.



------------------------------

Message: 45
Date: Fri, 29 Oct 2010 10:18:22 -0700
From: "Daniel Nordlund" <djnordlund@frontier.com>
To: <r-help@r-project.org>
[[elided Yahoo spam]]
Message-ID: <72C42053BD73435A9362D21A7246D298@Aragorn>
Content-Type: text/plain;    charset="utf-8"

> -----Original Message-----
> From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org]
> On Behalf Of govindas@msu.edu
> Sent: Friday, October 29, 2010 8:33 AM
> To: r-help@r-project.org
[[elided Yahoo spam]]
> 
> 
> 
> Hello all,
> 
> I  am trying to use "clim.pact" package for my work, but since this is
> the  beginning for me to use gridded datasets in "R", I am having some
> trouble.
> 
> I want to do seasonal analyses like   trends, anomalies, variograms, EOF
> and probably kriging too to   downscale my 1 degree gridded data to 0.5.
> So, as a first step, I   compiled my entire dataset (with 25 yeears of
> daily dataset which were   present as 25 files) into a single netcdf file.
> 
> Then, I downloaded clim.pact to do further analysis, which works but
> seems  to change dataset's original dimensions' order for  "retrieve.nc"
> function (i.e. original lon, lat, time order was changed  to time,  lat,
> lon after using this function to get a subset). I am not  sure as  to why
> this happened and not able to get any plots such as box  plot  (showing
> trend in "lon", "lat", "time"), variogram (or variance),   correlation
> analysis done because of this conversion problem.
> 
> Further, basic "R"  functions seem to work well with objects such as
> dataframe, matrix ..etc  with time in a separate column, and the data
> values (precipitation, or  temperature) in a separate coulmn with
> corresponding station values  (lon/lat). So, now I have very little idea
> about what I have to do. Can anyone suggest me a better (probably  more
> refined way) way than what I am currently doing to analyze these  data?
> 
> 
> 
> --
> Regards,
> Mahalakshmi
> Graduate Student
> #20, Department of Geography
> Michigan State University
> East Lansing, MI 48824
>     [[alternative HTML version deleted]]

You should read the posing guide referenced at the bottom of every email.  It 
will tell you how to ask questions and what information you need to provide in 
order to get useful help.  At a minimum, we need a self-contained reproducible 
example that demonstrates the problem you are having.  Provide say 10 
observations and the code you used to subset the data, and maybe someone can 
help you with a solution.

Dan

Daniel Nordlund
Bothell, WA USA



------------------------------

Message: 46
Date: Fri, 29 Oct 2010 13:41:45 -0400
From: Jason Kwok <jaykwok@gmail.com>
To: R Help Mailing List <r-help@r-project.org>
Subject: [R] Plotting 2 Lines on the Same Chart
Message-ID:
    <AANLkTinXhWrdNrKYP5dkK04TEd-eA-px_AOQw6qQ4bX0@mail.gmail.com>
Content-Type: text/plain

How do I plot two time series plots on the same chart?

Thanks,

Jason

    [[alternative HTML version deleted]]



------------------------------

Message: 47
Date: Fri, 29 Oct 2010 10:56:30 -0700 (PDT)
From: Cuckovic Paik <cuckovic.paik@gmail.com>
To: r-help@r-project.org
Subject: Re: [R] Dickey Fuller Test
Message-ID: <1288374990938-3019544.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


[[elided Yahoo spam]]

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Dickey-Fuller-Test-tp3018408p3019544.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 48
Date: Fri, 29 Oct 2010 14:10:24 -0400
From: Gabor Grothendieck <ggrothendieck@gmail.com>
To: Jason Kwok <jaykwok@gmail.com>
Cc: R Help Mailing List <r-help@r-project.org>
Subject: Re: [R] Plotting 2 Lines on the Same Chart
Message-ID:
    <AANLkTin54S4K2Xeo=nwc8STToaDFEnfUdU7LQgV5qp_z@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 29, 2010 at 1:41 PM, Jason Kwok <jaykwok@gmail.com> wrote:
> How do I plot two time series plots on the same chart?
>

Try this:

example(plot.ts)
example(ts.plot)

library(zoo)
example(plot.zoo)
library(lattice)
example(xyplot.zoo)

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



------------------------------

Message: 49
Date: Fri, 29 Oct 2010 14:30:47 -0400
From: Jason Kwok <jaykwok@gmail.com>
To: Gabor Grothendieck <ggrothendieck@gmail.com>
Cc: R Help Mailing List <r-help@r-project.org>
Subject: Re: [R] Plotting 2 Lines on the Same Chart
Message-ID:
    <AANLkTimeMbzayaxtn3oydN2FSK6g9zRKYfX4BmN7fnZm@mail.gmail.com>
Content-Type: text/plain

Thanks.  1 more question.

When I use

Plot(series1)
lines(series2)

The graph will use the y axis scaling for series 1 so some of series 2 is
cut off.  How do I control the y axis scaling?

Thanks,

Jason

On Fri, Oct 29, 2010 at 2:10 PM, Gabor Grothendieck <ggrothendieck@gmail.com
> wrote:

> On Fri, Oct 29, 2010 at 1:41 PM, Jason Kwok <jaykwok@gmail.com> wrote:
> > How do I plot two time series plots on the same chart?
> >
>
> Try this:
>
> example(plot.ts)
> example(ts.plot)
>
> library(zoo)
> example(plot.zoo)
> library(lattice)
> example(xyplot.zoo)
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
>

    [[alternative HTML version deleted]]



------------------------------

Message: 50
Date: Fri, 29 Oct 2010 14:33:48 -0400
From: Gabor Grothendieck <ggrothendieck@gmail.com>
To: Jason Kwok <jaykwok@gmail.com>
Cc: R Help Mailing List <r-help@r-project.org>
Subject: Re: [R] Plotting 2 Lines on the Same Chart
Message-ID:
    <AANLkTikhOG21nRxvdkS0O=5hEpoLpcEe-VDJgMMprrZe@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Oct 29, 2010 at 2:30 PM, Jason Kwok <jaykwok@gmail.com> wrote:
> Thanks.? 1 more question.
>
> When I use
>
> Plot(series1)
> lines(series2)
>
> The graph will use the y axis scaling for series 1 so some of series 2 is
> cut off.? How do I control the y axis scaling?
>

Plot them together as a multivariate series as in the examples already
pointed to.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



------------------------------

Message: 51
Date: Fri, 29 Oct 2010 14:56:09 -0400
From: govindas@msu.edu
To: r-help@r-project.org
Subject: Re: [R] doubt in climate variability analysis in R! - code
    included!
Message-ID: <20101029145609.10176mglqo3ri6kp@mail.msu.edu>
Content-Type: text/plain



the following code was used .... 

library(akima)
library(clim.pact)
nc.1 <- "RF_80-05.nc"
nc.rf.in <- open.ncdf(nc.1)

x1 <- retrieve.nc(nc.1, v.nam="Rainfall",l.scale=FALSE,  x.rng=c(70, 80), 
y.rng=c(10, 13.5))

#dimension is checked for the subset. (lon, lat, time) is changed as (time, lat, 
lon)
>dim(x1$dat)
#[1] 2192    8   20

My question is - how can i convert this array into a dataframe so that i have 
"lat", "lon", "precipitation values" in 3 different columns (note, I will have 
it for just a single day). So, my expected dataframe will have rainfall values 
for each given pair of "lon" and "lat". 


Or is there any other better way to do my spatial variogram analysis for a
single day given the above dataset?

here is the link for the dataset.
HTTP://WWW.4SHARED.COM/FILE/4ZV0G3JR/RF_80-85.HTML

-- 
Regards,
Mahalakshmi
Graduate Student
#20, Department of Geography
Michigan State University
East Lansing, MI 48824 Quoting govindas@msu.edu:

>
>
> Hello all,
>
> I  am trying to use "clim.pact" package for my work, but since this 
> is  the  beginning for me to use gridded datasets in "R", I am having 
> some   trouble.
>
> I want to do seasonal analyses like   trends, anomalies, variograms, 
> EOF and probably kriging too to   downscale my 1 degree gridded data 
> to 0.5.  So, as a first step, I   compiled my entire dataset (with 25 
> yeears of daily dataset which were   present as 25 files) into a 
> single netcdf file.
>
> Then, I downloaded clim.pact to do further analysis, which works but  
> seems  to change dataset's original dimensions' order for  
> "retrieve.nc"   function (i.e. original lon, lat, time order was 
> changed  to time,  lat,  lon after using this function to get a 
> subset). I am not  sure as  to why  this happened and not able to get 
> any plots such as box  plot  (showing  trend in "lon", "lat", 
> "time"), variogram (or variance),   correlation  analysis done 
> because of this conversion problem.
>
> Further, basic "R"  functions seem to work well with objects such as  
>  dataframe, matrix ..etc  with time in a separate column, and the 
> data   values (precipitation, or  temperature) in a separate coulmn 
> with   corresponding station values  (lon/lat). So, now I have very 
> little idea   about what I have to do. Can anyone suggest me a better 
> (probably  more refined way) way than what I am currently doing to 
> analyze these  data?
>
>  
>
> --
> Regards,
> Mahalakshmi
> Graduate Student
> #20, Department of Geography
> Michigan State University
> East Lansing, MI 48824
    [[alternative HTML version deleted]]



------------------------------

Message: 52
Date: Fri, 29 Oct 2010 18:05:51 +0200
From: Anna Radtke <annaradtke2309@googlemail.com>
To: r-help@r-project.org
Subject: [R] Tukey post hoc comparison (glht?) after 3factorial mixed
    model    (lmer)
Message-ID:
    <AANLkTinHhgvo95RzZyEUdF6x6GOrMoMYVz-nEzvyEEt0@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello, dear R-community.

This is a question about TukeyHSD between factor combinations of a Three-Way
ANOVA, which is - since it is a multi measure ANOVA - not a simple ANOVA but
a Generalised Linear Mixed Model (GLMM), calculated with "lmer".

> growth <-
groupedData(length~meas|box_id,outer=~spec*comp*water,data=all.spec)
> model <- lmer(length~spec*comp*water+(meas|box_id),data=growth)
> summary(model)

This works fine. But now, I would like to calculate Tukey HSD among certain
factor combinations. Formerly (before version 1.0), Tukey contrasts
including all levels of interactions could be calculated with the multcomp
package more or less automatically like this:

> summary (glht (model, linfct = mcp (spec*comp*water = "Tukey")))

Now, Mr Hothorn et al. have changed the function and it is "suggestet to the
users that they write out, manually, the set of contrasts they want". I
think that is not a bad idea, but I got problems with the syntax in my case.
And I would really grateful if anybody could help me. So far I tried:

> K <- cbind(0,diag(length(fixef(model))-1))
> rownames(K) <- names(fixef(model))[-1]
> model_glht <- glht(model,linfct=K)
> summary(model_glht)  # but actually this is not what I want

I'm rather looking for a Tukey output like this

specSt:compControl - specSt:compRoot         p that they are equal < 0.05
specSt:compControl - specSt:compShoot
specSt:compControl - specSt:compFull
specSt:compRoot - specSt:compShoot
specSt:compRoot - specSt:compFull
specSt:compShoot - specSt:compFull

and that for each of the 3 studied species, i.e. compare all-pairwise
combinations of the levels of the second factor within each level of the
first factor. We are not interested in the third factor, so data can be
averaged over that.


THANKS A LOT FOR ANY ADVICE, Sincerely

Anna Radtke



-----> model output:

Linear mixed model fit by REML
Formula: length ~ spec * comp * water + (meas | box_id)
   Data: growth
  AIC  BIC logLik deviance REMLdev
4800 4909  -2372     4988    4744
Random effects:
Groups   Name        Variance Std.Dev. Corr
box_id   (Intercept)      0.0   0.000
          meas        222484.2 471.682    NaN
Residual               9439.4  97.157
Number of obs: 360, groups: box_id, 120

Fixed effects:
                            Estimate Std. Error t value
(Intercept)                 -353.554     65.777  -5.375
specSt                      -103.111     93.023  -1.108
specSv                        -4.485     93.023  -0.048
comproot                     -41.686     93.023  -0.448
compshoot                    241.847     93.023   2.600
compxfull                    316.849     93.023   3.406
watermoist                   -48.620     93.023  -0.523
specSt:comproot               97.168    131.554   0.739
specSv:comproot               54.849    131.554   0.417
specSt:compshoot              10.416    131.554   0.079
specSv:compshoot               6.584    131.554   0.050
specSt:compxfull              90.949    131.554   0.691
specSv:compxfull              43.284    131.554   0.329
specSt:watermoist              9.222    131.554   0.070
specSv:watermoist            104.229    131.554   0.792
comproot:watermoist           15.931    131.554   0.121
compshoot:watermoist          28.999    131.554   0.220
compxfull:watermoist          39.363    131.554   0.299
specSt:comproot:watermoist    45.513    186.046   0.245
specSv:comproot:watermoist   -24.350    186.046  -0.131
specSt:compshoot:watermoist   46.027    186.046   0.247
specSv:compshoot:watermoist    1.232    186.046   0.007
specSt:compxfull:watermoist   23.749    186.046   0.128
specSv:compxfull:watermoist  -57.109    186.046  -0.307
-------------- next part --------------
"meas" "spec" "comp" "water" "box_id" "sprouts" "leaves" "length" "long.sprout"
"81" 1 "Sf" "xfull" "moist" 81 6.8 13.6 150.4 43.8
"82" 1 "Sf" "root" "moist" 82 6.5 18.5 104.25 25.75
"83" 1 "Sf" "control" "moist" 83 9.25 29 146 27
"84" 1 "Sf" "control" "moist" 84 6.8 31.4 163.8 46.6
"85" 1 "Sf" "shoot" "moist" 85 4.8 19.8 127.6 32.8
"86" 1 "Sf" "control" "moist" 86 8.2 30.6 144.4 31.6
"87" 1 "Sf" "root" "moist" 87 7.8 32.8 174 38.8
"88" 1 "Sf" "shoot" "moist" 88 5 8.5 54 22.25
"89" 1 "Sf" "xfull" "moist" 89 2.25 7 54.25 27
"90" 1 "Sf" "control" "moist" 90 5.6 21.2 103 30
"91" 1 "Sf" "shoot" "moist" 91 4.25 18 84.25 29.25
"92" 1 "Sf" "root" "moist" 92 5.8 26.4 133.2 33
"93" 1 "Sf" "shoot" "moist" 93 11.25 35.25 215 44.25
"94" 1 "Sf" "root" "moist" 94 6 17.33333333 90.66666667 19.33333333
"95" 1 "Sf" "root" "moist" 95 4.666666667 5.333333333 33.66666667 9.333333333
"96" 1 "Sf" "shoot" "moist" 96 6.5 11.5 88.25 25.5
"97" 1 "Sf" "xfull" "moist" 97 9.8 13 184.4 40.2
"98" 1 "Sf" "xfull" "moist" 98 5.8 15.2 156.6 41.6
"99" 1 "Sf" "control" "moist" 99 7.5 26.5 140.75 36.5
"100" 1 "Sf" "xfull" "moist" 100 4.2 10.4 91 41.2
"101" 1 "Sf" "control" "awater-logged" 101 9 35.8 222.2 43.6
"102" 1 "Sf" "shoot" "awater-logged" 102 10.8 40.6 245.4 47.6
"103" 1 "Sf" "xfull" "awater-logged" 103 4.6 10.6 134.6 47
"104" 1 "Sf" "shoot" "awater-logged" 104 8.2 35.4 263.4 56.2
"105" 1 "Sf" "xfull" "awater-logged" 105 8.4 8 207.8 45.6
"106" 1 "Sf" "control" "awater-logged" 106 8.5 38.5 243.25 45.25
"107" 1 "Sf" "root" "awater-logged" 107 9 41 205 43.2
"108" 1 "Sf" "shoot" "awater-logged" 108 8.4 24.6 170.4 39.2
"109" 1 "Sf" "root" "awater-logged" 109 8.8 29.2 176.4 31.4
"110" 1 "Sf" "control" "awater-logged" 110 7 28.8 167 44
"111" 1 "Sf" "shoot" "awater-logged" 111 10.2 41.2 283.4 50.6
"112" 1 "Sf" "root" "awater-logged" 112 8.6 35.6 211.6 37.4
"113" 1 "Sf" "root" "awater-logged" 113 10.6 39 221 44.6
"114" 1 "Sf" "xfull" "awater-logged" 114 8 11.8 253.6 64.4
"115" 1 "Sf" "shoot" "awater-logged" 115 8.4 25 148 30.6
"116" 1 "Sf" "control" "awater-logged" 116 8.6 37.2 213 46.6
"117" 1 "Sf" "root" "awater-logged" 117 9.8 28 165.4 35.4
"118" 1 "Sf" "xfull" "awater-logged" 118 6.2 2.6 124 34
"119" 1 "Sf" "control" "awater-logged" 119 6.2 25.6 145 39.8
"120" 1 "Sf" "xfull" "awater-logged" 120 8.5 9.75 247.25 62.25
"811" 2 "Sf" "xfull" "moist" 81 4.4 41.6 464.6 217.6
"821" 2 "Sf" "root" "moist" 82 4.6 58.4 800 271.8
"831" 2 "Sf" "control" "moist" 83 7 79.2 967.8 248.8
"841" 2 "Sf" "control" "moist" 84 5.8 68.6 923 256.4
"851" 2 "Sf" "shoot" "moist" 85 4.4 46.4 549.6 263.8
"861" 2 "Sf" "control" "moist" 86 6.8 81.2 1077 309
"871" 2 "Sf" "root" "moist" 87 6.6 72.6 914.8 307.4
"881" 2 "Sf" "shoot" "moist" 88 3 28.25 361 242
"891" 2 "Sf" "xfull" "moist" 89 2.2 19.8 221.8 139.2
"901" 2 "Sf" "control" "moist" 90 5.8 72.4 1038.4 328.6
"911" 2 "Sf" "shoot" "moist" 91 4.5 39 423.25 253.25
"921" 2 "Sf" "root" "moist" 92 4.8 66.8 930.8 296.8
"931" 2 "Sf" "shoot" "moist" 93 7.75 69.5 843 323.25
"941" 2 "Sf" "root" "moist" 94 5.75 56.75 710.75 205
"951" 2 "Sf" "root" "moist" 95 6.666666667 68.33333333 703.6666667 136.3333333
"961" 2 "Sf" "shoot" "moist" 96 4.5 40.5 524.5 235.25
"971" 2 "Sf" "xfull" "moist" 97 4.2 26.4 277.2 159.8
"981" 2 "Sf" "xfull" "moist" 98 2.2 17.6 197.2 143.6
"991" 2 "Sf" "control" "moist" 99 5.8 63.6 660.4 230
"1001" 2 "Sf" "xfull" "moist" 100 2.2 24.8 252.6 179.8
"1011" 2 "Sf" "control" "awater-logged" 101 6.8 87 1356.6 346.6
"1021" 2 "Sf" "shoot" "awater-logged" 102 7.4 73.2 887 350.8
"1031" 2 "Sf" "xfull" "awater-logged" 103 3.8 42 582.4 330
"1041" 2 "Sf" "shoot" "awater-logged" 104 6.2 66.8 818.4 381.8
"1051" 2 "Sf" "xfull" "awater-logged" 105 4.6 28.4 258.8 136
"1061" 2 "Sf" "control" "awater-logged" 106 6.8 78.8 957.8 286
"1071" 2 "Sf" "root" "awater-logged" 107 6.6 85.6 1345.2 351.2
"1081" 2 "Sf" "shoot" "awater-logged" 108 5.6 61 861.6 371
"1091" 2 "Sf" "root" "awater-logged" 109 6.2 71.8 1051.6 337.2
"1101" 2 "Sf" "control" "awater-logged" 110 5.8 67.2 992.4 338
"1111" 2 "Sf" "shoot" "awater-logged" 111 7 74.4 936 362.6
"1121" 2 "Sf" "root" "awater-logged" 112 6.8 110.6 1490.4 369.8
"1131" 2 "Sf" "root" "awater-logged" 113 7.8 89 1328.6 373.8
"1141" 2 "Sf" "xfull" "awater-logged" 114 3.8 28.4 330 165.8
"1151" 2 "Sf" "shoot" "awater-logged" 115 5.8 54 647 301.2
"1161" 2 "Sf" "control" "awater-logged" 116 7 83.4 1332.2 384
"1171" 2 "Sf" "root" "awater-logged" 117 7 83.6 1212 341
"1181" 2 "Sf" "xfull" "awater-logged" 118 4.6 28.2 405.2 193.8
"1191" 2 "Sf" "control" "awater-logged" 119 5.2 70 815.4 271
"1201" 2 "Sf" "xfull" "awater-logged" 120 6 45.25 507 205.75
"812" 3 "Sf" "xfull" "moist" 81 3.4 38.4 635.6 387.8
"822" 3 "Sf" "root" "moist" 82 4.8 64.2 1163 441.2
"832" 3 "Sf" "control" "moist" 83 5.2 78.2 1470.4 481.2
"842" 3 "Sf" "control" "moist" 84 4 72.2 1401.8 499.4
"852" 3 "Sf" "shoot" "moist" 85 2.4 40.8 797.8 519.2
"862" 3 "Sf" "control" "moist" 86 4.8 80.8 1562.6 563.6
"872" 3 "Sf" "root" "moist" 87 3.4 57.8 1224.8 499.4
"882" 3 "Sf" "shoot" "moist" 88 2.6 30 565 430
"892" 3 "Sf" "xfull" "moist" 89 2 25.4 435.2 362.4
"902" 3 "Sf" "control" "moist" 90 3.8 68.4 1353.8 508.4
"912" 3 "Sf" "shoot" "moist" 91 3.25 34.5 593 465.5
"922" 3 "Sf" "root" "moist" 92 4.6 73.8 1406.4 495.8
"932" 3 "Sf" "shoot" "moist" 93 3 43.4 873.2 516.6
"942" 3 "Sf" "root" "moist" 94 5 72.75 1301.25 457
"952" 3 "Sf" "root" "moist" 95 6.333333333 90.33333333 1401.333333 350.6666667
"962" 3 "Sf" "shoot" "moist" 96 2.25 39.75 738.25 433.75
"972" 3 "Sf" "xfull" "moist" 97 3.6 35.6 428.2 281
"982" 3 "Sf" "xfull" "moist" 98 3.4 28.8 412.6 303.8
"992" 3 "Sf" "control" "moist" 99 4.8 89.4 1151.4 443.8
"1002" 3 "Sf" "xfull" "moist" 100 2.2 29.2 467.4 377
"1012" 3 "Sf" "control" "awater-logged" 101 6 83.6 1659.4 473.2
"1022" 3 "Sf" "shoot" "awater-logged" 102 3.4 56.2 1122.4 566.2
"1032" 3 "Sf" "xfull" "awater-logged" 103 2.8 46.4 882.4 633.2
"1042" 3 "Sf" "shoot" "awater-logged" 104 4 58.8 1052.8 636.4
"1052" 3 "Sf" "xfull" "awater-logged" 105 3.6 40.6 516.6 345
"1062" 3 "Sf" "control" "awater-logged" 106 4.6 71.6 1441 509.8
"1072" 3 "Sf" "root" "awater-logged" 107 5.4 92.6 1879 609
"1082" 3 "Sf" "shoot" "awater-logged" 108 2.2 46.8 1038.8 639.2
"1092" 3 "Sf" "root" "awater-logged" 109 5.4 73.6 1364.8 538.4
"1102" 3 "Sf" "control" "awater-logged" 110 4.4 80.4 1382.6 548.6
"1112" 3 "Sf" "shoot" "awater-logged" 111 3.4 67.6 1403.4 632.4
"1122" 3 "Sf" "root" "awater-logged" 112 6.4 103.6 1917.2 504.2
"1132" 3 "Sf" "root" "awater-logged" 113 5 89.8 1817.8 606
"1142" 3 "Sf" "xfull" "awater-logged" 114 2.2 27.8 424.8 347
"1152" 3 "Sf" "shoot" "awater-logged" 115 1.6 30.8 646 523.4
"1162" 3 "Sf" "control" "awater-logged" 116 5.2 84.4 1804.8 598.2
"1172" 3 "Sf" "root" "awater-logged" 117 5.8 80 1388.4 461.2
"1182" 3 "Sf" "xfull" "awater-logged" 118 3.4 42.8 630.4 341.4
"1192" 3 "Sf" "control" "awater-logged" 119 3.8 82.4 1276.8 541.6
"1202" 3 "Sf" "xfull" "awater-logged" 120 3.75 57 870.75 483.75
"1" 1 "Sv" "control" "moist" 1 8.8 37.8 211.2 60.6
"2" 1 "Sv" "xfull" "moist" 2 7 8 174.8 62.8
"3" 1 "Sv" "control" "moist" 3 9 42 255.2 66
"4" 1 "Sv" "root" "moist" 4 7.8 35 225.8 78.2
"5" 1 "Sv" "root" "moist" 5 7.8 31.4 182.6 59.4
"6" 1 "Sv" "shoot" "moist" 6 8.8 50.8 247.6 53.4
"7" 1 "Sv" "root" "moist" 7 7 26.2 169.2 63
"8" 1 "Sv" "xfull" "moist" 8 4.6 4 71.8 35.8
"9" 1 "Sv" "root" "moist" 9 8.8 40 246.8 69.4
"10" 1 "Sv" "shoot" "moist" 10 8 48.2 266.8 67.6
"11" 1 "Sv" "control" "moist" 11 15 71.8 380.2 53.6
"12" 1 "Sv" "shoot" "moist" 12 10.4 41.2 271.8 58.6
"13" 1 "Sv" "shoot" "moist" 13 8.2 44 243.8 53.4
"14" 1 "Sv" "xfull" "moist" 14 6.2 10 171.6 67.2
"15" 1 "Sv" "root" "moist" 15 9.6 42.2 187.6 57.8
"16" 1 "Sv" "xfull" "moist" 16 6.2 7.8 164 63.6
"17" 1 "Sv" "control" "moist" 17 11 53.4 262.4 59.6
"18" 1 "Sv" "control" "moist" 18 8.8 45 245.4 63.8
"19" 1 "Sv" "xfull" "moist" 19 6.2 7.4 161 61.6
"20" 1 "Sv" "shoot" "moist" 20 9.4 38.4 209 74.8
"21" 1 "Sv" "root" "awater-logged" 21 8.6 42 252 75.2
"22" 1 "Sv" "shoot" "awater-logged" 22 7.8 34.8 238.8 80.8
"23" 1 "Sv" "control" "awater-logged" 23 9.75 37.25 182.25 55.5
"24" 1 "Sv" "control" "awater-logged" 24 8.2 51 287.2 77.8
"25" 1 "Sv" "control" "awater-logged" 25 8.5 45.25 290.5 85
"26" 1 "Sv" "xfull" "awater-logged" 26 8.8 11.6 204.4 58.8
"27" 1 "Sv" "shoot" "awater-logged" 27 6.6 22 138.6 68.6
"28" 1 "Sv" "shoot" "awater-logged" 28 10.4 34.4 225.2 70
"29" 1 "Sv" "root" "awater-logged" 29 5 22.4 113.4 60.2
"30" 1 "Sv" "control" "awater-logged" 30 7.4 38 220.4 73.8
"31" 1 "Sv" "xfull" "awater-logged" 31 7.6 5 143.8 54.8
"32" 1 "Sv" "xfull" "awater-logged" 32 3.6 10.2 124.6 74.2
"33" 1 "Sv" "xfull" "awater-logged" 33 7.2 6 162.6 60.8
"34" 1 "Sv" "shoot" "awater-logged" 34 7.4 26.4 210.4 86.2
"35" 1 "Sv" "root" "awater-logged" 35 8.6 34.8 257.6 81.6
"36" 1 "Sv" "root" "awater-logged" 36 9.4 31 196.2 70.4
"37" 1 "Sv" "root" "awater-logged" 37 6.8 34.2 204.4 85.4
"38" 1 "Sv" "xfull" "awater-logged" 38 7.2 6.6 151.6 66
"39" 1 "Sv" "shoot" "awater-logged" 39 7.6 39.6 227.4 63.8
"40" 1 "Sv" "control" "awater-logged" 40 8.4 51.6 257.6 78.6
"41" 2 "Sv" "control" "moist" 1 5.4 100.8 1104.4 392.6
"42" 2 "Sv" "xfull" "moist" 2 5.2 33.6 404.4 182.4
"43" 2 "Sv" "control" "moist" 3 6.4 108.6 1060 364.2
"44" 2 "Sv" "root" "moist" 4 5 91.4 1017.6 394.4
"45" 2 "Sv" "root" "moist" 5 5.2 78.4 772.4 312.4
"46" 2 "Sv" "shoot" "moist" 6 5.6 77.6 775.6 318
"47" 2 "Sv" "root" "moist" 7 4.6 73.2 730.2 314.4
"48" 2 "Sv" "xfull" "moist" 8 3.6 17.4 238.8 136.6
"49" 2 "Sv" "root" "moist" 9 4.6 94.2 980.4 366.8
"50" 2 "Sv" "shoot" "moist" 10 7.75 96.5 876.25 327
"51" 2 "Sv" "control" "moist" 11 10 127.2 1209.6 327.2
"52" 2 "Sv" "shoot" "moist" 12 7.4 83.4 818.6 314
"53" 2 "Sv" "shoot" "moist" 13 6.8 83.8 812.4 283.6
"54" 2 "Sv" "xfull" "moist" 14 3.8 29.8 325 183.4
"55" 2 "Sv" "root" "moist" 15 4.6 72.2 734.8 378
"56" 2 "Sv" "xfull" "moist" 16 2.6 24.4 282 189
"57" 2 "Sv" "control" "moist" 17 8 124.6 1246.8 371.4
"58" 2 "Sv" "control" "moist" 18 4.4 84.4 1061.4 377.2
"59" 2 "Sv" "xfull" "moist" 19 4.2 29 353.8 193.4
"60" 2 "Sv" "shoot" "moist" 20 5.6 74.4 743.2 378.8
"61" 2 "Sv" "root" "awater-logged" 21 6.6 93.6 912.4 351.6
"62" 2 "Sv" "shoot" "awater-logged" 22 4 62 714.8 401
"63" 2 "Sv" "control" "awater-logged" 23 5 82 881.6 323.2
"64" 2 "Sv" "control" "awater-logged" 24 5.6 110.8 1264.8 424.8
"65" 2 "Sv" "control" "awater-logged" 25 5.8 89.6 930.8 346.2
"66" 2 "Sv" "xfull" "awater-logged" 26 4 39.6 455.2 268.8
"67" 2 "Sv" "shoot" "awater-logged" 27 3.4 55.4 614.6 384.2
"68" 2 "Sv" "shoot" "awater-logged" 28 5.4 71 698 320.6
"69" 2 "Sv" "root" "awater-logged" 29 3 66.4 757.4 427.8
"70" 2 "Sv" "control" "awater-logged" 30 4.8 83 990.4 413.4
"71" 2 "Sv" "xfull" "awater-logged" 31 3.2 23.2 300.6 238.8
"72" 2 "Sv" "xfull" "awater-logged" 32 1.4 24.6 210.8 192.8
"73" 2 "Sv" "xfull" "awater-logged" 33 3.2 28.6 344.8 185.8
"74" 2 "Sv" "shoot" "awater-logged" 34 3.6 59.6 631 402
"75" 2 "Sv" "root" "awater-logged" 35 5.2 86.4 826.4 289.8
"76" 2 "Sv" "root" "awater-logged" 36 7.2 87.4 918.8 351
"77" 2 "Sv" "root" "awater-logged" 37 4.2 84.8 840 422
"78" 2 "Sv" "xfull" "awater-logged" 38 2.4 29.8 355.6 239.6
"79" 2 "Sv" "shoot" "awater-logged" 39 6.2 71.2 683.8 282
"80" 2 "Sv" "control" "awater-logged" 40 5.4 106.4 1083.6 388.6
"813" 3 "Sv" "control" "moist" 1 5.2 149.6 1863.8 682
"823" 3 "Sv" "xfull" "moist" 2 2.5 42.25 427.5 344.5
"833" 3 "Sv" "control" "moist" 3 4.2 134 1496.2 572
"843" 3 "Sv" "root" "moist" 4 3.6 121 1488.8 706.8
"853" 3 "Sv" "root" "moist" 5 4 115 1340.2 587.2
"863" 3 "Sv" "shoot" "moist" 6 2.6 80 976 613.2
"873" 3 "Sv" "root" "moist" 7 3.6 94.4 1187.2 555
"883" 3 "Sv" "xfull" "moist" 8 3.5 41.75 367 195.5
"893" 3 "Sv" "root" "moist" 9 3.6 120.2 1450.4 630.6
"903" 3 "Sv" "shoot" "moist" 10 2.6 85 1007.2 586
"913" 3 "Sv" "control" "moist" 11 4 118.8 1386 626.6
"923" 3 "Sv" "shoot" "moist" 12 2.2 72.4 942.6 578.4
"933" 3 "Sv" "shoot" "moist" 13 2.2 80.6 957.6 606
"943" 3 "Sv" "xfull" "moist" 14 1.25 27 308 297
"953" 3 "Sv" "root" "moist" 15 2.6 85.8 1080.2 676.8
"963" 3 "Sv" "xfull" "moist" 16 1.666666667 41 475.6666667 374
"973" 3 "Sv" "control" "moist" 17 4.4 148 1795.6 681.8
"983" 3 "Sv" "control" "moist" 18 3.4 107.8 1484.4 653.6
"993" 3 "Sv" "xfull" "moist" 19 2.4 49.8 450.6 326.2
"1003" 3 "Sv" "shoot" "moist" 20 2.8 73.6 896.2 663.8
"1013" 3 "Sv" "root" "awater-logged" 21 4.8 119 1431.6 585
"1023" 3 "Sv" "shoot" "awater-logged" 22 1.8 61.2 896.8 654
"1033" 3 "Sv" "control" "awater-logged" 23 4.6 123.8 1471.6 552
"1043" 3 "Sv" "control" "awater-logged" 24 5 144 1906.6 734.2
"1053" 3 "Sv" "control" "awater-logged" 25 3.4 107.8 1388.4 639
"1063" 3 "Sv" "xfull" "awater-logged" 26 1.8 53.2 586.8 439.4
"1073" 3 "Sv" "shoot" "awater-logged" 27 1.8 68.4 910.6 704.4
"1083" 3 "Sv" "shoot" "awater-logged" 28 3.4 88.2 1092 615
"1093" 3 "Sv" "root" "awater-logged" 29 2.8 101.2 1342.8 740.4
"1103" 3 "Sv" "control" "awater-logged" 30 4 125.4 1556.6 769.6
"1113" 3 "Sv" "xfull" "awater-logged" 31 2 52.2 534.8 451
"1123" 3 "Sv" "xfull" "awater-logged" 32 1.8 40.4 428.6 375.6
"1133" 3 "Sv" "xfull" "awater-logged" 33 2 41.2 420.6 295.6
"1143" 3 "Sv" "shoot" "awater-logged" 34 1.8 74.6 978.8 760.6
"1153" 3 "Sv" "root" "awater-logged" 35 4 110.8 1262.8 494.4
"1163" 3 "Sv" "root" "awater-logged" 36 6.4 129.2 1518.8 590.4
"1173" 3 "Sv" "root" "awater-logged" 37 4.6 124.6 1389.8 746
"1183" 3 "Sv" "xfull" "awater-logged" 38 2 39 472.6 398.4
"1193" 3 "Sv" "shoot" "awater-logged" 39 1.6 59.8 809.4 576.4
"1203" 3 "Sv" "control" "awater-logged" 40 4.4 134.6 1622.6 664.4
"413" 1 "St" "root" "moist" 41 4.6 17.6 83 35.2
"423" 1 "St" "xfull" "moist" 42 3 4.6 29.6 15.6
"433" 1 "St" "root" "moist" 43 5.333333333 26.33333333 110.3333333 52.33333333
"443" 1 "St" "control" "moist" 44 8 38 187 63.4
"453" 1 "St" "control" "moist" 45 5.6 23.8 96.4 38.8
"463" 1 "St" "root" "moist" 46 7.5 18.75 92.25 33
"473" 1 "St" "xfull" "moist" 47 6.333333333 8 73 23
"483" 1 "St" "shoot" "moist" 48 6.4 20.6 93.4 22.4
"493" 1 "St" "xfull" "moist" 49 6 2.6 63 15
"503" 1 "St" "xfull" "moist" 50 5.4 2.8 56.4 21.2
"513" 1 "St" "shoot" "moist" 51 8 24.33333333 117 42.33333333
"523" 1 "St" "shoot" "moist" 52 7 13.4 80 25.8
"533" 1 "St" "root" "moist" 53 4.5 16 66.25 31
"543" 1 "St" "control" "moist" 54 6.8 19.4 83.8 32.6
"553" 1 "St" "control" "moist" 55 9.25 36.75 158.5 34.25
"563" 1 "St" "control" "moist" 56 5.2 18.2 97.6 39
"573" 1 "St" "shoot" "moist" 57 6.25 12.75 55.75 25
"583" 1 "St" "shoot" "moist" 58 6.333333333 30.66666667 131.3333333 39
"593" 1 "St" "xfull" "moist" 59 5.8 7.8 69.2 28.6
"603" 1 "St" "root" "moist" 60 5 19.8 84 27.6
"613" 1 "St" "xfull" "awater-logged" 61 6.2 3.2 73.4 21
"623" 1 "St" "control" "awater-logged" 62 7.2 15 89.2 32
"633" 1 "St" "shoot" "awater-logged" 63 6.5 15.25 85.25 35
"643" 1 "St" "root" "awater-logged" 64 4.666666667 18.66666667 99 40.33333333
"653" 1 "St" "control" "awater-logged" 65 5.8 16.8 75.8 26.2
"663" 1 "St" "xfull" "awater-logged" 66 5.666666667 4 62.33333333 28.33333333
"673" 1 "St" "control" "awater-logged" 67 9 33.25 120 37
"683" 1 "St" "root" "awater-logged" 68 6 16 70 24.25
"693" 1 "St" "shoot" "awater-logged" 69 7 15.4 71.6 31.4
"703" 1 "St" "xfull" "awater-logged" 70 5.2 1.2 57.4 23.6
"713" 1 "St" "control" "awater-logged" 71 7.25 23.5 114 33
"723" 1 "St" "shoot" "awater-logged" 72 6.75 30.5 125 40.75
"733" 1 "St" "shoot" "awater-logged" 73 7.25 13.75 81.5 29.5
"743" 1 "St" "root" "awater-logged" 74 8.2 18.2 89.8 35.6
"753" 1 "St" "shoot" "awater-logged" 75 5.6 15.8 69.6 29.4
"763" 1 "St" "control" "awater-logged" 76 7.4 27.8 100.2 28.8
"773" 1 "St" "root" "awater-logged" 77 6.4 15.4 79.2 36
"783" 1 "St" "xfull" "awater-logged" 78 6.2 0.6 42.6 13.4
"793" 1 "St" "xfull" "awater-logged" 79 3.8 3.8 46.4 22.6
"803" 1 "St" "root" "awater-logged" 80 5.2 26 92.4 25.6
"411" 2 "St" "root" "moist" 41 3 45.6 658.4 364.8
"421" 2 "St" "xfull" "moist" 42 3.4 9.2 130 93.2
"431" 2 "St" "root" "moist" 43 3.25 36 520.75 382.25
"441" 2 "St" "control" "moist" 44 5.6 68.2 966.2 456.4
"451" 2 "St" "control" "moist" 45 4.8 60.4 765.4 347.8
"461" 2 "St" "root" "moist" 46 6.8 57.2 631.4 282.8
"471" 2 "St" "xfull" "moist" 47 4.8 10 133.8 50.8
"481" 2 "St" "shoot" "moist" 48 6.6 61.2 547.4 233.6
"491" 2 "St" "xfull" "moist" 49 7.6 24.6 241.2 88
"501" 2 "St" "xfull" "moist" 50 5.4 19.4 138.2 43
"511" 2 "St" "shoot" "moist" 51 5 42.4 353.8 188
"521" 2 "St" "shoot" "moist" 52 4.6 39.2 417 256
"531" 2 "St" "root" "moist" 53 3.75 51 607.75 298.25
"541" 2 "St" "control" "moist" 54 6.2 66.8 771.4 303.4
"551" 2 "St" "control" "moist" 55 7 79 998 398
"561" 2 "St" "control" "moist" 56 4.6 58.8 782.4 365
"571" 2 "St" "shoot" "moist" 57 4.4 37.6 331 143
"581" 2 "St" "shoot" "moist" 58 4.25 44.25 466.5 261.25
"591" 2 "St" "xfull" "moist" 59 6.6 18.8 160.6 64.6
"601" 2 "St" "root" "moist" 60 3.8 49 668.8 311
"611" 2 "St" "xfull" "awater-logged" 61 6 17.8 204.2 96.4
"621" 2 "St" "control" "awater-logged" 62 4.2 56.8 800.4 353.6
"631" 2 "St" "shoot" "awater-logged" 63 3.5 45 534 305
"641" 2 "St" "root" "awater-logged" 64 4.666666667 61.33333333 665.6666667
338.6666667
"651" 2 "St" "control" "awater-logged" 65 4.2 58.8 759 323.2
"661" 2 "St" "xfull" "awater-logged" 66 4.5 14.25 171 97
"671" 2 "St" "control" "awater-logged" 67 5.5 72 851.5 363
"681" 2 "St" "root" "awater-logged" 68 5.75 62.75 616.75 262.25
"691" 2 "St" "shoot" "awater-logged" 69 3.2 41.6 587.8 415.4
"701" 2 "St" "xfull" "awater-logged" 70 3.8 14 141.4 79.8
"711" 2 "St" "control" "awater-logged" 71 4.2 57 774 298.2
"721" 2 "St" "shoot" "awater-logged" 72 3.8 41.4 468.4 227.2
"731" 2 "St" "shoot" "awater-logged" 73 3.75 42.25 492.25 235
"741" 2 "St" "root" "awater-logged" 74 4.4 52.4 691.2 342
"751" 2 "St" "shoot" "awater-logged" 75 2.4 30.6 379.4 294.2
"761" 2 "St" "control" "awater-logged" 76 6.6 80.2 966.6 340.6
"771" 2 "St" "root" "awater-logged" 77 3.4 38 526.8 361.2
"781" 2 "St" "xfull" "awater-logged" 78 4.6 17.4 198.2 107.4
"791" 2 "St" "xfull" "awater-logged" 79 3 14.2 166.6 104.4
"801" 2 "St" "root" "awater-logged" 80 5.4 63.8 636.6 292.6
"412" 3 "St" "root" "moist" 41 2.6 60.6 1161 617.6
"422" 3 "St" "xfull" "moist" 42 3.4 16.8 313.8 250.6
"432" 3 "St" "root" "moist" 43 2.75 46 906 707.25
"442" 3 "St" "control" "moist" 44 3 74.8 1550.4 742.4
"452" 3 "St" "control" "moist" 45 3.8 73 1324.6 627.6
"462" 3 "St" "root" "moist" 46 4.4 62.2 1096 496.4
"472" 3 "St" "xfull" "moist" 47 3.2 13.8 133.6 64.4
"482" 3 "St" "shoot" "moist" 48 3.2 53 776.8 447.2
"492" 3 "St" "xfull" "moist" 49 3.8 21.4 303.4 239.6
"502" 3 "St" "xfull" "moist" 50 7.5 18.75 207.5 58
"512" 3 "St" "shoot" "moist" 51 4.6 56.8 689 421.8
"522" 3 "St" "shoot" "moist" 52 1.6 34.6 640.4 575.8
"532" 3 "St" "root" "moist" 53 3.75 67.5 1164.25 586.75
"542" 3 "St" "control" "moist" 54 3 73.4 1325 617.2
"552" 3 "St" "control" "moist" 55 4.75 99 1730.75 678
"562" 3 "St" "control" "moist" 56 3.6 75.4 1386.6 713.8
"572" 3 "St" "shoot" "moist" 57 2.25 31 463.5 343
"582" 3 "St" "shoot" "moist" 58 2.5 47 799 551.5
"592" 3 "St" "xfull" "moist" 59 5.5 14.5 243 155
"602" 3 "St" "root" "moist" 60 2.8 55.6 1086.6 513
"612" 3 "St" "xfull" "awater-logged" 61 5.4 27 345 220
"622" 3 "St" "control" "awater-logged" 62 4 80.4 1154.4 496.2
"632" 3 "St" "shoot" "awater-logged" 63 2.25 50.5 835.5 425.25
"642" 3 "St" "root" "awater-logged" 64 4.333333333 83.33333333 1354.333333
551.6666667
"652" 3 "St" "control" "awater-logged" 65 4 71.4 1351.4 576.4
"662" 3 "St" "xfull" "awater-logged" 66 3.75 17 224.5 160.25
"672" 3 "St" "control" "awater-logged" 67 4.25 78.5 1268.5 549.75
"682" 3 "St" "root" "awater-logged" 68 5.25 92.75 1189.5 462
"692" 3 "St" "shoot" "awater-logged" 69 2.2 45 865.6 642.8
"702" 3 "St" "xfull" "awater-logged" 70 3.6 22.4 246.2 181.6
"712" 3 "St" "control" "awater-logged" 71 3.8 74.6 1284 545.4
"722" 3 "St" "shoot" "awater-logged" 72 2.2 42.2 647 405.2
"732" 3 "St" "shoot" "awater-logged" 73 2.25 47.25 798.75 491.75
"742" 3 "St" "root" "awater-logged" 74 3 61 1105.8 551.4
"752" 3 "St" "shoot" "awater-logged" 75 1.8 36.6 585.8 534.4
"762" 3 "St" "control" "awater-logged" 76 5.8 98 1633.8 640.4
"772" 3 "St" "root" "awater-logged" 77 3.4 51.6 876.8 572.6
"782" 3 "St" "xfull" "awater-logged" 78 4.8 25.6 295.6 175.6
"792" 3 "St" "xfull" "awater-logged" 79 2.6 21.4 295.2 228.2
"802" 3 "St" "root" "awater-logged" 80 4 72.2 1072.8 576

------------------------------

Message: 53
Date: Fri, 29 Oct 2010 09:46:25 -0700 (PDT)
From: DM2010 <djlmax2008@googlemail.com>
To: r-help@r-project.org
Subject: [R] Memory use in R
Message-ID: <1288370785280-3019447.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Dear R Users

I have two questions about how R makes use of memory on a Windows computer.

On my machine certain R jobs seem to stop with messages such as...
"Error: cannot allocate vector of size 215.0 Mb"
...when, according to Windows Task Manager, there are still hundreds of
megabytes of physical memory available. These jobs usually stop when the
peak commit charge is around 2.6GB (in Windows-speak the "commit charge" is
all the memory allocated by system, drivers, applications etc.).

Machine characteristics

Processor: Pentium-D
4GB of installed memory (Task Manager reports 3584MB = 4GB - 512MB total
memory)
Windows booted with /3GB switch
R started with --max-mem-size=3071M
memory.limit() as reported by R: 3071

My questions are:
1. When it starts, does R ask the system to allocate memory for it in a
single chunk?
2. Can R allocate memory either side of the system-preallocated memory in
the middle of address space?

Best wishes

David Max
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Memory-use-in-R-tp3019447p3019447.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 54
Date: Fri, 29 Oct 2010 16:20:54 -0400
From: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
To: r-help <r-help@r-project.org>
Subject: Re: [R] help pages do not open
Message-ID:
    <AANLkTim_y+UY1N2ofLrUfO=2qVkLRw-O_k40ZpO1tQTw@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I tried one more thing - I uninstalled R again, and this time
installed it under:
C:\Users\Myname\R\R-2.12.0
And again - am gettting the same error:
Error in shell.exec(url) :
  access to 'http://127.0.0.1:30111/library/stats/html/lm.html' denied

[[elided Yahoo spam]]
Dimitri

On Fri, Oct 29, 2010 at 9:22 AM, Dimitri Liakhovitski
<dimitri.liakhovitski@gmail.com> wrote:
> I have just installed R-2.12
> I have Windows 7, 64-bit verison.
> I currently have IE as my default browser. The internet connection is very 
>good.
>
> Whenever I try to run a help command (?lm, for example), I get this error:
> Error in shell.exec(url) : access to
> 'http://127.0.0.1:20271/library/stats/html/lm.html' denied
>
> I first got this message when Google Chrome was my default browser.
> For some reason, Google Chrome stopped opening web pages. At the same
> time R11 stopped showing help pages. Then, I uninstalled Google Chrome
> and defined IE as my default browser. Then, I uninstalled R11 and
> installed R12 instead. But I am getting the same error.
>
> Any advice?
>
>
> --
> Dimitri Liakhovitski
> Ninah Consulting
> www.ninah.com
>



-- 
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com



------------------------------

Message: 55
Date: Fri, 29 Oct 2010 16:24:17 -0400
From: ANJAN PURKAYASTHA <anjan.purkayastha@gmail.com>
To: r-help@r-project.org
Subject: [R] One-class SVM
Message-ID:
    <AANLkTi=m4J4JZsjruNmPMp--pF2MEC_VckcKP895NnDm@mail.gmail.com>
Content-Type: text/plain

Does any R package support one-class SVM?
I'm trying to develop an application to detect anomalies in genome
sequencing.
Thanks in advance.
Anjan

-- 
===================================
anjan purkayastha, phd.
research associate
fas center for systems biology,
harvard university
52 oxford street
cambridge ma 02138
phone-703.740.6939
===================================

    [[alternative HTML version deleted]]



------------------------------

Message: 56
Date: Fri, 29 Oct 2010 16:34:09 -0400
From: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
To: r-help <r-help@r-project.org>
Subject: Re: [R] help pages do not open
Message-ID:
    <AANLkTikjekq_+LNP04Asth9iaU84-93UYjKmNi2S87YF@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Problem solved. It turned out I had to reset my IE as my default
[[elided Yahoo spam]]
Dimitri

On Fri, Oct 29, 2010 at 4:20 PM, Dimitri Liakhovitski
<dimitri.liakhovitski@gmail.com> wrote:
> I tried one more thing - I uninstalled R again, and this time
> installed it under:
> C:\Users\Myname\R\R-2.12.0
> And again - am gettting the same error:
> Error in shell.exec(url) :
> ?access to 'http://127.0.0.1:30111/library/stats/html/lm.html' denied
>
[[elided Yahoo spam]]
> Dimitri
>
> On Fri, Oct 29, 2010 at 9:22 AM, Dimitri Liakhovitski
> <dimitri.liakhovitski@gmail.com> wrote:
>> I have just installed R-2.12
>> I have Windows 7, 64-bit verison.
>> I currently have IE as my default browser. The internet connection is very 
>>good.
>>
>> Whenever I try to run a help command (?lm, for example), I get this error:
>> Error in shell.exec(url) : access to
>> 'http://127.0.0.1:20271/library/stats/html/lm.html' denied
>>
>> I first got this message when Google Chrome was my default browser.
>> For some reason, Google Chrome stopped opening web pages. At the same
>> time R11 stopped showing help pages. Then, I uninstalled Google Chrome
>> and defined IE as my default browser. Then, I uninstalled R11 and
>> installed R12 instead. But I am getting the same error.
>>
>> Any advice?
>>
>>
>> --
>> Dimitri Liakhovitski
>> Ninah Consulting
>> www.ninah.com
>>
>
>
>
> --
> Dimitri Liakhovitski
> Ninah Consulting
> www.ninah.com
>



-- 
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com



------------------------------

Message: 57
Date: Fri, 29 Oct 2010 13:36:34 -0700
From: Joshua Wiley <jwiley.psych@gmail.com>
To: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
Cc: r-help <r-help@r-project.org>
Subject: Re: [R] help pages do not open
Message-ID:
    <AANLkTino1PDKaUOVxiAM8jwfywJUCptn-9XW+UGNWjgU@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi Dimitri,

The help pages should be loaded from a local server (which is
corroborated by the 127...ip), so the internet connection should not
matter.

I would check whether IE is the default application for .html
extensions, and you could also try running R as an admin (though I do
not really think that should matter here).

Cheers,

Josh

On Fri, Oct 29, 2010 at 1:20 PM, Dimitri Liakhovitski
<dimitri.liakhovitski@gmail.com> wrote:
> I tried one more thing - I uninstalled R again, and this time
> installed it under:
> C:\Users\Myname\R\R-2.12.0
> And again - am gettting the same error:
> Error in shell.exec(url) :
> ?access to 'http://127.0.0.1:30111/library/stats/html/lm.html' denied
>
[[elided Yahoo spam]]
> Dimitri
>
> On Fri, Oct 29, 2010 at 9:22 AM, Dimitri Liakhovitski
> <dimitri.liakhovitski@gmail.com> wrote:
>> I have just installed R-2.12
>> I have Windows 7, 64-bit verison.
>> I currently have IE as my default browser. The internet connection is very 
>>good.
>>
>> Whenever I try to run a help command (?lm, for example), I get this error:
>> Error in shell.exec(url) : access to
>> 'http://127.0.0.1:20271/library/stats/html/lm.html' denied
>>
>> I first got this message when Google Chrome was my default browser.
>> For some reason, Google Chrome stopped opening web pages. At the same
>> time R11 stopped showing help pages. Then, I uninstalled Google Chrome
>> and defined IE as my default browser. Then, I uninstalled R11 and
>> installed R12 instead. But I am getting the same error.
>>
>> Any advice?
>>
>>
>> --
>> Dimitri Liakhovitski
>> Ninah Consulting
>> www.ninah.com
>>
>
>
>
> --
> Dimitri Liakhovitski
> Ninah Consulting
> www.ninah.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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



------------------------------

Message: 58
Date: Fri, 29 Oct 2010 16:45:00 -0400
From: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
To: r-help <r-help@r-project.org>
Subject: [R] R version 2-12.0 - running as 32 or as 64 bit?
Message-ID:
    <AANLkTimztLtia77bo8wmwnt-G3vij6SaL4qNXq4xcZBV@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC.
When I was installing it, it did not ask me anything about 32 vs. 64 bit.
So, if I run R now - is it running as a 32-bit or a 64-bit?

thank you!

-- 
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com



------------------------------

Message: 59
Date: Sat, 30 Oct 2010 05:02:12 +0800
From: Berwin A Turlach <berwin@maths.uwa.edu.au>
To: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
Cc: r-help <r-help@r-project.org>
Subject: Re: [R] R version 2-12.0 - running as 32 or as 64 bit?
Message-ID: <20101030050212.781f25f5@goodenia>
Content-Type: text/plain; charset=US-ASCII

G'day Dimitri,

On Fri, 29 Oct 2010 16:45:00 -0400
Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com> wrote:

> Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC.
> When I was installing it, it did not ask me anything about 32 vs. 64
> bit. So, if I run R now - is it running as a 32-bit or a 64-bit?

Well, when I did the same, I got two shortcuts installed on my desktop,
one named R 2.12.0 and the other named R x64 2.12.0.  If I had any
doubts which version of R these shortcuts would start, then the fourth
line of the start-up message would put them to rest.  Missing that
message, you can always issue the command

> .Machine$sizeof.pointer

if the answer is 4, you are running 32bit, if the answer is 8, then you
are running 64 bit.

HTH.

Cheers,
        
    Berwin

========================== Full address ============================
Berwin A Turlach                      Tel.: +61 (8) 6488 3338 (secr)
School of Maths and Stats (M019)            +61 (8) 6488 3383 (self)
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                  
Crawley WA 6009                e-mail: berwin@maths.uwa.edu.au
Australia                        http://www.maths.uwa.edu.au/~berwin



------------------------------

Message: 60
Date: Fri, 29 Oct 2010 17:02:34 -0400
From: Steve Lianoglou <mailinglist.honeypot@gmail.com>
To: ANJAN PURKAYASTHA <anjan.purkayastha@gmail.com>
Cc: r-help@r-project.org
Subject: Re: [R] One-class SVM
Message-ID:
    <AANLkTik3P2Rjunw3bR7gk2aZUAH7vW_wZwNWkqNRWODx@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

On Fri, Oct 29, 2010 at 4:24 PM, ANJAN PURKAYASTHA
<anjan.purkayastha@gmail.com> wrote:
> Does any R package support one-class SVM?
> I'm trying to develop an application to detect anomalies in genome
> sequencing.

I'm pretty sure kernlab supports this:
http://cran.r-project.org/web/packages/kernlab/index.html

And:
http://www.jstatsoft.org/v11/i09/paper

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
?| Memorial Sloan-Kettering Cancer Center
?| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



------------------------------

Message: 61
Date: Fri, 29 Oct 2010 17:20:33 -0400
From: Timothy Murphy <timothyjosephmurphy@gmail.com>
To: R-help@r-project.org
Subject: [R]  NetWorkSpace from REvolution;    Distributed Computing
    setup questions
Message-ID:
    <AANLkTimMM=56VwqU7DK93mBTrn+hbLYYe8FMtpOS553Z@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

***Summary:***

I'm setting up a cluster using netWorkSpace, and I'm having issues
with the sleigh initialization. My R function to initialize the sleigh
succeeds and the sleigh appears to be ready, but I get apparently
conflicting information from "status(s)", "rankCount(s)", and "s"; and
basic sleigh functions cause the sleigh to hang indefinitely.

Also, the log file contains an error that indicates that the script is
trying to find a file in a nonexistent directory:
"/usr/local/lib/R/site-library/nws/bin/RNWSSleighWorker.sh: 37:
/Library/Frameworks/R.framework/Resources/bin/R: not found" (see
section 4).

I've spent quite a bit of time trying to debug this, and I've gathered
here all the information that I think may be pertinent to solving the
problem. The following is therefore a bit lengthy, but I think
complete (as far as I'm able to tell from the existing documentation).
It's organized into sections roughly by the topic tested.

So if you're familiar with the workings of netWorkSpaces, I would be
very grateful if you would take a look at my diagnostics below and
tell me if you can identify the problem.

***Details:***

***Section 1***
Currently my setup is:

MASTER:
MacBook Pro running OS X 10.6.4 R-2.11.1, Python 2.6.1, and NWSserver-2.0.0.

WORKER:
Optiplex GX620 running Ubuntu 10.10 (64bit), R-2.11.1, Python 2.6.6,
NWSserver-2.0.0, and NWS-2.0.0.3 (client)
R and Python are in the PATH on both machines; I can start them from
the worker's command line by typing "R" or "python".
The client is able to find the "RNWSSleighWorker.sh" file.

(Note 1: I put the server software on the client because I was getting
an message saying: "No nws server found" each time I tried to install
the client software. I don't know if this is needed)
(Note 2: I plan to set up many more machines if I can get this working)
(Note 3: Originally I was trying this on Windows machines with Cygwin,
but I encountered the same error and figured I could at least rule out
a possible cause by setting it up on a linux machine. Ultimately I
would like to get this working in Windows/Cygwin.)

***Section 2***
The function I used to start the sleigh is:

s=sleigh(
+    nwsHost="172.30.xx.xx",
+    nwsPort=8765,
+    launch=sshcmd,
+    nodeList=c("10.85.xxx.xxx"),
+    scriptExec=envcmd,
+    scriptDir="/usr/local/lib/R/site-library/nws/bin",
+    scriptName="RNWSSleighWorker.sh",
+    workingDir='~/tmp/',
+    logDir='~/tmp/',
+    outfile="outfileTest",
+    user="tj")

This function returns the message below and then clear command prompt:

Executing command:
'/Library/Frameworks/R.framework/Resources/library/nws/bin/SleighWorkerWrapper.sh'

'ssh' '-f' '-x' '-l' 'tj' '10.85.101.109' 'env'
'RSleighName=10.85.101.109'
'RSleighNwsName=sleigh_ride_0450__nwssNGG4LF'
'RSleighUserNwsName=sleigh_user_0452__nwssNGG4LF' 'RSleighID=1'
'RSleighWorkerCount=1'
'RSleighScriptDir=/usr/local/lib/R/site-library/nws/bin'
'RSleighNwsHost=172.30.34.71' 'RSleighNwsPort=8765'
'RSleighWorkingDir=~/tmp/'
'RProg=/Library/Frameworks/R.framework/Resources/bin/R'
'RSleighWorkerOut=sleigh_ride_0450__nwssNGG4LF_0001.txt'
'RSleighLogDir=~/tmp/'
'/usr/local/lib/R/site-library/nws/bin/RNWSSleighWorker.sh'

If I type the name of the sleigh "s" as below, I get information that
makes it look like the sleigh is ready to receive commands:

> s
NWS Sleigh Object
NWS Host:    172.30.xx.xx:8765
Workspace Name:    sleigh_ride_0446__nwssNGG4LF
1 Worker Nodes:    10.85.xxx.xxx

Likewise, if I send a simple ssh command to the worker I get a response:
> system('ssh tj@10.85.101.109 date')
Fri Oct 29 15:15:10 EDT 2010

I can also communicate values between the two machines using the NWS
web server and the nwsStore() and nwsFetch() functions.

However, if I check the status of the sleigh using "status(s)" or
"rankCount(s)", I get less encouraging information:

> status(s)
$numWorkers
[1] 0
$closed
[1] 0

> rankCount(s6)
[1] 0

***Section 3***
I can access the NWS server through "localhost:8766" and see that
sleighs are being created. There are two entries: a sleigh_ride and a
sleigh_user; but the worker count in the sleigh_ride is also zero.

If I execute either of the following test sleigh functions, the sleigh
will hang indefinitely (though the R terminal will not hang, since I
used blocking=false):
eachWorker(s5, Sys.info, eo=list(blocking=FALSE))
eachWorker(s, function() library(nws), eo=list(blocking=FALSE))

***Section 4***
***CRUX OF THE ISSUE (probably):***
Finally, three files get created in the "~/tmp" directory that I
specified as the logDir and workingDir, named: "outfileTest",
"RSleighSentinelLog_1000_1" , and
"sleigh_ride_0450__nwssNGG4LF_0001.txt". All three contain exactly the
same information:

"/usr/local/lib/R/site-library/nws/bin/RNWSSleighWorker.sh: 37:
/Library/Frameworks/R.framework/Resources/bin/R: not found"

Whats puzzling is the "Library/Frameworks/R.framework/Resources/bin/R"
part. That looks like an OS X-style path rather than Ubuntu-style. I
didn't specify that path anywhere, but it definitely exists on the
MacBook side. I notice that it occurs as the "RProg" value in the
message that's returned when I run the sleigh function; but I can't
include it in the sleigh function as an option, ie the following:

> s=sleigh(
+     nwsHost="172.30.xx.xx",
+     nwsPort=8765,
+     launch=sshcmd,
+     nodeList=c("10.85.xxx.xxx"),
+     scriptExec=envcmd,
+     scriptDir="/usr/local/lib/R/site-library/nws/bin",
+     scriptName="RNWSSleighWorker.sh",
+     workingDir='~/tmp/',
+     logDir='~/tmp/',
+     outfile="outfileTest",
+     user="tj",
+     RProg="/usr/bin/R",
+     verbose=TRUE)
Error in initialize(value, ...) : unused argument(s) RProg

(note that "/usr/bin/R" is the response I get when I type "which R" on
either the master or worker machine, so would expect that it would be
a valid value for RProg.)

***Section 5***
Further, the first thing that the "RNWSSleighWorker.sh" script does
is: RProg=${RProg:-'R'}, which just creates an environment variable on
the worker machine with the value $RProg=R. The first time $RProg is
used is on line 36. If I execute this line on the worker machine, I
get a blank R command prompt that responds to any command with another
blank prompt.

tj@clusterWorker1:~$ $RProg --vanilla --slave <<'EOF' > ${RSleighLogFile} 2>&1 &
>

I tried running the sleigh() function from the master after doing
this, thinking that it would activate the R as a slave on the worker
machine and and allow it to connect, but no luck.

At this point, I've run out of ideas on things to test. I appreciate
you if you've read all this, and I'll appreciate you even more if you
can give me some help. T

Thanks!
TJ Murphy



------------------------------

Message: 62
Date: Fri, 29 Oct 2010 17:20:50 -0400
From: Duncan Murdoch <murdoch.duncan@gmail.com>
To: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
Cc: r-help <r-help@r-project.org>
Subject: Re: [R] R version 2-12.0 - running as 32 or as 64 bit?
Message-ID: <4CCB3AB2.9090200@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 29/10/2010 4:45 PM, Dimitri Liakhovitski wrote:
> Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC.
> When I was installing it, it did not ask me anything about 32 vs. 64 bit.
> So, if I run R now - is it running as a 32-bit or a 64-bit?

If it didn't ask you about it, then it probably thinks your machine 
can't run 64 bits.  Any ideas why it might think that?  Can you give 
details about what Windows says about itself in Help | About Windows 
(accessible from Explorer)?

Duncan Murdoch



------------------------------

Message: 63
Date: Fri, 29 Oct 2010 17:28:50 -0400
From: Duncan Murdoch <murdoch.duncan@gmail.com>
To: DM2010 <djlmax2008@googlemail.com>
Cc: r-help@r-project.org
Subject: Re: [R] Memory use in R
Message-ID: <4CCB3C92.4080406@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 29/10/2010 12:46 PM, DM2010 wrote:
>
> Dear R Users
>
> I have two questions about how R makes use of memory on a Windows computer.
>
> On my machine certain R jobs seem to stop with messages such as...
> "Error: cannot allocate vector of size 215.0 Mb"
> ...when, according to Windows Task Manager, there are still hundreds of
> megabytes of physical memory available. These jobs usually stop when the
> peak commit charge is around 2.6GB (in Windows-speak the "commit charge" is
> all the memory allocated by system, drivers, applications etc.).
>
> Machine characteristics
>
> Processor: Pentium-D
> 4GB of installed memory (Task Manager reports 3584MB = 4GB - 512MB total
> memory)
> Windows booted with /3GB switch
> R started with --max-mem-size=3071M
> memory.limit() as reported by R: 3071
>
> My questions are:
> 1. When it starts, does R ask the system to allocate memory for it in a
> single chunk?

No, it can handle fragmented allocations.

> 2. Can R allocate memory either side of the system-preallocated memory in
> the middle of address space?

I think so.  However, when it asks for 215 Mb, it needs to get that 
allocation in a single block of contiguous addresses, and it won't move 
things around to make space.  When all you've got is 3 GB to play in and 
you've allocated 2.6 GB, there's a good chance that the remaining space 
is spread out in small pieces and no available unused address ranges are 
big enough.

If you run R in a 64 bit OS you'll find it handles this situation 
better, because the OS can assign the physical memory to whatever 
address it likes, and you'll have lots of big open ranges.  On the other 
hand, with bigger pointers everything takes a bit more space, so you 
might run out sooner.

Duncan Murdoch

> Best wishes
>
> David Max



------------------------------

Message: 64
Date: Fri, 29 Oct 2010 23:35:25 +0200
From: Knut Erik Vedahl <vedahl@stud.ntnu.no>
To: r-help@r-project.org
Subject: Re: [R] SARIMA simulation using time series history
Message-ID: <20101029233525.yy5hgvqxc84sccw8@webmail.ntnu.no>
Content-Type: text/plain;    charset=ISO-8859-1;    DelSp="Yes";
    format="flowed"

Thank you for your suggestion, Juan. However, I have tried to specify  
the innovations and this doesn't seem to solve the problem.

Are there really no opportunities to simulate from a (S)ARIMA model  
using past observations in R, besides to make the whole script from  
the ground?


Knut


Siterer Juan Pablo Calle <mi.rhelp.es@gmail.com>:

> Hi Knut,
>
> The arima.sim function, in the stats package, has an argument  
> innov="YourSerie" for the innovations, you should try something like:
>
> arima.sim(list(order=c(p,d,q), ar=c(ar coefficients), ma=c(ma  
> coefficients), seasonal=list(order=c(P,D,Q), period=NA)), n=N, 
> innov=YourSerie)
>
> I'm not sure, but maybe this help you.
>
> Salute.
>
> Juan.
>
> On 2010-10-28, at 8:08 PM, Knut Erik Vedahl wrote:
>
>> Hi,
>>
>> I'm currently working with a SARIMA model from which I want to make  
>> simulations. As I understand, neither sarima.Sim nor the functions  
>> in the gsarima package use historic realizations of the time series  
>> to simulate future values. However, I want to use historic values  
>> as input and simulate future values based on the history. Anyone  
>> who know whether such a function is available in the libaries or  
>> anywhere else?
>>
>>
[[elided Yahoo spam]]
>>
>> Knut
>>
>> ______________________________________________
>> 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.
>
>
>



------------------------------

Message: 65
Date: Fri, 29 Oct 2010 14:19:20 -0700 (PDT)

To: r-help@r-project.org
Subject: [R] how to debug (mtrace) a function defined inside a
    function?
Message-ID: <1288387160561-3019781.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hi, everyone. I am using a fair amount of closures in my code. Problem i am
experiencing is i cannot figure out how to mtrace functions defined within a
function. There must be some way to name such function for mtrace to see it
and let me step into it. For example, say i have code


mymodel<-function(){
data<-numeric(0)
build<-function(){
   data<<-1
}

m<-list()
m$build<-build
m
}


How do I mtrace build function defined inside mymodel function so that i can
step into build?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/how-to-debug-mtrace-a-function-defined-inside-a-function-tp3019781p3019781.html

Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 66
Date: Fri, 29 Oct 2010 17:47:57 -0400
From: Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com>
To: Berwin A Turlach <berwin@maths.uwa.edu.au>
Cc: r-help <r-help@r-project.org>
Subject: Re: [R] R version 2-12.0 - running as 32 or as 64 bit?
Message-ID:
    <AANLkTi=uBGazvUH64VvQ7mPa+aoGp=Bm2fJ4b73vevgP@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Actually, Berwin  - you are right. I also did get 2 shortcuts. I just
thought that one of them was old - from my previous R installations.
And indeed the 4th line tells what version is running.
Great!
Thank you!
Dimitri



On Fri, Oct 29, 2010 at 5:02 PM, Berwin A Turlach
<berwin@maths.uwa.edu.au> wrote:
> G'day Dimitri,
>
> On Fri, 29 Oct 2010 16:45:00 -0400
> Dimitri Liakhovitski <dimitri.liakhovitski@gmail.com> wrote:
>
>> Question: I installed R verison 2-12.0 on my Windows 7 (64 bit) PC.
>> When I was installing it, it did not ask me anything about 32 vs. 64
>> bit. So, if I run R now - is it running as a 32-bit or a 64-bit?
>
> Well, when I did the same, I got two shortcuts installed on my desktop,
> one named R 2.12.0 and the other named R x64 2.12.0. ?If I had any
> doubts which version of R these shortcuts would start, then the fourth
> line of the start-up message would put them to rest. ?Missing that
> message, you can always issue the command
>
>> .Machine$sizeof.pointer
>
> if the answer is 4, you are running 32bit, if the answer is 8, then you
> are running 64 bit.
>
> HTH.
>
> Cheers,
>
> ? ? ? ?Berwin
>
> ========================== Full address ============================
> Berwin A Turlach ? ? ? ? ? ? ? ? ? ? ?Tel.: +61 (8) 6488 3338 (secr)
> School of Maths and Stats (M019) ? ? ? ? ? ?+61 (8) 6488 3383 (self)
> The University of Western Australia ? FAX : +61 (8) 6488 1028
> 35 Stirling Highway
> Crawley WA 6009 ? ? ? ? ? ? ? ?e-mail: berwin@maths.uwa.edu.au
> Australia ? ? ? ? ? ? ? ? ? ? ? ?http://www.maths.uwa.edu.au/~berwin
>



-- 
Dimitri Liakhovitski
Ninah Consulting
www.ninah.com



------------------------------

Message: 67
Date: Fri, 29 Oct 2010 18:01:34 -0400
From: Duncan Murdoch <murdoch.duncan@gmail.com>

Cc: r-help@r-project.org
Subject: Re: [R] how to debug (mtrace) a function defined inside a
    function?
Message-ID: <4CCB443E.8010908@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 29/10/2010 5:19 PM, Andre Zege wrote:
>
> Hi, everyone. I am using a fair amount of closures in my code. Problem i am
> experiencing is i cannot figure out how to mtrace functions defined within a
> function. There must be some way to name such function for mtrace to see it
> and let me step into it. For example, say i have code
>
>
> mymodel<-function(){
>   data<-numeric(0)
>   build<-function(){
>     data<<-1
>   }
>
>   m<-list()
>   m$build<-build
>   m
> }
>
>
> How do I mtrace build function defined inside mymodel function so that i can
> step into build?

I don't use mtrace, but you can use setBreakpoint() to set a breakpoint 
by line number, and presumably you could set the action to whatever will 
trigger mtrace.  It will modify the source of mymodel so that every time 
it creates a new build(), it creates it with a breakpoint within.

See ?setBreakpoint and ?trace.

Duncan Murdoch



------------------------------

Message: 68
Date: Fri, 29 Oct 2010 22:18:20 +0000 (UTC)
From: mmstat@comcast.net
To: R-help@r-project.org
Subject: [R] plot pdf
Message-ID:
    
<45729106.238107.1288390700294.JavaMail.root@sz0115a.westchester.pa.mail.comcast.net>

    
Content-Type: text/plain



I want to plot the unstadardized version of a normal plot.Ā  Can you explain why 
that is not working? 




Dev.set(1) 



xcrit=-1.645 



cord.x <- c(-3,seq(-3,xcrit,0.01),xcrit) 



cord.y <- c(0,dnorm(seq(-3,xcrit,0.01)),0)Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  # what does 
final 0 do here? 




curve(dnorm(x,0,1),xlim=c(-3,3),main='Normal PDF') 



polygon(cord.x,cord.y,col='orange') 



savePlot(filename="c:\\ssl_z.emf",type="emf") Ā Ā Ā Ā Ā Ā Ā Ā Ā #unable to 
create metafile?Ā  why?Ā  




Ā  

x=seq(80,200,1) 



plot(x,dnorm(x,140,15),type="l",ylab="Probability") 





Ā  

dev.set(4) 



xcrit=135.9 



cord.x <- c(80,seq(80,xcrit,.1),xcrit) 



cord.y <- c(0,dnorm(seq(80,xcrit,.1)),0)Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā #final 0 
needs to be changed but to what? 


curve(dnorm(x,140,15),xlim=c(80,200),main='Normal PDF',ylab="Probability") 



polygon(cord.x,cord.y,col='orange') 



savePlot(filename="c:\\ssl_z.emf",type="emf")Ā Ā Ā Ā Ā Ā Ā Ā  #unable to create 
metafile?Ā  why?Ā  




Ā  



Ā  

Sincerely, 

Mary A. Marion 





    [[alternative HTML version deleted]]



------------------------------

Message: 69
Date: Fri, 29 Oct 2010 15:34:55 -0700 (PDT)

To: r-help@r-project.org
Subject: [R] How to scan df from a specific word?
Message-ID: <1288391695159-3019841.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hi R-helpers,

I need to read some file with different lines (I don't know the number of
lines to skip) and I would like to find a way to start reading the
data.frame from the word "source".

ex:

djhsafk
asdfhkjash
shdfjkash
asfhjkash         #those lines contain numbers and words, I want to skip
then but they have different sizes
asdfhjkash
asdfhjksa

source
tret 2 
res 3

Can anybody help?
Thanks
-- 
View this message in context: 
http://r.789695.n4.nabble.com/How-to-scan-df-from-a-specific-word-tp3019841p3019841.html

Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 70
Date: Fri, 29 Oct 2010 15:38:36 -0700 (PDT)

To: r-help@r-project.org
Subject: Re: [R] How to scan df from a specific word?
Message-ID: <1288391916490-3019844.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Sorry, the explanation wasn't very good...just to explain better.

I am writing a loop to read and process different files in the same script.
And what I want to load into a variable is a data.frame that is above the
word source in all of my files.

So I would like to recognize the word Source in the text file....and read
the table bellow source until the next blank line (the file has more written
stuff bellow the data frame that I want to read too)

Here is an example of the file. I want the df to read from source until the
blank line right above the words "Analysis of Variance

Notice:     37 singularities detected in design matrix.
   1 LogL=-2664.01     S2=  1.0000       8367 df    :   2 components
constrained
   2 LogL=-2269.45     S2=  1.0000       8367 df 
   3 LogL=-1698.47     S2=  1.0000       8367 df 
   4 LogL=-1252.72     S2=  1.0000       8367 df 
   5 LogL=-1013.52     S2=  1.0000       8367 df 
   6 LogL=-957.409     S2=  1.0000       8367 df 
   7 LogL=-944.252     S2=  1.0000       8367 df 
   8 LogL=-939.976     S2=  1.0000       8367 df 
   9 LogL=-938.908     S2=  1.0000       8367 df 
  10 LogL=-938.798     S2=  1.0000       8367 df 
  11 LogL=-938.795     S2=  1.0000       8367 df 
  12 LogL=-938.795     S2=  1.0000       8367 df 

Source                Model  terms     Gamma     Component    Comp/SE   % C
Residual               8383   8367
at(type,1).Nfam          62     62   10.1131       10.1131       1.81   0 P  
at(type,2).Nfam          62     62   28.1153       28.1153       2.16   0 P  
rep.iblk                768    768   63.2919       63.2919      10.94   0 P  
at(type,1).Nfemale       44     44   29.9049       29.9049       2.93   0 P  
at(type,1).Nclone      2689   2689   109.560       109.560      12.66   0 P  
at(type,2).Nfemale       44     44   14.0305       14.0305       1.68   0 P  
Variance                  0      0   479.040       479.040      36.23   0 P  
Variance                  0      0   490.580       490.580      17.51   0 P  
Variance                  0      0   469.932       469.932      36.51   0 P  
Variance                  0      0   544.654       544.654      17.86   0 P  

Analysis of Variance              NumDF              F_inc  
  27 mu                                1            5860.84                

  12 culture                           1               0.07                
  10 type                              1              29.59                
  28 culture.rep                       6              14.06                
  30 culture.rep.type                  7               2.17                
  36 at(type,1).Nfam                      62 effects fitted
-- 
View this message in context: 
http://r.789695.n4.nabble.com/How-to-scan-df-from-a-specific-word-tp3019841p3019844.html

Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 71
Date: Fri, 29 Oct 2010 15:39:54 -0700 (PDT)

To: r-help@r-project.org
Subject: Re: [R] How to scan df from a specific word?
Message-ID: <1288391994567-3019846.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Sorry, the explanation wasn't very good...just to explain better.

I am writing a loop to read and process every time a different file in the
same script.
And what I want to load into a variable each time is a data.frame that is
bellow the word source in all of my files.

So I would like to recognize the word Source in the text file....and read
the table bellow source until the next blank line (the file has more written
stuff bellow the data frame that I want to read too)

Here is an example of the file. I want the df to read from source until the
blank line right above the words "Analysis of Variance

Notice:     37 singularities detected in design matrix.
   1 LogL=-2664.01     S2=  1.0000       8367 df    :   2 components
constrained
   2 LogL=-2269.45     S2=  1.0000       8367 df
   3 LogL=-1698.47     S2=  1.0000       8367 df
   4 LogL=-1252.72     S2=  1.0000       8367 df
   5 LogL=-1013.52     S2=  1.0000       8367 df
   6 LogL=-957.409     S2=  1.0000       8367 df
   7 LogL=-944.252     S2=  1.0000       8367 df
   8 LogL=-939.976     S2=  1.0000       8367 df
   9 LogL=-938.908     S2=  1.0000       8367 df
  10 LogL=-938.798     S2=  1.0000       8367 df
  11 LogL=-938.795     S2=  1.0000       8367 df
  12 LogL=-938.795     S2=  1.0000       8367 df

Source                Model  terms     Gamma     Component    Comp/SE   % C
Residual               8383   8367
at(type,1).Nfam          62     62   10.1131       10.1131       1.81   0 P  
at(type,2).Nfam          62     62   28.1153       28.1153       2.16   0 P  
rep.iblk                768    768   63.2919       63.2919      10.94   0 P  
at(type,1).Nfemale       44     44   29.9049       29.9049       2.93   0 P  
at(type,1).Nclone      2689   2689   109.560       109.560      12.66   0 P  
at(type,2).Nfemale       44     44   14.0305       14.0305       1.68   0 P  
Variance                  0      0   479.040       479.040      36.23   0 P  
Variance                  0      0   490.580       490.580      17.51   0 P  
Variance                  0      0   469.932       469.932      36.51   0 P  
Variance                  0      0   544.654       544.654      17.86   0 P  

Analysis of Variance              NumDF              F_inc  
  27 mu                                1            5860.84                

  12 culture                           1               0.07                
  10 type                              1              29.59                
  28 culture.rep                       6              14.06                
  30 culture.rep.type                  7               2.17                
  36 at(type,1).Nfam                      62 effects fitted 
-- 
View this message in context: 
http://r.789695.n4.nabble.com/How-to-scan-df-from-a-specific-word-tp3019841p3019846.html

Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 72
Date: Fri, 29 Oct 2010 18:46:40 -0400
From: Gregory Ryslik <rsaber@comcast.net>
To: r-help Help <r-help@r-project.org>
Subject: [R] vertical list sum
Message-ID: <15817BA3-684B-43AE-8C6F-4739309354C2@comcast.net>
Content-Type: text/plain; charset=us-ascii

Hi Everyone,

I have a list of vectors like this (in this case it's 3 vectors but assume the 
vector count and the length of each vector is not known):

[[1]]
[1]  9  5  7  2 14  4  4  3

[[2]]
[1]  3  6 25  2 14  3  3  4

[[3]]
[1] 28  4 14  3 14  2  4  5

What I want to do is take the average vertically. Thus I want to do 9+3+28 /3, 
5+6+4 /3, etc... and then have it return a vector. I'm assuming that if I can 
sum it, I can count it to so summing this would be just as helpful.

I understand I can first go through each element of the list, get a vector,
cbind into  matrix and sum across but I was hoping to avoid that... I tried
getting it to work with mapply but am having difficulties...

Thanks!

Kind regards,
Greg


------------------------------

Message: 73
Date: Fri, 29 Oct 2010 15:54:15 -0700 (PDT)

To: r-help@r-project.org
Subject: [R] Differenciate numbers from reference for rows
Message-ID: <1288392855429-3019853.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


So, I am having a tricky reference file to extract information from.

The format of the file is

x   1 + 4 * 3 + 5 + 6 + 11 * 0.5

So, the elements that are not being multiplied (1, 5 and 6) and the elements
before the multiplication sign (4 and 11) means actually the reference for
the row in a matrix where I need to extract the element from.

The numbers after the multiplication sign are regular numbers 
Ex:

> x<-matrix(20:35)
> x
      [,1]
[1,]   20
[2,]   21
[3,]   22
[4,]   23
[5,]   24
[6,]   25
[7,]   26
[8,]   27
[9,]   28
[10,]   29
[11,]   30
[12,]   31
[13,]   32
[14,]   33
[15,]   34
[16,]   35

I would like to read the rows 1,4,5,6 and 11 and sum then. However the
numbers in the elements row 4 and 11 are multiplied by 3 and 0.5

So it would be
20 + 23 * 3 + 24 + 25 + 30 * 0.5.

And I have this format in different files so I can't do all by hand.
Can anybody help me with a script that can differentiate this?
Thanks
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Differenciate-numbers-from-reference-for-rows-tp3019853p3019853.html

Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 74
Date: Fri, 29 Oct 2010 18:53:44 -0400
From: Jorge Ivan Velez <jorgeivanvelez@gmail.com>
To: Gregory Ryslik <rsaber@comcast.net>
Cc: r-help Help <r-help@r-project.org>
Subject: Re: [R] vertical list sum
Message-ID:
    <AANLkTimQEu6LrgBkU322uVyxKkki8SOZ2nHBX7E5E6Kx@mail.gmail.com>
Content-Type: text/plain

Hi Greg,

Here are two ways of doing it:

> mylist <- list(x = rpois(10, 10), y = rpois(10, 20), z = rpois(10, 5))
> mylist
$x
[1]  3 13 14 16 10  7  3  5 12 14

$y
[1] 17 16 26 13 23 24 16 28 23 12

$z
[1]  2  6  5  5  5  1  9 11  6  4

>
> colMeans(do.call(rbind, mylist), na.rm = TRUE)
[1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333
14.666667 13.666667
[10] 10.000000
>
> Reduce("+", mylist)/length(mylist)
[1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333
14.666667 13.666667
[10] 10.000000


HTH,
Jorge


On Fri, Oct 29, 2010 at 6:46 PM, Gregory Ryslik <> wrote:

> Hi Everyone,
>
> I have a list of vectors like this (in this case it's 3 vectors but assume
> the vector count and the length of each vector is not known):
>
> [[1]]
> [1]  9  5  7  2 14  4  4  3
>
> [[2]]
> [1]  3  6 25  2 14  3  3  4
>
> [[3]]
> [1] 28  4 14  3 14  2  4  5
>
> What I want to do is take the average vertically. Thus I want to do 9+3+28
> /3, 5+6+4 /3, etc... and then have it return a vector. I'm assuming that if
> I can sum it, I can count it to so summing this would be just as helpful.
>
> I understand I can first go through each element of the list, get a vector,
> cbind into  matrix and sum across but I was hoping to avoid that... I tried
> getting it to work with mapply but am having difficulties...
>
> Thanks!
>
> Kind regards,
> Greg
> ______________________________________________
> 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]]



------------------------------

Message: 75
Date: Fri, 29 Oct 2010 15:59:11 -0700 (PDT)
From: Phil Spector <spector@stat.berkeley.edu>

Cc: r-help@r-project.org
Subject: Re: [R] How to scan df from a specific word?
Message-ID:
    <alpine.DEB.2.00.1010291556220.10737@springer.Berkeley.EDU>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

It might be easier to preprocess the file before passing it
to R, but you an do what you want using a connection:

> f = file('s.dat','r')
> while(1){
+   txt = readLines(f,1)
+   if(length(grep('Source',txt)))break;
+ }
> while(1){
+   more = readLines(f,1)
+   if(nchar(more) == 0)break;
+   txt = paste(txt,more,sep='\n')
+ }
> try = read.table(textConnection(txt),header=TRUE,fill=TRUE)
> try
                Source Model terms    Gamma Component Comp.SE X. C
1            Residual  8383  8367       NA        NA      NA NA 
2     at(type,1).Nfam    62    62  10.1131   10.1131    1.81  0 P
3     at(type,2).Nfam    62    62  28.1153   28.1153    2.16  0 P
4            rep.iblk   768   768  63.2919   63.2919   10.94  0 P
5  at(type,1).Nfemale    44    44  29.9049   29.9049    2.93  0 P
6   at(type,1).Nclone  2689  2689 109.5600  109.5600   12.66  0 P
7  at(type,2).Nfemale    44    44  14.0305   14.0305    1.68  0 P
8            Variance     0     0 479.0400  479.0400   36.23  0 P
9            Variance     0     0 490.5800  490.5800   17.51  0 P
10           Variance     0     0 469.9320  469.9320   36.51  0 P
11           Variance     0     0 544.6540  544.6540   17.86  0 P


The first loop reads up until the word "Source" appears in the 
line, and the second loop builds a text representation of what
you want so that you can read it using textConnection.

Hope this helps.
                    - Phil Spector
                     Statistical Computing Facility
                     Department of Statistics
                     UC Berkeley
                    spector@stat.berkeley.edu



On Fri, 29 Oct 2010, M.Ribeiro wrote:

>
> Sorry, the explanation wasn't very good...just to explain better.
>
> I am writing a loop to read and process every time a different file in the
> same script.
> And what I want to load into a variable each time is a data.frame that is
> bellow the word source in all of my files.
>
> So I would like to recognize the word Source in the text file....and read
> the table bellow source until the next blank line (the file has more written
> stuff bellow the data frame that I want to read too)
>
> Here is an example of the file. I want the df to read from source until the
> blank line right above the words "Analysis of Variance
>
> Notice:     37 singularities detected in design matrix.
>   1 LogL=-2664.01     S2=  1.0000       8367 df    :   2 components
> constrained
>   2 LogL=-2269.45     S2=  1.0000       8367 df
>   3 LogL=-1698.47     S2=  1.0000       8367 df
>   4 LogL=-1252.72     S2=  1.0000       8367 df
>   5 LogL=-1013.52     S2=  1.0000       8367 df
>   6 LogL=-957.409     S2=  1.0000       8367 df
>   7 LogL=-944.252     S2=  1.0000       8367 df
>   8 LogL=-939.976     S2=  1.0000       8367 df
>   9 LogL=-938.908     S2=  1.0000       8367 df
>  10 LogL=-938.798     S2=  1.0000       8367 df
>  11 LogL=-938.795     S2=  1.0000       8367 df
>  12 LogL=-938.795     S2=  1.0000       8367 df
>
> Source                Model  terms     Gamma     Component    Comp/SE   % C
> Residual               8383   8367
> at(type,1).Nfam          62     62   10.1131       10.1131       1.81   0 P
> at(type,2).Nfam          62     62   28.1153       28.1153       2.16   0 P
> rep.iblk                768    768   63.2919       63.2919      10.94   0 P
> at(type,1).Nfemale       44     44   29.9049       29.9049       2.93   0 P
> at(type,1).Nclone      2689   2689   109.560       109.560      12.66   0 P
> at(type,2).Nfemale       44     44   14.0305       14.0305       1.68   0 P
> Variance                  0      0   479.040       479.040      36.23   0 P
> Variance                  0      0   490.580       490.580      17.51   0 P
> Variance                  0      0   469.932       469.932      36.51   0 P
> Variance                  0      0   544.654       544.654      17.86   0 P
>
> Analysis of Variance              NumDF              F_inc
>  27 mu                                1            5860.84
>
>  12 culture                           1               0.07
>  10 type                              1              29.59
>  28 culture.rep                       6              14.06
>  30 culture.rep.type                  7               2.17
>  36 at(type,1).Nfam                      62 effects fitted
> -- 
> View this message in context: 
>http://r.789695.n4.nabble.com/How-to-scan-df-from-a-specific-word-tp3019841p3019846.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.
>



------------------------------

Message: 76
Date: Fri, 29 Oct 2010 16:07:28 -0700
From: Peter Langfelder <peter.langfelder@gmail.com>

Cc: r-help@r-project.org
Subject: Re: [R] How to scan df from a specific word?
Message-ID:
    <AANLkTikin6m-ynqAX=RbCdOeWWMrHhYWK=UrAv7zo2zH@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Sorry, this isn't really an R solution, but here it goes anyway. You
can isolate the block from Source to the first following blank line by
the following unix/linux/cygwin command, assuming inFile is your input
file and outFile is the output file:

cat inFile | grep -A 100 Source | grep -m 1 -B 100 ^$ > outFile

(in this command the number of lines in the Source block is limited to
about 100-2=98, you can safely increase the number if necessary)

You will probably still have the problem of successive spaces in the
block you are interested in. This can also be handled on the command
line, for example by adding

| sed 's/   */\t/g'

(note there are 3 spaces between the first / and the *) between the $
and > characters in the command above. The last bit will replace all
occurrences of 2 or more spaces by a tab, so you can read the file as
tab-separated.

Equivalently, you could do the line filtering in R as Phil suggested.

Peter




>
> Sorry, the explanation wasn't very good...just to explain better.
>
> I am writing a loop to read and process every time a different file in the
> same script.
> And what I want to load into a variable each time is a data.frame that is
> bellow the word source in all of my files.
>
> So I would like to recognize the word Source in the text file....and read
> the table bellow source until the next blank line (the file has more written
> stuff bellow the data frame that I want to read too)
>
> Here is an example of the file. I want the df to read from source until the
> blank line right above the words "Analysis of Variance
>
> Notice: ? ? 37 singularities detected in design matrix.
> ? 1 LogL=-2664.01 ? ? S2= ?1.0000 ? ? ? 8367 df ? ?: ? 2 components
> constrained
> ? 2 LogL=-2269.45 ? ? S2= ?1.0000 ? ? ? 8367 df
> ? 3 LogL=-1698.47 ? ? S2= ?1.0000 ? ? ? 8367 df
> ? 4 LogL=-1252.72 ? ? S2= ?1.0000 ? ? ? 8367 df
> ? 5 LogL=-1013.52 ? ? S2= ?1.0000 ? ? ? 8367 df
> ? 6 LogL=-957.409 ? ? S2= ?1.0000 ? ? ? 8367 df
> ? 7 LogL=-944.252 ? ? S2= ?1.0000 ? ? ? 8367 df
> ? 8 LogL=-939.976 ? ? S2= ?1.0000 ? ? ? 8367 df
> ? 9 LogL=-938.908 ? ? S2= ?1.0000 ? ? ? 8367 df
> ?10 LogL=-938.798 ? ? S2= ?1.0000 ? ? ? 8367 df
> ?11 LogL=-938.795 ? ? S2= ?1.0000 ? ? ? 8367 df
> ?12 LogL=-938.795 ? ? S2= ?1.0000 ? ? ? 8367 df
>
> ?Source ? ? ? ? ? ? ? ?Model ?terms ? ? Gamma ? ? Component ? ?Comp/SE ? % C
> ?Residual ? ? ? ? ? ? ? 8383 ? 8367
> ?at(type,1).Nfam ? ? ? ? ?62 ? ? 62 ? 10.1131 ? ? ? 10.1131 ? ? ? 1.81 ? 0 P
> ?at(type,2).Nfam ? ? ? ? ?62 ? ? 62 ? 28.1153 ? ? ? 28.1153 ? ? ? 2.16 ? 0 P
> ?rep.iblk ? ? ? ? ? ? ? ?768 ? ?768 ? 63.2919 ? ? ? 63.2919 ? ? ?10.94 ? 0 P
> ?at(type,1).Nfemale ? ? ? 44 ? ? 44 ? 29.9049 ? ? ? 29.9049 ? ? ? 2.93 ? 0 P
> ?at(type,1).Nclone ? ? ?2689 ? 2689 ? 109.560 ? ? ? 109.560 ? ? ?12.66 ? 0 P
> ?at(type,2).Nfemale ? ? ? 44 ? ? 44 ? 14.0305 ? ? ? 14.0305 ? ? ? 1.68 ? 0 P
> ?Variance ? ? ? ? ? ? ? ? ?0 ? ? ?0 ? 479.040 ? ? ? 479.040 ? ? ?36.23 ? 0 P
> ?Variance ? ? ? ? ? ? ? ? ?0 ? ? ?0 ? 490.580 ? ? ? 490.580 ? ? ?17.51 ? 0 P
> ?Variance ? ? ? ? ? ? ? ? ?0 ? ? ?0 ? 469.932 ? ? ? 469.932 ? ? ?36.51 ? 0 P
> ?Variance ? ? ? ? ? ? ? ? ?0 ? ? ?0 ? 544.654 ? ? ? 544.654 ? ? ?17.86 ? 0 P
>
> ?Analysis of Variance ? ? ? ? ? ? ?NumDF ? ? ? ? ? ? ?F_inc
> ?27 mu ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1 ? ? ? ? ? ?5860.84
>
> ?12 culture ? ? ? ? ? ? ? ? ? ? ? ? ? 1 ? ? ? ? ? ? ? 0.07
> ?10 type ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?1 ? ? ? ? ? ? ?29.59
> ?28 culture.rep ? ? ? ? ? ? ? ? ? ? ? 6 ? ? ? ? ? ? ?14.06
> ?30 culture.rep.type ? ? ? ? ? ? ? ? ?7 ? ? ? ? ? ? ? 2.17
> ?36 at(type,1).Nfam ? ? ? ? ? ? ? ? ? ? ?62 effects fitted
> --
> View this message in context: 
>http://r.789695.n4.nabble.com/How-to-scan-df-from-a-specific-word-tp3019841p3019846.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.
>



------------------------------

Message: 77
Date: Sat, 30 Oct 2010 09:37:33 +1000
From: Duncan Mackay <mackay@northnet.com.au>
To: r-help@stat.math.ethz.ch
Subject: Re: [R] vertical list sum
Message-ID: <6.1.0.6.1.20101030092255.020e5640@mail.northnet.com.au>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Hi Jorge

I tried your methods for all (which work for complete rows) and then I 
remove the first value of $y and repeated; both fail because of 
the  unequal numbers
The problem is when there are unequal numbers in the rows and trying to 
make a matrix of them.

I was trying some things with Greg's vaules.
x <- list()
x[[1]] <- c(9,5,7,2, 14,  4,  4,  3)
x[[2]] <- c(3,  6, 25,  2, 14,  3,  3 , 4)
x[[3]] <- c(28,  4 ,14,  3, 14,  2  ,4 , 5)
x[4] <- list(28 , 4 ,14 , 3, 14,  2 , 4  )

x.av <- list()
for(j in seq_along(1:max(sapply(x,length))) ) x.av[j] <- 
mean(sapply(x,"[",j),na.rm=T)
unlist(x.av) # if you want a vector

which Greg may have used first

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
ARMIDALE NSW 2351
Email home: mackay@northnet.com.au

At 08:53 30/10/2010, you wrote:
>Hi Greg,
>
>Here are two ways of doing it:
>
> > mylist <- list(x = rpois(10, 10), y = rpois(10, 20), z = rpois(10, 5))
> > mylist
>$x
>  [1]  3 13 14 16 10  7  3  5 12 14
>
>$y
>  [1] 17 16 26 13 23 24 16 28 23 12
>
>$z
>  [1]  2  6  5  5  5  1  9 11  6  4
>
> >
> > colMeans(do.call(rbind, mylist), na.rm = TRUE)
>  [1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333
>14.666667 13.666667
>[10] 10.000000
> >
> > Reduce("+", mylist)/length(mylist)
>  [1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333
>14.666667 13.666667
>[10] 10.000000
>
>
>HTH,
>Jorge
>
>
>On Fri, Oct 29, 2010 at 6:46 PM, Gregory Ryslik <> wrote:
>
> > Hi Everyone,
> >
> > I have a list of vectors like this (in this case it's 3 vectors but assume
> > the vector count and the length of each vector is not known):
> >
> > [[1]]
> > [1]  9  5  7  2 14  4  4  3
> >
> > [[2]]
> > [1]  3  6 25  2 14  3  3  4
> >
> > [[3]]
> > [1] 28  4 14  3 14  2  4  5
> >
> > What I want to do is take the average vertically. Thus I want to do 9+3+28
> > /3, 5+6+4 /3, etc... and then have it return a vector. I'm assuming that if
> > I can sum it, I can count it to so summing this would be just as helpful.
> >
> > I understand I can first go through each element of the list, get a vector,
> > cbind into  matrix and sum across but I was hoping to avoid that... I tried
> > getting it to work with mapply but am having difficulties...
> >
> > Thanks!
> >
> > Kind regards,
> > Greg
> > ______________________________________________
> > 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.



------------------------------

Message: 78
Date: Sat, 30 Oct 2010 09:43:04 +1000
From: Duncan Mackay <mackay@northnet.com.au>
To: r-help@stat.math.ethz.ch
Subject: Re: [R] vertical list sum
Message-ID: <6.1.0.6.1.20101030094043.01fe0550@mail.northnet.com.au>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Aplogies to the original poster - I got names wrong in a cut and paste


Hi Jorge

I tried your methods for all (which work for complete rows) and then I 
remove the first value of $y and repeated; both fail because of 
the  unequal numbers
The problem is when there are unequal numbers in the rows and trying to 
make a matrix of them.

I was trying some things with Greg's vaules.
x <- list()
x[[1]] <- c(9,5,7,2, 14,  4,  4,  3)
x[[2]] <- c(3,  6, 25,  2, 14,  3,  3 , 4)
x[[3]] <- c(28,  4 ,14,  3, 14,  2  ,4 , 5)
x[4] <- list(28 , 4 ,14 , 3, 14,  2 , 4  )

x.av <- list()
for(j in seq_along(1:max(sapply(x,length))) ) x.av[j] <- 
mean(sapply(x,"[",j),na.rm=T)
unlist(x.av) # if you want a vector

which Greg may have used first

Regards

Duncan
______________________________________________
>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.



------------------------------

Message: 79
Date: Fri, 29 Oct 2010 19:49:04 -0400
From: Gabor Grothendieck <ggrothendieck@gmail.com>

Cc: r-help@r-project.org
Subject: Re: [R] How to scan df from a specific word?
Message-ID:
    <AANLkTimF6NpfPdWv0GySk5qVRPjYWV+eX=e1e8rFgGpq@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1


>
> Hi R-helpers,
>
> I need to read some file with different lines (I don't know the number of
> lines to skip) and I would like to find a way to start reading the
> data.frame from the word "source".
>
> ex:
>
> djhsafk
> asdfhkjash
> shdfjkash
> asfhjkash ? ? ? ? #those lines contain numbers and words, I want to skip
> then but they have different sizes
> asdfhjkash
> asdfhjksa
>
> source
> tret 2
> res 3
>

Here is a one line solution but it does make use of the external
utility, gawk.  If you using Linux you probably have it on your system
already.  You can also get gawk for Windows or if you download
Duncan's Rtools distribution its included there too -- gawk.exe is
just a single file so just make sure you put it somewhere on your
PATH.

> read.table(pipe('gawk "/Analysis of Variance/ {exit}; /Source/ {i++}; i"
>myfile.dat'), header = TRUE, fill = TRUE)
               Source Model terms    Gamma Component Comp.SE X. C
1            Residual  8383  8367       NA        NA      NA NA
2     at(type,1).Nfam    62    62  10.1131   10.1131    1.81  0 P
3     at(type,2).Nfam    62    62  28.1153   28.1153    2.16  0 P
4            rep.iblk   768   768  63.2919   63.2919   10.94  0 P
5  at(type,1).Nfemale    44    44  29.9049   29.9049    2.93  0 P
6   at(type,1).Nclone  2689  2689 109.5600  109.5600   12.66  0 P
7  at(type,2).Nfemale    44    44  14.0305   14.0305    1.68  0 P
8            Variance     0     0 479.0400  479.0400   36.23  0 P
9            Variance     0     0 490.5800  490.5800   17.51  0 P
10           Variance     0     0 469.9320  469.9320   36.51  0 P
11           Variance     0     0 544.6540  544.6540   17.86  0 P

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



------------------------------

Message: 80
Date: Fri, 29 Oct 2010 16:55:39 -0700 (PDT)

To: r-help@stat.math.ethz.ch
Subject: [R] date calculation
Message-ID: <650906.35534.qm@web30805.mail.mud.yahoo.com>
Content-Type: text/plain; charset=us-ascii

Hi list,

Could someone explain to me why the following result is not a integer?


> difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004",
>format="%d%b%Y"), units="days")
Time difference of 195.0417 days

I'm using R2.12.0 on WinXP.

Thanks!

...Tao



------------------------------

Message: 81
Date: Fri, 29 Oct 2010 17:04:23 -0700 (PDT)
From: Phil Spector <spector@stat.berkeley.edu>

Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] date calculation
Message-ID:
    <alpine.DEB.2.00.1010291702450.10737@springer.Berkeley.EDU>
Content-Type: text/plain; charset="iso-8859-7"; Format="flowed"

Tao -
    The documentation for the difftime function says:

Function ?difftime? calculates a difference of two date/time
      objects and returns an object of class ?"difftime"? with an
      attribute indicating the units.

So that answers your question.

If you want it to be an integer, you're certainly free to make it one:

> as.integer(difftime(strptime("24NOV2004", format="%d%b%Y"), 
+                     strptime("13MAY2004",format="%d%b%Y"), units="days"))
[1] 195

                    - Phil Spector
                     Statistical Computing Facility
                     Department of Statistics
                     UC Berkeley
                    spector@stat.berkeley.edu



On Fri, 29 Oct 2010, Shi, Tao wrote:

> Hi list,
>
> Could someone explain to me why the following result is not a integer?
>
>
>> difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004",
>> format="%d%b%Y"), units="days")
> Time difference of 195.0417 days
>
> I'm using R2.12.0 on WinXP.
>
> Thanks!
>
> ...Tao
>
> ______________________________________________
> 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.
>

------------------------------

Message: 82
Date: Fri, 29 Oct 2010 20:08:36 -0400
From: Gregory Ryslik <rsaber@comcast.net>
To: Jorge Ivan Velez <jorgeivanvelez@gmail.com>
Cc: r-help Help <r-help@r-project.org>
Subject: Re: [R] vertical list sum
Message-ID: <73B41A2C-CD06-4959-9FCE-0483B9CADA19@comcast.net>
Content-Type: text/plain

Hi,

Ah! Thanks for your help! I have even seen Reduce before but for some reason 
just didn't make the connection. This helps a ton! Thanks again.

Kind regards,
Greg
On Oct 29, 2010, at 6:53 PM, Jorge Ivan Velez wrote:

> Hi Greg,
> 
> Here are two ways of doing it:
> 
> > mylist <- list(x = rpois(10, 10), y = rpois(10, 20), z = rpois(10, 5))
> > mylist
> $x
>  [1]  3 13 14 16 10  7  3  5 12 14
> 
> $y
>  [1] 17 16 26 13 23 24 16 28 23 12
> 
> $z
>  [1]  2  6  5  5  5  1  9 11  6  4
> 
> > 
> > colMeans(do.call(rbind, mylist), na.rm = TRUE)
>  [1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333 
>14.666667 13.666667
> [10] 10.000000
> > 
> > Reduce("+", mylist)/length(mylist)
>  [1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333 
>14.666667 13.666667
> [10] 10.000000
> 
> 
> HTH,
> Jorge
> 
> 
> On Fri, Oct 29, 2010 at 6:46 PM, Gregory Ryslik <> wrote:
> Hi Everyone,
> 
> I have a list of vectors like this (in this case it's 3 vectors but assume the 
>vector count and the length of each vector is not known):
> 
> [[1]]
> [1]  9  5  7  2 14  4  4  3
> 
> [[2]]
> [1]  3  6 25  2 14  3  3  4
> 
> [[3]]
> [1] 28  4 14  3 14  2  4  5
> 
> What I want to do is take the average vertically. Thus I want to do 9+3+28 /3, 
>5+6+4 /3, etc... and then have it return a vector. I'm assuming that if I can 
>sum it, I can count it to so summing this would be just as helpful.
> 
> I understand I can first go through each element of the list, get a vector, 
>cbind into  matrix and sum across but I was hoping to avoid that... I tried 
>getting it to work with mapply but am having difficulties...
> 
> Thanks!
> 
> Kind regards,
> Greg
> ______________________________________________
> 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]]



------------------------------

Message: 83
Date: Fri, 29 Oct 2010 17:10:49 -0700
From: Henrik Bengtsson <hb@stat.berkeley.edu>
To: Claudia Beleites <cbeleites@units.it>
Cc: R Help <r-help@r-project.org>
Subject: Re: [R] R and Matlab
Message-ID:
    <AANLkTikMEuNAqKeYgGwHPjYa+E=CL3uLgGjhcMKf9eWp@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi.

On Fri, Oct 29, 2010 at 3:31 AM, Claudia Beleites <cbeleites@units.it> wrote:
> Dear Henrik,
>
> sorry for bothering you with a report hastily pasted together and not
> particularly nice for you as I used my toy data flu from a non-standard
> package. I should have better used e.g. the iris.
>
> I'm aware that writeMat doesn't deal with S4 objects. In fact, if I'd
> overlook the error message, there's the 2nd chance to see that the file size
> is 0B.

Yes, it is an unfortunate side effect that if there is an error while
writing the MAT file, it gives a corrupt *.mat file.  I'll put it on
the "to do in the future" list to write to a temporary file (e.g.
*.mat.tmp) which is only renamed to *.mat when writeMat() returns
successfully.  I use that "trick" elsewhere and it has saved us a few
times.

> In fact the attempt to save flu directly was a classical "autopilot" error,
> that's why I tried to save the x afterwards.
>
> So the problem here was the unnamed storing of x.
>
>> I intentionally do not try to "infer" the name "x" from
>> writeMat("flu.mat", x), basically because I think using substitute()
>> should be avoided as far as possible, but also because it is unclear
>> what the name should be in cases such as writeMat("flu.mat", 1:10).
>
> I was just going to suggest a patch that assigns the names of type Vnumber
> to the unnamed objects - but when I wanted to get the source I realized your
> version with the warning is already out.
>
> I think, however, you may forgot a nchar?: any (nchar (names) == 0)

Thanks for spotting that; a merge of (nchar (names) == 0) and (names
== "") incorrectly became (names == 0). Corrected in the next release.

>
> So here's my suggestion for l. 775-777 of writeMat.R:
>
> ?if (is.null(names) || any (nchar (names) == 0L)) {
> ? ?names [nchar (names) == 0L] <- paste ("V", which (nchar (names) == 0L),
> sep = "")
> ? ?names (args) <- names
> ? ?warning("All objects written have to be named, e.g. use writeMat(...,
> x=a, y=y) and not writeMat(..., x=a, y): ", deparse(sys.call()), "\nDummy
> names have been assigned.");
> ?}

I did think about that, however, it may introduce other ambiguities.
For instance, consider

writeMat("foo.mat", V2=1, 2);

Then there will be two "V2" names.  The analogue to read.table() or
data.frame() is to add ".1" etc when there is a clash, e.g. "V2" and
"V2.1".  However, "V2.1" is not a valid name in Matlab.  What should
then be done?  Of course, you can try to make sure you generate valid
Matlab names.

On a related matter, today you can do writeMat("foo.mat", V2=1,
"V2.1"=2) and there is no warning/error given by writeMat() and it
reads correctly by readMat().  However, in Matlab you get

>> load('foo.mat')
??? Error using ==> load
Invalid field name: 'V2.1'.

If anyone knows a regular expression for testing the validity of names
such that they are valid Matlab variable/field names, please let me
know and I can add additional sanity checks in writeMat().

Also, as your initial example indicates that it could be surprising
that writeMat("foo.mat", x) would become writeMat("foo.mat", V1=x) and
not writeMat("foo.mat", x=x).

After further investigation, I actually think that although Matlab
indeed can read non-named objects using data=load('foo.mat') I don't
think they are accessible.  So I was wrong.  Because of this, I have
bumped up the warning to be an error, preventing non-named objects to
be written.  Will be the case in the next release of the package.

I will postpone adding any bells and whistles trying to make
writeMat() smart such as adding names.  As soon as you do that you
introduce other issues and expectations and have to worry about
backward compatibilities if it turns out to be a bad idea.  My
strategy for now is to have writeMat() assert that only valid MAT
files are written, and give errors otherwise.

/Henrik

>
>
> After all, e.g. data.frame () will also rather create dummy names for
> unnamed columns. And, I think, a warning should make the user aware that
> he's doing something that _may_ not work out as intendet. But here I think
> it is _most likely_ not working as intended.
>
>
>> MISCELLANEOUS:
>> Note that writeMat() cannot write compressed MAT files. ?It is
>> documented in help("readMat"), and will be so in help("writeMat") in
>> the next release. ?Package Rcompression, loaded or not, has no effect
>> on writeMat(). ?It is only readMat() that can read them, if
>> Rcompression is installed. ?You do not have to load it
>> explicitly/yourself - if readMat() detects a compress MAT file, it
>> will automatically try to load it;
>
> OK, good to know.
>
> Thanks a lot for your explanation in spite of my bad report.
>
> Claudia
>
>
> --
> Claudia Beleites
> Dipartimento dei Materiali e delle Risorse Naturali
> Universit? degli Studi di Trieste
> Via Alfonso Valerio 6/a
> I-34127 Trieste
>
> phone: +39 0 40 5 58-37 68
> email: cbeleites@units.it
>
> ______________________________________________
> 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.
>



------------------------------

Message: 84
Date: Fri, 29 Oct 2010 20:39:05 -0400
From: Jorge Ivan Velez <jorgeivanvelez@gmail.com>
To: Duncan Mackay <mackay@northnet.com.au>
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] vertical list sum
Message-ID:
    <AANLkTikZQ6_0AU9maw4=ay4ay9AhAyUz6eZLESq6XoH8@mail.gmail.com>
Content-Type: text/plain

Hi Duncan,

If vectors of unequal length is the problem, one way to go, using your
example, would be:

# your example
x <- list(c(9, 5, 7, 2, 14, 4, 4, 3), c(3, 6, 25, 2, 14, 3, 3, 4),
    c(28, 4, 14, 3, 14, 2, 4, 5), 28)
x

# maximum number of components
k <- max(sapply(x, length))
k

# expanding each list of x to have k elements
lapply(x, function(l) l[1:k])

# average as requested by Greg
colMeans(do.call(rbind, lapply(x, function(l) l[1:k])), na.rm = TRUE)

HTH,
Jorge


On Fri, Oct 29, 2010 at 7:37 PM, Duncan Mackay <> wrote:

> Hi Jorge
>
> I tried your methods for all (which work for complete rows) and then I
> remove the first value of $y and repeated; both fail because of the  unequal
> numbers
> The problem is when there are unequal numbers in the rows and trying to
> make a matrix of them.
>
> I was trying some things with Greg's vaules.
> x <- list()
> x[[1]] <- c(9,5,7,2, 14,  4,  4,  3)
> x[[2]] <- c(3,  6, 25,  2, 14,  3,  3 , 4)
> x[[3]] <- c(28,  4 ,14,  3, 14,  2  ,4 , 5)
> x[4] <- list(28 , 4 ,14 , 3, 14,  2 , 4  )
>
> x.av <- list()
> for(j in seq_along(1:max(sapply(x,length))) ) x.av[j] <-
> mean(sapply(x,"[",j),na.rm=T)
> unlist(x.av) # if you want a vector
>
> which Greg may have used first
>
> Regards
>
> Duncan
>
> Duncan Mackay
> Department of Agronomy and Soil Science
> University of New England
> ARMIDALE NSW 2351
> Email home: mackay@northnet.com.au
>
>
> At 08:53 30/10/2010, you wrote:
>
>> Hi Greg,
>>
>> Here are two ways of doing it:
>>
>> > mylist <- list(x = rpois(10, 10), y = rpois(10, 20), z = rpois(10, 5))
>> > mylist
>> $x
>>  [1]  3 13 14 16 10  7  3  5 12 14
>>
>> $y
>>  [1] 17 16 26 13 23 24 16 28 23 12
>>
>> $z
>>  [1]  2  6  5  5  5  1  9 11  6  4
>>
>> >
>> > colMeans(do.call(rbind, mylist), na.rm = TRUE)
>>  [1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333
>> 14.666667 13.666667
>> [10] 10.000000
>> >
>> > Reduce("+", mylist)/length(mylist)
>>  [1]  7.333333 11.666667 15.000000 11.333333 12.666667 10.666667  9.333333
>> 14.666667 13.666667
>> [10] 10.000000
>>
>>
>> HTH,
>> Jorge
>>
>>
>> On Fri, Oct 29, 2010 at 6:46 PM, Gregory Ryslik <> wrote:
>>
>> > Hi Everyone,
>> >
>> > I have a list of vectors like this (in this case it's 3 vectors but
>> assume
>> > the vector count and the length of each vector is not known):
>> >
>> > [[1]]
>> > [1]  9  5  7  2 14  4  4  3
>> >
>> > [[2]]
>> > [1]  3  6 25  2 14  3  3  4
>> >
>> > [[3]]
>> > [1] 28  4 14  3 14  2  4  5
>> >
>> > What I want to do is take the average vertically. Thus I want to do
>> 9+3+28
>> > /3, 5+6+4 /3, etc... and then have it return a vector. I'm assuming that
>> if
>> > I can sum it, I can count it to so summing this would be just as
>> helpful.
>> >
>> > I understand I can first go through each element of the list, get a
>> vector,
>> > cbind into  matrix and sum across but I was hoping to avoid that... I
>> tried
>> > getting it to work with mapply but am having difficulties...
>> >
>> > Thanks!
>> >
>> > Kind regards,
>> > Greg
>> > ______________________________________________
>> > 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-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]]



------------------------------

Message: 85
Date: Fri, 29 Oct 2010 17:49:57 -0700
From: Joshua Wiley <jwiley.psych@gmail.com>
To: mmstat@comcast.net
Cc: R-help@r-project.org
Subject: Re: [R] plot pdf
Message-ID:
    <AANLkTi=bNWnQxkkB1knWnDBFkCUcUTG75hgGdyJwt8xH@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi Mary,

I am not sure off hand why savePlot() is not doing what you expect,
but hopefully my inline comments answer your other questions and at
least get you the graphs you want.

Cheers,

Josh

On Fri, Oct 29, 2010 at 3:18 PM,  <mmstat@comcast.net> wrote:
>
>
> I want to plot the unstadardized version of a normal plot.? Can you explain why 
>that is not working?
> Dev.set(1)
> xcrit=-1.645
> cord.x <- c(-3,seq(-3,xcrit,0.01),xcrit)
> cord.y <- c(0,dnorm(seq(-3,xcrit,0.01)),0)?? # what does final 0 do here?

You are creating *coordinates* to draw a polygon.  That is, (x, y).
The 0s just match with -3 and xcrit and serve to define the perimeter
of the polygon.  Please read the documentation for ?polygon for more
details.

> curve(dnorm(x,0,1),xlim=c(-3,3),main='Normal PDF')

This makes your nice curve based on the density function for the
normal distribution with a range from -3 to +3.  This part works fine
for me.

> polygon(cord.x,cord.y,col='orange')

This does the coloring, the coordinates define the polygon, which is
closed by connecting the first and last points.  This also seems to
work.  I end up with the lower region of the graph filled orange.

> savePlot(filename="c:\\ssl_z.emf",type="emf") ?????????#unable to create 
>metafile?? why?

hard for me to say right now (I'm on a linux box).  It might help
though if you reported sessionInfo()

> x=seq(80,200,1)
> plot(x,dnorm(x,140,15),type="l",ylab="Probability")

This seems fine to me also.

> dev.set(4)

> xcrit=135.9
> cord.x <- c(80,seq(80,xcrit,.1),xcrit)
> cord.y <- c(0,dnorm(seq(80,xcrit,.1)),0)??????????????#final 0 needs to be 
>changed but to what?

Why does the final zero need to be changed?  What do you want it to
be?  I suspect you do need to change dnorm() though.  You are creating
y coordinates based on a normal distribution with mean 0 and sd = 1,
but then you plot a curve for a mean of 140 and sd = 15.  I would
adjust your code to:

cord.y <- c(0, dnorm(seq(80, xcrit, .1), 140, 15), 0)

which gives the results I *think* you are after.


> curve(dnorm(x,140,15),xlim=c(80,200),main='Normal PDF',ylab="Probability")
> polygon(cord.x,cord.y,col='orange')

Using the adjustment I showed above, I now get a graph that is filled
orange from 80 to xcrit (under the normal curve).

> savePlot(filename="c:\\ssl_z.emf",type="emf")???????? #unable to create 
>metafile?? why?
>
>
> Sincerely,
>
> Mary A. Marion
>
>
> ? ? ? ?[[alternative HTML version deleted]]

I manually removed spaces in my reply.  In the future it nice if you
could send plain text emails (since the html ones are scrubbed).

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



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



------------------------------

Message: 86
Date: Fri, 29 Oct 2010 17:56:49 -0700 (PDT)
From: will phillips <will.phillips@q.com>
To: r-help@r-project.org
Subject: [R] grouping question
Message-ID: <1288400209190-3019922.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hello

I have what is probably a very simple grouping question however, given my
limited exposure to R, I have not found a solution yet despite my research
efforts and wild attempts at what I thought "might" produce some sort of
result.

I have a very simple list of integers that range between 1 and 24.  These
correspond to hours of the day.

I am trying to create a grouping of Day and Night with 
Day = 6 to 17.99
Night = 1 to 5.59  and  18 to 24

Using the Cut command I can create the segments but I have not found a
"combine" type of command to merger the two "night" segments.  No luck with
if/else either.

Any help would be greatly appreciated

Thank you

Will


-- 
View this message in context: 
http://r.789695.n4.nabble.com/grouping-question-tp3019922p3019922.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 87
Date: Fri, 29 Oct 2010 21:31:57 -0400
From: jim holtman <jholtman@gmail.com>
To: will phillips <will.phillips@q.com>
Cc: r-help@r-project.org
Subject: Re: [R] grouping question
Message-ID:
    <AANLkTinKdp5HFyTHCxriBKoMGVKfZQvSOG+Mmq10Wwkw@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

try this:

> x
[1]  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
> y <- cut(x, breaks=c(-Inf,6,18, Inf), labels=c('a','b','c'))
> levels(y) <- c('night','day','night')
> y
[1] night night night night night night night day   day   day   day
day   day   day   day   day   day   day
[19] day   night night night night night night
Levels: night day
>


On Fri, Oct 29, 2010 at 8:56 PM, will phillips <will.phillips@q.com> wrote:
>
> Hello
>
> I have what is probably a very simple grouping question however, given my
> limited exposure to R, I have not found a solution yet despite my research
> efforts and wild attempts at what I thought "might" produce some sort of
> result.
>
> I have a very simple list of integers that range between 1 and 24. ?These
> correspond to hours of the day.
>
> I am trying to create a grouping of Day and Night with
> Day = 6 to 17.99
> Night = 1 to 5.59 ?and ?18 to 24
>
> Using the Cut command I can create the segments but I have not found a
> "combine" type of command to merger the two "night" segments. ?No luck with
> if/else either.
>
> Any help would be greatly appreciated
>
> Thank you
>
> Will
>
>
> --
> View this message in context: 
>http://r.789695.n4.nabble.com/grouping-question-tp3019922p3019922.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.
>



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

What is the problem that you are trying to solve?



------------------------------

Message: 88
Date: Fri, 29 Oct 2010 21:38:51 -0400
From: Jorge Ivan Velez <jorgeivanvelez@gmail.com>
To: will phillips <will.phillips@q.com>
Cc: r-help@r-project.org
Subject: Re: [R] grouping question
Message-ID:
    <AANLkTim6U9kS8ZTkOdtSG8UBDizx+iQTXp0T-8hALvz3@mail.gmail.com>
Content-Type: text/plain

Hi Will,

One way would be:

> x
[1]  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
24
> factor(ifelse(x>6 & x<18, 'day', 'night'))
[1] night night night night night night night day   day   day   day   day
day   day   day
[16] day   day   day   night night night night night night night
Levels: day night

HTH,
Jorge


On Fri, Oct 29, 2010 at 8:56 PM, will phillips <> wrote:

>
> Hello
>
> I have what is probably a very simple grouping question however, given my
> limited exposure to R, I have not found a solution yet despite my research
> efforts and wild attempts at what I thought "might" produce some sort of
> result.
>
> I have a very simple list of integers that range between 1 and 24.  These
> correspond to hours of the day.
>
> I am trying to create a grouping of Day and Night with
> Day = 6 to 17.99
> Night = 1 to 5.59  and  18 to 24
>
> Using the Cut command I can create the segments but I have not found a
> "combine" type of command to merger the two "night" segments.  No luck with
> if/else either.
>
> Any help would be greatly appreciated
>
> Thank you
>
> Will
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/grouping-question-tp3019922p3019922.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

    [[alternative HTML version deleted]]



------------------------------

Message: 89
Date: Fri, 29 Oct 2010 19:11:06 -0700 (PDT)
From: will phillips <will.phillips@q.com>
To: r-help@r-project.org
Subject: Re: [R] grouping question
Message-ID: <1288404666717-3019950.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hello Jim

Wow.  I tried cut but i see you have an interim step with labels a,b,c but
levels night and day.  i was really close to this.  i have labels
night,day,night and it wouldn't let me duplicate labels.  I am very greatful
for your input

Will
-- 
View this message in context: 
http://r.789695.n4.nabble.com/grouping-question-tp3019922p3019950.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 90
Date: Fri, 29 Oct 2010 19:12:49 -0700 (PDT)
From: will phillips <will.phillips@q.com>
To: r-help@r-project.org
Subject: Re: [R] grouping question
Message-ID: <1288404769026-3019952.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hello Jorge,

Thank you for the reply.  I tried a few different things with if/else but
couldn't get them to go.  I really appreciate your feedback.  I learned
something new from this

Will
-- 
View this message in context: 
http://r.789695.n4.nabble.com/grouping-question-tp3019922p3019952.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 91
Date: Sat, 30 Oct 2010 02:54:53 +0000 (UTC)
From: Ben Bolker <bbolker@gmail.com>
To: r-help@stat.math.ethz.ch
Subject: Re: [R] date calculation
Message-ID: <loom.20101030T045356-623@post.gmane.org>
Content-Type: text/plain; charset=us-ascii

Shi, Tao <shidaxia <at> yahoo.com> writes:

> Could someone explain to me why the following result is not a integer?
> 
> > difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004", 
> >format="%d%b%Y"), units="days")
> Time difference of 195.0417 days

  Presumably because this goes across a daylight-savings time
adjustment?  0.0417=1/24 days is 1 hour ...

  Ben Bolker



------------------------------

Message: 92
Date: Fri, 29 Oct 2010 20:16:30 -0700
From: Dennis Murphy <djmuser@gmail.com>

Cc: r-help@r-project.org
Subject: Re: [R] Differenciate numbers from reference for rows
Message-ID:
    <AANLkTinAaLUNqK0q=oW07srerMdExvtz65eYiaCajmPf@mail.gmail.com>
Content-Type: text/plain

Hi:

x <- matrix(20:35, ncol = 1)
u <- c(1, 4, 5, 6, 11)      # 'x values'
m <- c(1, 3, 1, 1, 0.5)

# Function to compute the inner product of the multipliers with the
extracted
# elements of x determined by u
f <- function(mat, inputs, mults) crossprod(mat[inputs], mults)
f(x, u, mults = c(1, 3, 1, 1, 0.5))
     [,1]
[1,]  153
20 + 23 * 3 + 24 + 25 + 30 * 0.5
[1] 153

The function is flexible enough to allow you to play with the input matrix
(although a vector would also work), the 'observation vector' inputs and the
set of multipliers. Here's one way (not necessarily the most efficient):

uv <- matrix(sample(1:15, 25, replace = TRUE), ncol = 5)
uv   # like an X matrix, where each row provides the input values of the
vars
     [,1] [,2] [,3] [,4] [,5]
[1,]   12    8   11   10   15
[2,]   15   11   14   14    8
[3,]    4    8    4   10   12
[4,]   10    5    2    1    7
[5,]   11    4    9    1   11

# Apply the function f to each row of uv:
apply(uv, 1, function(y) f(x, y, mults = c(1, 3, 1, 1, 0.5)))
[1] 188.0 203.5 171.5 155.0 162.0

The direct matrix version:
crossprod(t(matrix(x[uv], ncol = 5)), c(1, 3, 1, 1, 0.5))
      [,1]
[1,] 188.0
[2,] 203.5
[3,] 171.5
[4,] 155.0
[5,] 162.0

Notice that the apply() call returns a vector whereas crossprod() returns a
matrix.
x[uv] selects the x values associated with the indices in uv and returns a
vector in column-major order. The crossprod() call transposes the reshaped
x[uv] and then 'matrix' multiplies it by the vector c(1, 3, 1, 1, 0.5).

HTH,
Dennis



>
> So, I am having a tricky reference file to extract information from.
>
> The format of the file is
>
> x   1 + 4 * 3 + 5 + 6 + 11 * 0.5
>
> So, the elements that are not being multiplied (1, 5 and 6) and the
> elements
> before the multiplication sign (4 and 11) means actually the reference for
> the row in a matrix where I need to extract the element from.
>
> The numbers after the multiplication sign are regular numbers
> Ex:
>
> > x<-matrix(20:35)
> > x
>      [,1]
>  [1,]   20
>  [2,]   21
>  [3,]   22
>  [4,]   23
>  [5,]   24
>  [6,]   25
>  [7,]   26
>  [8,]   27
>  [9,]   28
> [10,]   29
> [11,]   30
> [12,]   31
> [13,]   32
> [14,]   33
> [15,]   34
> [16,]   35
>
> I would like to read the rows 1,4,5,6 and 11 and sum then. However the
> numbers in the elements row 4 and 11 are multiplied by 3 and 0.5
>
> So it would be
> 20 + 23 * 3 + 24 + 25 + 30 * 0.5.
>
> And I have this format in different files so I can't do all by hand.
> Can anybody help me with a script that can differentiate this?
> Thanks
> --
> View this message in context:
>http://r.789695.n4.nabble.com/Differenciate-numbers-from-reference-for-rows-tp3019853p3019853.html
>l
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

    [[alternative HTML version deleted]]



------------------------------

Message: 93
Date: Sat, 30 Oct 2010 13:02:13 +0800
From: Gang Chen <gangchen6@gmail.com>
To: R-help <r-help@stat.math.ethz.ch>
Cc: hankin.robin@gmail.com
Subject: [R] Trouble installing gsl wrapper
Message-ID:
    <AANLkTikYJi+-pH1rdBbjyduVri6t2sVqBLrrzmB21uZB@mail.gmail.com>
Content-Type: text/plain; charset=windows-1252

Hi,

I'm trying to install the gsl wrapper source code
(http://cran.r-project.org/src/contrib/gsl_1.9-8.tar.gz) on a Linux
system (OpenSuse 11.1), but encountering the following problem. I've
already installed 'gsl' version 1.14
(ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz) on the system. What's
missing? Thanks a lot...

> R CMD INSTALL gsl

* installing to library ?/usr/lib64/R/library?
* installing *source* package ?gsl? ...
checking for gsl-config... /usr/local/bin/gsl-config
checking if GSL version >= 1.12... checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
make: Nothing to be done for `all'.
installing to /usr/lib64/R/library/gsl/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/lib64/R/library/gsl/libs/gsl.so':
  libgsl.so.0: cannot open shared object file: No such file or directory
ERROR: loading failed
* removing ?/usr/lib64/R/library/gsl?

> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: x86_64-unknown-linux-gnu (64-bit)



------------------------------

Message: 94
Date: Fri, 29 Oct 2010 22:41:03 -0700 (PDT)
From: Jeroen Ooms <jeroenooms@gmail.com>
To: r-help@r-project.org
Subject: Re: [R] Chrooted R + Rserve
Message-ID: <1288417263373-3020014.post@n4.nabble.com>
Content-Type: text/plain; charset=us-ascii


I am trying to reproduce this setting, but it does not seem to work anymore.
I keep getting the error: execve failed: No such file or directory.

One of the reasons is that /usr/local/bin/Rserve is no longer a standalone
executable, and is now initiated using R CMD Rserve. However, after making
the appropriate changes to the .ini, I still get the same error.

Anyone successfully reproduced this setting with a recent R/Rserve/Jailkit?
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Chrooted-R-Rserve-tp845917p3020014.html
Sent from the R help mailing list archive at Nabble.com.



------------------------------

Message: 95
Date: Fri, 29 Oct 2010 22:59:03 -0700 (PDT)

To: Phil Spector <spector@stat.berkeley.edu>
Cc: "r-help@stat.math.ethz.ch" <r-help@stat.math.ethz.ch>
Subject: Re: [R] date calculation
Message-ID: <805596.40815.qm@web30802.mail.mud.yahoo.com>
Content-Type: text/plain; charset=utf-8

Hi Phil,

Thanks for the reply, but I don't think you have 
explained where the decimal part is coming from....

...Tao



----- Original Message -----
> From:Phil Spector <spector@stat.berkeley.edu>

> Cc:r-help@stat.math.ethz.ch
> Sent:Friday, October 29, 2010 5:04:23 PM
> Subject:Re: [R] date calculation
> 
> 
> Tao -
    The documentation for the difftime function 
> says:

Function ?difftime? calculates a difference of two 
> date/time
      objects and returns an object of class 
> ?"difftime"? with an
      attribute indicating the 
> units.

So that answers your question.

If you want it to be an 
> integer, you're certainly free to make it one:

> 
> as.integer(difftime(strptime("24NOV2004", format="%d%b%Y"), 
+    
>                
> strptime("13MAY2004",format="%d%b%Y"), units="days"))
[1] 195


>                
>     - Phil Spector
        
>              Statistical Computing 
> Facility
            
>          Department of Statistics

>                
>      UC Berkeley
        
>            
> ymailto="mailto:spector@stat.berkeley.edu" 
> href="mailto:spector@stat.berkeley.edu">spector@stat.berkeley.edu



On 
> Fri, 29 Oct 2010, Shi, Tao wrote:

> Hi list,
>
> Could 
> someone explain to me why the following result is not a 
> integer?
>
>
>> difftime(strptime("24NOV2004", 
> format="%d%b%Y"), strptime("13MAY2004",
>> format="%d%b%Y"), 
> units="days")
> Time difference of 195.0417 days
>
> I'm using 
> R2.12.0 on WinXP.
>
> Thanks!
>
> ...Tao
>
> 
> ______________________________________________
> 
> ymailto="mailto:R-help@r-project.org" 
> href="mailto:R-help@r-project.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.
>







------------------------------

Message: 96
Date: Fri, 29 Oct 2010 23:02:57 -0700 (PDT)

To: Ben Bolker <bbolker@gmail.com>,    "r-help@stat.math.ethz.ch"
    <r-help@stat.math.ethz.ch>
Subject: Re: [R] date calculation
Message-ID: <834164.92960.qm@web30808.mail.mud.yahoo.com>
Content-Type: text/plain; charset=us-ascii

Hi Ben,

That must be the case!  In fact if I do:

> difftime(strptime("24NOV2004", format="%d%b%Y"), 
>strptime("13MAY2004",format="%d%b%Y"), units="days", tz="GMT")
Time difference of 195 days


which supports your claim.

Can someone from the R development team confirm this?

Thanks!

...Tao





----- Original Message -----
> From:Ben Bolker <bbolker@gmail.com>
> To:r-help@stat.math.ethz.ch
> Cc:
> Sent:Friday, October 29, 2010 7:54:53 PM
> Subject:Re: [R] date calculation
> 
> 
> Shi, Tao <shidaxia <at> 
> href="http://yahoo.com">yahoo.com> writes:

> Could someone 
> explain to me why the following result is not a integer?
> 
> > 
> difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004",
> 
> >format="%d%b%Y"), units="days")
> Time difference of 195.0417 
> days

  Presumably because this goes across a daylight-savings 
> time
adjustment?  0.0417=1/24 days is 1 hour ...

  Ben 
> Bolker

______________________________________________

> ymailto="mailto:R-help@r-project.org" 
> href="mailto:R-help@r-project.org">R-help@r-project.org mailing list

> href="https://stat.ethz.ch/mailman/listinfo/r-help" target=_blank 
> >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.



------------------------------

Message: 97
Date: Fri, 29 Oct 2010 23:23:53 -0700
From: Joshua Wiley <jwiley.psych@gmail.com>

Cc: "r-help@stat.math.ethz.ch" <r-help@stat.math.ethz.ch>
Subject: Re: [R] date calculation
Message-ID:
    <AANLkTikowcWEU2ptMz8mDRPDc=_ZR9ffM8e2mUg6jpMu@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8


> Hi Ben,
>
> That must be the case! ?In fact if I do:
>
>> difftime(strptime("24NOV2004", format="%d%b%Y"), 
>>strptime("13MAY2004",format="%d%b%Y"), units="days", tz="GMT")
> Time difference of 195 days
>
>
> which supports your claim.
>
> Can someone from the R development team confirm this?

Combining empirical results with the documentation (you can read more
details about how timezones and dates are handled at ?DateTimeClasses
) which states that dst is used for relevant timezones (although this
behavior can be OS dependent), this is not really necessary.

For example, note that if one goes to a time before daylight savings:

> difftime(strptime("24NOV1902", format="%d%b%Y"), 
>strptime("13MAY1902",format="%d%b%Y"), units="days")
Time difference of 195 days

and that the hours match exactly what one would expect given dst.

> difftime(strptime("24NOV2004", format="%d%b%Y"), 
>strptime("13MAY2004",format="%d%b%Y"), units="hours")
Time difference of 4681 hours
> 195 * 24 + 1
[1] 4681


In short, difftime() is performing as stated and documented (if
slightly unexpected at first glance).

Cheers,

Josh

>
> Thanks!
>
> ...Tao
>
>
>
>
>
> ----- Original Message -----
>> From:Ben Bolker <bbolker@gmail.com>
>> To:r-help@stat.math.ethz.ch
>> Cc:
>> Sent:Friday, October 29, 2010 7:54:53 PM
>> Subject:Re: [R] date calculation
>>
>>
>> Shi, Tao <shidaxia <at>
>> href="http://yahoo.com">yahoo.com> writes:
>
>> Could someone
>> explain to me why the following result is not a integer?
>>
>> >
>> difftime(strptime("24NOV2004", format="%d%b%Y"), strptime("13MAY2004",
>>
>> >format="%d%b%Y"), units="days")
>> Time difference of 195.0417
>> days
>
> ?Presumably because this goes across a daylight-savings
>> time
> adjustment? ?0.0417=1/24 days is 1 hour ...
>
> ?Ben
>> Bolker
>
> ______________________________________________
>
>> ymailto="mailto:R-help@r-project.org"
>> href="mailto:R-help@r-project.org">R-help@r-project.org mailing list
>
>> href="https://stat.ethz.ch/mailman/listinfo/r-help" target=_blank
>> >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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



------------------------------

Message: 98
Date: Sat, 30 Oct 2010 07:58:57 +0100 (BST)
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
To: Gang Chen <gangchen6@gmail.com>
Cc: R-help <r-help@stat.math.ethz.ch>, hankin.robin@gmail.com
Subject: Re: [R] Trouble installing gsl wrapper
Message-ID: <alpine.LFD.2.00.1010300744240.1292@gannet.stats.ox.ac.uk>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

On Sat, 30 Oct 2010, Gang Chen wrote:

> Hi,
>
> I'm trying to install the gsl wrapper source code
> (http://cran.r-project.org/src/contrib/gsl_1.9-8.tar.gz) on a Linux
> system (OpenSuse 11.1), but encountering the following problem. I've
> already installed 'gsl' version 1.14
> (ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz) on the system. What's
> missing? Thanks a lot...

Installing the gsl library correctly?  I need to guess quite a bit 
here (and a clean install attempt would have given a few more clues).

I suspect you installed into /usr/local/lib whereas your OS probably 
uses /usr/local/lib64 (most x86_64 Linuxen do, and you seem to be 
using lib64 for R).  In that case ld.so most likely will not find the 
dynamic library in /usr/local/lib.

You can avoid such problems by installing auxiliary software such as 
gsl from RPMs -- I would be very surprised if OpenSuse did not have 
gsl and gsl-devel RPMs.  Otherwise you need to install from the 
sources by something like

make install libdir=/usr/local/lib64

>
>> R CMD INSTALL gsl
>
> * installing to library ?/usr/lib64/R/library?
> * installing *source* package ?gsl? ...
> checking for gsl-config... /usr/local/bin/gsl-config
> checking if GSL version >= 1.12... checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> yes
> configure: creating ./config.status
> config.status: creating src/Makevars
> ** libs
> make: Nothing to be done for `all'.

This was not a clean install ....

> installing to /usr/lib64/R/library/gsl/libs
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices ...
> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>  unable to load shared object '/usr/lib64/R/library/gsl/libs/gsl.so':
>  libgsl.so.0: cannot open shared object file: No such file or directory
> ERROR: loading failed
> * removing ?/usr/lib64/R/library/gsl?
>
>> sessionInfo()
> R version 2.12.0 (2010-10-15)
> Platform: x86_64-unknown-linux-gnu (64-bit)


-- 
Brian D. Ripley,                  ripley@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, UK                Fax:  +44 1865 272595

------------------------------

Message: 99
Date: Sat, 30 Oct 2010 15:14:48 +0800
From: Gang Chen <gangchen6@gmail.com>
To: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Cc: R-help <r-help@stat.math.ethz.ch>, hankin.robin@gmail.com
Subject: Re: [R] Trouble installing gsl wrapper
Message-ID:
    <AANLkTi=ASZF5vdVgw1yk0-SywP_Ko7ra7ALm_Zkb_y3x@mail.gmail.com>
Content-Type: text/plain; charset=windows-1252

You nailed it, Prof. Ripley! Thanks a lot...

Gang

On Sat, Oct 30, 2010 at 2:58 PM, Prof Brian Ripley
<ripley@stats.ox.ac.uk> wrote:
> On Sat, 30 Oct 2010, Gang Chen wrote:
>
>> Hi,
>>
>> I'm trying to install the gsl wrapper source code
>> (http://cran.r-project.org/src/contrib/gsl_1.9-8.tar.gz) on a Linux
>> system (OpenSuse 11.1), but encountering the following problem. I've
>> already installed 'gsl' version 1.14
>> (ftp://ftp.gnu.org/gnu/gsl/gsl-1.14.tar.gz) on the system. What's
>> missing? Thanks a lot...
>
> Installing the gsl library correctly? ?I need to guess quite a bit here (and
> a clean install attempt would have given a few more clues).
>
> I suspect you installed into /usr/local/lib whereas your OS probably uses
> /usr/local/lib64 (most x86_64 Linuxen do, and you seem to be using lib64 for
> R). ?In that case ld.so most likely will not find the dynamic library in
> /usr/local/lib.
>
> You can avoid such problems by installing auxiliary software such as gsl
> from RPMs -- I would be very surprised if OpenSuse did not have gsl and
> gsl-devel RPMs. ?Otherwise you need to install from the sources by something
> like
>
> make install libdir=/usr/local/lib64
>
>>
>>> R CMD INSTALL gsl
>>
>> * installing to library ?/usr/lib64/R/library?
>> * installing *source* package ?gsl? ...
>> checking for gsl-config... /usr/local/bin/gsl-config
>> checking if GSL version >= 1.12... checking for gcc... gcc
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... yes
>> checking whether we are cross compiling... no
>> checking for suffix of executables...
>> checking for suffix of object files... o
>> checking whether we are using the GNU C compiler... yes
>> checking whether gcc accepts -g... yes
>> checking for gcc option to accept ISO C89... none needed
>> yes
>> configure: creating ./config.status
>> config.status: creating src/Makevars
>> ** libs
>> make: Nothing to be done for `all'.
>
> This was not a clean install ....
>
>> installing to /usr/lib64/R/library/gsl/libs
>> ** R
>> ** inst
>> ** preparing package for lazy loading
>> ** help
>> *** installing help indices
>> ** building package indices ...
>> ** testing if installed package can be loaded
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>> ?unable to load shared object '/usr/lib64/R/library/gsl/libs/gsl.so':
>> ?libgsl.so.0: cannot open shared object file: No such file or directory
>> ERROR: loading failed
>> * removing ?/usr/lib64/R/library/gsl?
>>
>>> sessionInfo()
>>
>> R version 2.12.0 (2010-10-15)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>
>
> --
> Brian D. Ripley, ? ? ? ? ? ? ? ? ?ripley@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, UK ? ? ? ? ? ? ? ?Fax: ?+44 1865 272595



------------------------------

Message: 100
Date: Sat, 30 Oct 2010 10:03:44 +0200
From: Wolfgang Polasek <wolfgang.polasek@gmail.com>
To: r-help@r-project.org
Subject: [R] how to find a function for plotting polygon surfaces:
    polgon3d(xc, yc, obs)
Message-ID:
    <AANLkTimJYdO2=iRzvqSgDd9NiYtdE-oNsYCf=LT7xjAa@mail.gmail.com>
Content-Type: text/plain

I have  set of n coordinates xc, yc (but not a grid!) and n observations obs
at these points.
Where to find a simple plot function (3D perspective) that plots a polygon
(alternative: just segmented points over a map, as eg in library maps).
rgl.surface(xc,yc,obs) is not working.

Thanks
W.Polasek

    [[alternative HTML version deleted]]



------------------------------

Message: 101
Date: Sat, 30 Oct 2010 02:09:46 -0700 (PDT)

To: Rhelp <r-help@r-project.org>
Subject: [R] one function with 2 returnh points
Message-ID: <318195.33592.qm@web120102.mail.ne1.yahoo.com>
Content-Type: text/plain

Hello everyone.
I have written quite a big function that at the end correctly returns the values 

I want. I found a rare exception that I want to cover also. The easier for me 
would be to write something like that


function(){
    
  if (rare exception happened)
      return that value

  # The comes the code for normal execution
  # ...
  # ...
  return value # Normal values to return

}



Would that be feasible with R or two returns statements are not accepted?

Regards
Alex


      
    [[alternative HTML version deleted]]



------------------------------

Message: 102
Date: Sat, 30 Oct 2010 11:31:35 +0200
From: Liviu Andronic <landronimirc@gmail.com>

Cc: Rhelp <r-help@r-project.org>
Subject: Re: [R] one function with 2 returnh points
Message-ID:
    <AANLkTi=t-oO3DFw1pyriK+yZT4boEyHi0EZh_mkEmtJp@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8


> Hello everyone.
> I have written quite a big function that at the end correctly returns the
>values
> I want. I found a rare exception that I want to cover also. The easier for me
> would be to write something like that
>
>
> function(){
>
> ?if (rare exception happened)
> ? ? ?return that value
>
> ?# The comes the code for normal execution
> ?# ...
> ?# ...
> ?return value # Normal values to return
>
> }
>
Are you looking for something similar?
fun <-
    function(x)
{
    if(is.character(x)){
        return(paste('Error: wrong!'))
    }
    res <- sum(1:10)
    return(res)
}

> fun('asdf')
[1] "Error: wrong!"
> fun(1:10)
[1] 55



>
>
> Would that be feasible with R or two returns statements are not accepted?
>
> Regards
> Alex
>
>
>
> ? ? ? ?[[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.
>



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail



------------------------------

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

End of R-help Digest, Vol 92, Issue 31
**************************************



      
	[[alternative HTML version deleted]]

