Re: [R] Trying to get the prior value of a record from a data.frame . . . data.frame

2024-11-28 Thread Kimmo Elo
Hi, is there a specific reason to use "shift"? I mean, you could easily achieve what you described by simple indexing: --- snjp --- for (i in 1:10) { cat("x[i,num]",x[i,"num"],"\n") # Get previous value of x[i,"num"] zoop<-x[i-1,"num"] # NB! Returns "integer(0)" for ro

[R] Trying to get the prior value of a record from a data.frame . . . data.frame

2024-11-28 Thread Sorkin, John
I need to write code that will give me the previous value of from a data.frame. I have written the following code using the shift function from data.table . It does not work. I hope someone can help me correct the code. ### # Try to understand shift # #

Re: [R] Remove all box around a plot except bottom line (base graphics)

2024-11-28 Thread Olivier Crouzet
Dear Michael, Isn't the axis() function what you're looking for? plot(rnorm(10), rnorm(10), axes=FALSE) axis(1) see help(axis) Yours. Olivier. On Thu, 28 Nov 2024 13:36:21 + Michael Dewey wrote: > To make the plot clearer I have removed the axes but I wish to remove > all the boz exce

Re: [R] Remove all box around a plot except bottom line (base graphics)

2024-11-28 Thread Martin Maechler
> Michael Dewey > on Thu, 28 Nov 2024 15:27:59 + writes: > Thank you Duncan, I will try that next. > Michael > On 28/11/2024 13:52, Duncan Murdoch wrote: >> On 2024-11-28 8:36 a.m., Michael Dewey wrote: >>> To make the plot clearer I have removed the axes but

Re: [R] Remove all box around a plot except bottom line (base graphics)

2024-11-28 Thread Michael Dewey
Thank you Duncan, I will try that next. Michael On 28/11/2024 13:52, Duncan Murdoch wrote: On 2024-11-28 8:36 a.m., Michael Dewey wrote: To make the plot clearer I have removed the axes but I wish to remove all the boz except the bottom horizontal line. Using the bty parameter does not seem to

Re: [R] Remove all box around a plot except bottom line (base graphics)

2024-11-28 Thread Duncan Murdoch
On 2024-11-28 8:36 a.m., Michael Dewey wrote: To make the plot clearer I have removed the axes but I wish to remove all the boz except the bottom horizontal line. Using the bty parameter does not seem to enable me to just leave the horizontal line at the foot. I can get the "l" version to remove

[R] Remove all box around a plot except bottom line (base graphics)

2024-11-28 Thread Michael Dewey
To make the plot clearer I have removed the axes but I wish to remove all the boz except the bottom horizontal line. Using the bty parameter does not seem to enable me to just leave the horizontal line at the foot. I can get the "l" version to remove everything except the left hand side and the