Re: [R] [FORGED] Adding % sign to ticks in persp()

2018-08-05 Thread Christofer Bogaso
Awesome, thanks! On Mon, Aug 6, 2018 at 2:54 AM Paul Murrell wrote: > Hi > > Not in the persp() function itself, but the following code converts the > persp() output to 'grid' output then modifies the labels to add > percentage signs ... > > x <- seq(-10, 10, length= 30) > y <- x > f <- function

Re: [R] Perform GEE regression in R with multiple dependent variables

2018-08-05 Thread Duncan Mackay
Hi Please read the geepack manual carefully. GEE ordinal regression is not simple. You need to format your data and do not use sample as a storage name. It is the name of a function dta is storage dta$Ideo_Ordinal <- ordered(factor(dta$Ideo_Ordinal)) m0 <- ordgee(Ideo_Ordinal ~ Machiavellianism

Re: [R] [FORGED] Adding % sign to ticks in persp()

2018-08-05 Thread Paul Murrell
Hi Not in the persp() function itself, but the following code converts the persp() output to 'grid' output then modifies the labels to add percentage signs ... x <- seq(-10, 10, length= 30) y <- x f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r } z <- outer(x, y, f) z[is.na(z)] <- 1 o

[R] Adding % sign to ticks in persp()

2018-08-05 Thread Christofer Bogaso
Hi, Is there any way to add styles to the tick marks in persp() function? For eample I want to add '%' suffix to the z-axis tick marks.in below plot : x <- seq(-10, 10, length= 30) y <- x f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r } z <- outer(x, y, f) z[is.na(z)] <- 1 op <- par(bg

[R] MASS::boxcox "object not found"

2018-08-05 Thread Jinsong Zhao
Hi there, I wrote a function that wraps MASS::boxcox as: bc <- function(vec) { lam <- boxcox(lm(vec ~ 1)) lam <- lam$x[which.max(lam$y)] (vec^lam - 1)/lam } When I invoke it as: > x <- runif(20) > bc(x) Error in eval(predvars, data, env) : object 'vec' not found I have googled, and re