[R] Double buffering plots on Windows

2024-03-22 Thread Bickis, Mikelis
, so that plots are rendered only after they are fully drawn, leaving the previous plot visible until it is replaced? I just used the default graphics driver on Windows — is there perhaps a different driver that will the graphics smoother? Mik Bickis Professor Emeritus Department of Mathematics a

[R] Unexplained behaviour of .Last.value

2021-06-18 Thread Bickis, Mikelis
os((-sqrt(17)-1)/8). However, if I use .Last.value after invoking the acos function in a further calculation, I get a nonsensical result. What is going on? I am running R version 4.0.0 (2020-04-24) on an iMac, operating system MacOS 11.4 “Big Sur”. Mik Bickis __

Re: [R] Why don't the comments appear in the function?

2019-11-25 Thread bickis
ction(y,brackets,rates){ > # Calculates before-tax income required to realized value y > > ints<-c(0,cumsum(diff(brackets)*rates[1:(length(rates)-1)]))-brackets*rates > x<-(y+ints)/(1-rates) > x[sum(x>brackets)] > } > > >>flist[3]

[R] Why don't the comments appear in the function?

2019-11-25 Thread bickis
brackets, rates) { ints <- c(0, cumsum(diff(brackets) * rates[1:(length(rates) - 1)])) - brackets * rates x <- (y + ints)/(1 - rates) x[sum(x > brackets)] } I am running R 3.3.2 on Mac OS X 10.10.5 Mik Bickis __ R-help@r-

Re: [R] Strange behaviour of sapply function.

2019-09-12 Thread bickis
Thanks.You are right. I have realized that the atv function returns empty for negative arguments. I was not aware that this would affect how sapply processes its result. > > Quoting bic...@math.usask.ca: > >> Here is are a few lines of my R session: >> >>> class(income) >> [1] "integer" >>>

[R] Strange behaviour of sapply function.

2019-09-12 Thread bickis
Here is are a few lines of my R session: > class(income) [1] "integer" > class(sapply(1000*income-999,atv,sktaxb,sktax)) [1] "numeric" > class(sapply(1000*income-1001,atv,sktaxb,sktax)) [1] "list" Although "income" is a numeric array, and sapply works as expected returning an array (the function

[R] R console not echoing input

2017-07-03 Thread Professor Bickis
on and start again, but if I have lots of graphics windows on the screen, I don’t want to lose them all and have to recreate them, not to mention having to play with the par parameters again. Mik Bickis __ R-help@r-project.org mailing list -- To UNSUBSC

[R] Strange display of saved functions

2017-01-30 Thread Mik Bickis
What is happening to the displays of my function definitions? I have never witnessed such behaviour before. Is there some option I have to set (globally) to suppress this redundancy? Mik Bickis Department of

Re: [R] Sorting Surv objects

2015-02-14 Thread Professor Bickis
Thanks for the quick response. My work-around was suggested as a quick fix for right-censored data, not as a general sort method for censored data. My concern was that sort does not work on right-censored data as described in the xtfrm documentation. Mik Bickis > On Feb 13, 2015, at 05

[R] Sorting Surv objects

2015-02-12 Thread Professor Bickis
It seems that Surv objects do not sort correctly. This seems to be a bug. Anyone else found this? >survival.data [1] 4+ 3 1+ 2 5+ >class(survival.data) [1] "Surv" >sort(survival.data) [1] 2 1+ 4+ 3 5+ An easy work-around is to define a function sort.Surv >sort.Surv<-function(a){ord<-orde

[R] Sorting Surv objects

2015-02-12 Thread Professor Bickis
It seems that Surv objects do not sort correctly. This seems to be a bug. Anyone else found this? > survival.data [1] 4+ 3 1+ 2 5+ > class(survival.data) [1] "Surv" > sort(survival.data) [1] 2 1+ 4+ 3 5+ An easy work-around is to define a function sort.Surv sort.Surv<-function(a){ord<-or