Re: [R] Can't Get Lattice Histogram Minor Tick Marks to Work

2018-04-24 Thread Duncan Mackay
Hi You may need to make a custom function for yscale.components; I think there is an example in the help guides Also have a look at https://stat.ethz.ch/pipermail/r-help/2007-June/134524.html Regards Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England

Re: [R] Can't Get Lattice Histogram Minor Tick Marks to Work

2018-04-24 Thread Donald Macnaughton
Thanks Jeff, I attached a file with the program to my earlier email because the posting guide seemed to imply that non-binary attachments would work. But I see that the file was stripped off. I installed the program file on a web site, but when I downloaded it, the line breaks were stripped

Re: [R] Can't Get Lattice Histogram Minor Tick Marks to Work

2018-04-24 Thread Jeff Newmiller
Per the Posting Guide, why didn't you post the reproducible R code example? On April 24, 2018 8:22:15 PM PDT, Donald Macnaughton wrote: >I'm drawing a paneled histogram using the lattice package. I've >succeeded in >adding minor tick marks to the vertical axis, but I can't

[R] Can't Get Lattice Histogram Minor Tick Marks to Work

2018-04-24 Thread Donald Macnaughton
I'm drawing a paneled histogram using the lattice package. I've succeeded in adding minor tick marks to the vertical axis, but I can't get the desired number of minor tick marks between the major tick marks. I've attached a self-contained program to illustrate the problem. Thanks for your help,

Re: [ESS] ess-dump-object-into-edit-buffer

2018-04-24 Thread Patrick Connolly
On Tue, 24-Apr-2018 at 08:20AM -0400, Ista Zahn wrote: |> On Tue, Apr 24, 2018 at 4:13 AM, Patrick Connolly |> wrote: |> > On Mon, 16-Apr-2018 at 09:02AM -0400, Ista Zahn wrote: |> > |> > [...] |> > |> > |> This suggests to me that you did _not_ start with emacs -q,

Re: [R] Rolling window difference for zoo time series

2018-04-24 Thread Achim Zeileis
On Tue, 24 Apr 2018, Eric Berger wrote: Zoo_TS/lag(Zoo_TS) - 1 Or: diff(Zoo_TS, arithmetic = FALSE) - 1 On Tue, Apr 24, 2018 at 9:29 PM, Christofer Bogaso < bogaso.christo...@gmail.com> wrote: Hi, I have a 'zoo' time series as below : Zoo_TS = zoo(5:1, as.Date(Sys.time())+0:4) Now I

Re: [R] Copy text from Script syntax into .txt

2018-04-24 Thread Greg Snow
Look at the spin and stitch functions in the knitr package if you want to process an existing script into an output that mixes the code run with the output. Look at the txtStart and related functions in the TeachingDemos package if you want the code and output saved in a file from a session where

Re: [R] Rolling window difference for zoo time series

2018-04-24 Thread Eric Berger
Zoo_TS/lag(Zoo_TS) - 1 On Tue, Apr 24, 2018 at 9:29 PM, Christofer Bogaso < bogaso.christo...@gmail.com> wrote: > Hi, > > I have a 'zoo' time series as below : > > Zoo_TS = zoo(5:1, as.Date(Sys.time())+0:4) > > Now I want to calculate First order difference of order 1, rolling > window basis

[R] Rolling window difference for zoo time series

2018-04-24 Thread Christofer Bogaso
Hi, I have a 'zoo' time series as below : Zoo_TS = zoo(5:1, as.Date(Sys.time())+0:4) Now I want to calculate First order difference of order 1, rolling window basis i.e. (Zoo_TS[2] - Zoo_TS[1] ) / Zoo_TS[1] (Zoo_TS[3] - Zoo_TS[2] ) / Zoo_TS[2] . Is there any direct function available to

[R] TukeyHSD and glht differ for models with a covariate

2018-04-24 Thread Nicholas Negovetich
I have a question about TukeyHSD and the glht function because I'm getting different answers when a covariate is included in model for ANCOVA.  I'm using the cabbages dataset in the 'MASS' package for repeatability.  If I include HeadWt as a covariate, then I get different answers when

[R] TEST message

2018-04-24 Thread Ted Harding
Apologies for disturbance! Just checking that I can get through to r-help. Ted. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] [FORGED] Extracting specified pages from a lattice ("trellis") object.

2018-04-24 Thread Duncan Mackay
Hi Rolf do you need to use the layout argument? The layout is conditioned by the levels of a or unique values if not a factor. easier with factor unique(dta$a) [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" data.frame( a= unique(dta$a), page = rep(1:3, ea = 4), col = 1:2,row =

Re: [ESS] ess-dump-object-into-edit-buffer

2018-04-24 Thread Ista Zahn
On Tue, Apr 24, 2018 at 4:13 AM, Patrick Connolly wrote: > On Mon, 16-Apr-2018 at 09:02AM -0400, Ista Zahn wrote: > > [...] > > |> This suggests to me that you did _not_ start with emacs -q, so indeed > |> you should start looking at your configuration to see where the

Re: [R] How to visualise what code is processed within a for loop

2018-04-24 Thread Luca Meyer
Hi Bob, Thank you for your suggestion. Actually d0 is a dataframe, does that change something in the code you propose? Kind regards, Luca 2018-04-24 10:19 GMT+02:00 Bob O'Hara : > The loop never assigns anything to d0, only t. The first line makes t > a character string

Re: [R] Copy text from Script syntax into .txt

2018-04-24 Thread Thierry Onkelinx
Dear Roberto, The easiest way IMHO is to convert your script into an R markdown document. See https://rmarkdown.rstudio.com/ Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR

[R] Copy text from Script syntax into .txt

2018-04-24 Thread P. Roberto Bakker
Hi everybody, How can I get text from RScript (e.g. syntax, reminder) into the result text. Sink() does not do that - I only read the results and therefore I have to 'guess' which syntax was used where - reminders I wrote are lost. Bw and thank you in advance, Roberto [[alternative

Re: [R] How to visualise what code is processed within a for loop

2018-04-24 Thread Bob O'Hara
The loop never assigns anything to d0, only t. The first line makes t a character string "d0$V1" (or "d0$V2" etc.). The second line assigns either 0 or 1 to t. Looking at this, I don't think you've got into the R psychology (bad news if you want to use R, good news in many other ways). I assume

Re: [ESS] ess-dump-object-into-edit-buffer

2018-04-24 Thread Patrick Connolly
On Mon, 16-Apr-2018 at 09:02AM -0400, Ista Zahn wrote: [...] |> This suggests to me that you did _not_ start with emacs -q, so indeed |> you should start looking at your configuration to see where the |> problem is. Did you try commenting out the 'ess-source-directory' |> setting to see if that

[R] How to visualise what code is processed within a for loop

2018-04-24 Thread Luca Meyer
Hi, I am trying to debug the following code: for (i in 1:10){ t <- paste("d0$V",i,sep="") t <- ifelse(regexpr(d1[i,1],d0$X0)>0,1,0) } and I would like to see what code is actually processing R, how can I do that? More to the point, I am trying to update my variables d0$V1 to d0$V10