[R] TIF Mean pixel values

2016-08-10 Thread Mike Smith
tiff <- readTIFF(paste("./mean/input/",files[i],sep="")) m_image_tiff <- (tiff+m_image_tiff) } #Calculate mean and write TIF m_image_tiff <- (m_image_tiff/n) writeTIFF(m_image_tiff,"./mean/mean_tiff.tif",bits.per.sample=16L) --- Mike Smith __

[R] Creating mean TIF

2016-06-11 Thread Mike Smith
],sep="") tiff <- readTIFF(paste("./mean/input/",files[i],sep="")) m_image_tiff <- (tiff+m_image_tiff) } #Calculate mean and write TIF m_image_tiff <- (m_image_tiff/n) writeTIFF(m_image_tiff,"./mean/mean_tiff.tif",bits.per.sample=16L) --- Mik

Re: [R] Plot trajectories using ggplot?

2016-05-14 Thread Mike Smith
;- rownames(df) US> #Turn data from wide to long US> ds<-melt(df, id.vars = "case") US> ggplot(ds, aes(x = variable, y = value, group = case)) + US> geom_point () + geom_line() US> Hope this helps, US> Ulrik US> On Sat, 14 May 2016 at 10:20 Mike Smith <

[R] Plot trajectories using ggplot?

2016-05-14 Thread Mike Smith
;http://www.lecturematerials.co.uk/data/sample.csv;, header=TRUE, sep=",", dec=".", na.strings=c("NA")) names(df)<-c("1","2","3","4") #Turn data from wide to long ds<-melt(df) ggplot(ds, aes(x = variable, y

[R] Left align plot_grid titles?

2016-05-10 Thread Mike Smith
om_abline(intercept = 0, slope = 1, size=1) + coord_fixed() p<-plot_grid(gg1,gg2,labels=c("A", "B"), nrow = 2) title <- ggdraw() + draw_label("A Title", fontface='bold') plot_grid(title, p, ncol=1, rel_heights=c(0.1, 1), align=c("h")) # rel_heights

[R] ggplot scale_colour_distiller legend to display all values?

2016-05-09 Thread Mike Smith
quot;Multiplier", limits=c(2, 12), breaks=c(2,4,6,8,10,12)) + scale_y_continuous(name="Factor", limits=c(2, 12), breaks=c(2,4,6,8,10,12)) + geom_abline(intercept = 0, slope = 1, size=1) + coord_fixed() --- Mike Smith _

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-01 Thread Mike Smith
>>> On Apr 30, 2016, at 12:58 PM, Mike Smith <m...@hsm.org.uk> wrote: >>> Hi >>> First post and a relative R newbie >>> I am using the vioplot library to produce some violin plots. DW> It's a package, not a library. >>>

[R] Removing NAs from dataframe (for use in Vioplot)

2016-04-30 Thread Mike Smith
he header names?? 2. Can I easily add the sample size to each violin plotted?? thanks mike --- Mike Smith __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the p

[R] Setwd to a directory that requires authentication

2012-09-11 Thread Mike Smith
I work at a company where we log on to windows using a username and password. There is a global server with files that I need to use R to do some analysis on. That server requires my windows credentials to logon. When I access the server from internet explorer it automatically uses my windows

[R] Reading Excel Formulas as values

2012-05-15 Thread Mike Smith
When I read excel files using the read.xlsx() command any cells that have formulas in them come up as NA. Is there a way to read just the numeric value of the cell without using the paste value command in Excel? I need to read in hundreds of Excel spreadsheets and compile them into one large

[R] List of Data Frames

2011-05-02 Thread Mike Smith
on each week, but have an average running up to that point in the season.  Thus the list would be indexed by weeks, and then there's a data frame of the game and all relevant statistics.  Thank You, Mike Smith __ R-help@r-project.org mailing list https