Re: [R] Graphs for scientific publication ?

2015-06-03 Thread Jeremy Clark
The coding I've settled on to save file without clipping is: library(gridExtra) gt <- ggplot_gtable(ggplot_build(q3)) gt$layout$clip[gt$layout$name=="panel"] <- "off" gt4 <- arrangeGrob(gt) ggsave <- ggplot2::ggsave; body(ggsave) <- body(ggplot2::ggsave)[-2] ## from Baptiste ggsave("gt.pdf", plot

[R] Integration using nlsLM ?

2015-06-03 Thread Jeremy Clark
Dear All - I'm trying to integrate the following function via nlsLM - and I think the problem is something to do with passing the correct arguments (error is given below) - any help gratefully appreciated - many thanks. library(minpack.lm) dOM <- function(x, mu = 0, sigma = 1, log = FALSE) {

Re: [R] Graphs for scientific publication ?

2015-05-04 Thread Jeremy Clark
ecently updated including IOS 8.2, OS X 10.10, Xcode 6.2. I previously, and fairly recently, installed X11 (and Xquartz), and also updated R and R Cairo, but none of this has affected the above behaviour. Any advice gratefully received. Yours sincerely, Jeremy Clark library(ggplot2) library(grid

[R] Graphs for scientific publication ?

2015-04-30 Thread Jeremy Clark
Dear All, First of all, many thanks to all R contributors for a fantastic program, and especially to Hadley Wickham for creating ggplot2. The following is intended to be a warning that, if the apparently superficial problems described are not sorted out, R could well find itself being superceded.

[R] R match - could be improved ?

2015-03-15 Thread Jeremy Clark
​Dear All, The following gives a very unpleasant experience with apparently random NAs - probably it's my bad formatting of the coding - but the effect is unexpected and if undetected can lead to considerable problems: myvector1 = NULL myvector3 = NULL myvector4 = NULL myvector5 = NULL myve

Re: [R] Passing vectors through a dataframe

2014-02-07 Thread Jeremy Clark
ng ?? maxtrundx maxtrundx <- mylist[[maxr[[1 ## incorrect - gives wrong vector maxtrundx ## The question is - how can I select the correct vector from the list (ie.F4287) using an object extracted from the dataframe (eg. maxr or maxr2) ?? On Thu, Feb 6, 2014 at 6:20 PM, Dunc

[R] Passing vectors through a dataframe

2014-02-06 Thread Jeremy Clark
Dear All, I would like to be able to associate a list of vectors (one vector of which is to be called later) with some other character and numeric data. I've tried two methods: 1) I can put the vector names in quotes into the dataframe, and then extract the vector name - but this is just a charac

Re: [R] Functions in formulae ??

2013-11-26 Thread Jeremy Clark
t data plot(gg, dd10, main = "modLM4") ## plot fitted values lines(gg, fitted(modLM4), col = 2, lwd = 2) On Thu, Nov 21, 2013 at 11:57 AM, Jeremy Clark wrote: > Dear All, > > In the following simple case I can't seem to get an improved fit, > despite trying all of the

Re: [R] Functions in formulae ??

2013-11-26 Thread Jeremy Clark
values lines(gg, fitted(modLM4), col = 2, lwd = 2) On Thu, Nov 21, 2013 at 11:57 AM, Jeremy Clark wrote: > Dear All, > > In the following simple case I can't seem to get an improved fit, > despite trying all of the control possibilities. As there seem to be > no examples any

[R] Functions in formulae ??

2013-11-21 Thread Jeremy Clark
Dear All, In the following simple case I can't seem to get an improved fit, despite trying all of the control possibilities. As there seem to be no examples anywhere which show use of functions such as "dnorm" within a formula, and as I am not confident at all that my formula is correctly configur