Re: [R] Changing mtext direction, or using text for the margin?

2013-01-07 Thread Michael Rennie
l here. Replacing the last mtext line with grid::grid.text('dependent B', 0.985 , 0.5 , rot = 270) should take care of it (leaving exact placement and justification to the OP) cheers -- David. Mike David Winsemius wrote: On Jan 7, 2013, at

Re: [R] Changing mtext direction, or using text for the margin?

2013-01-07 Thread Michael Rennie
I suspect going to grid() is where I'm going to have to go (after reading the relevant chapters in Paul Murrell's book) Mike David Winsemius wrote: On Jan 7, 2013, at 8:06 AM, Michael Rennie wrote: Any thoughts on what that dirty hack might be or any leads on where to start? Perh

Re: [R] Changing mtext direction, or using text for the margin?

2013-01-07 Thread Michael Rennie
Any thoughts on what that dirty hack might be or any leads on where to start? Perhaps a whole new plot region in the margin or something? Is that even possible? I'm having a difficult time imagining how I can do this. Mike Uwe Ligges wrote: On 07.01.2013 07:00, Michael Rennie wrote:

[R] Changing mtext direction, or using text for the margin?

2013-01-06 Thread Michael Rennie
Hi all, I have read through the archives, but can't find a solution to this problem. I need the text direction on "dependent B", plotted in margin 4, to go top to bottom (opposite what it is now). Here's some sample code: #plot with mtext example par(mgp = c(2,1,0), mfrow=c(2,2), las=1, mar

[R] Tukey test on ANCOVA

2010-03-26 Thread Michael Rennie
Michael Rennie wrote: Hi Paul, Short answer is you don't. Instead, you estimate your adjusted means, and then compare adjusted means using one of a couple of different options- Quinn and Keough (2002, Experimental design and data analysis for biologists) suggests then using spe

Re: [R] define F-ratio computations with aov

2010-03-17 Thread Michael Rennie
Howdy, In the past, I've just run the ANOVA as normal, and then just grabbed the appropriate MS for the estimation of F ratios. Eg, this will get you the MS in your anova object: summary(obj.aov)[[1]][3] or summary(obj.aov)$Mean And if you want a specific MS, summary(obj.aov)[[1]][[1,3]]

Re: [R] Are loops handled differently in newer versions of R?

2010-03-17 Thread Michael Rennie
rownames(lab8.dat) <- lab8.dat$locn for ( i in lab8.dat[,1] ) p_unadj[i] <- calc.prob.t(lab8.dat[i,2], lab8.dat[i,3]) p_unadj # now lab8.dat["A",2] etc. means something, and it works ## On Tue, Mar 16, 2010 at 7:53 PM, Michael Rennie wro

[R] Are loops handled differently in newer versions of R?

2010-03-16 Thread Michael Rennie
Hi gang, I'm perplexed- I have some code that uses for() loops that works fine in R version 2.8 on my mac, worked fine in version 2.8 on my old windows machine, but doesn't work in version 2.10 on windows. The loop implements a function over a data frame (code is included below). In Mac (ru

Re: [R] Iterations

2008-07-15 Thread Michael Rennie
Oops, typo- sorry, should be for(i in 1:10) { print(i) } Mike On Tue, Jul 15, 2008 at 1:39 PM, Michael Rennie <[EMAIL PROTECTED]> wrote: > for(1 in 1:10) > { > print(i) > } > > Mike > > On Tue, Jul 15, 2008 at 1:11 PM, <[EMAIL PROTE

Re: [R] Iterations

2008-07-15 Thread Michael Rennie
for(1 in 1:10) { print(i) } Mike On Tue, Jul 15, 2008 at 1:11 PM, <[EMAIL PROTECTED]> wrote: > I have a command that reads in some data: > > x <- read.csv("Sales2007.dat", header=TRUE) > > Then I try to organize the data: > > sc <- split(x, list(x$Category, x$SubCategory), drop=TR

Re: [R] manipulating (extracting) data from distance matrices

2008-07-15 Thread Michael Rennie
, Jon Olav Skoien <[EMAIL PROTECTED]> wrote: > Maybe > > dmat<-dist(dat, method="euclidean",upper = TRUE,diag = TRUE) > > can fix your problem with the triangular matrix? > > Cheers > Jon > > Michael Rennie wrote: >> >> Not really, >>

[R] extracting elements from print object of Manova()

2008-07-15 Thread Michael Rennie
Hi there, Does anyone know how to extract elements from the table returned by Manova()? Using the univariate equivalent, Anova(), it's easy: a.an<-Anova(lm(y~x1*x2)) a.an$F This will return a vector of the F-values in order of the terms of the model. However, a similar application using Manov

Re: [R] manipulating (extracting) data from distance matrices

2008-07-15 Thread Michael Rennie
Jul 15, 2008 at 9:35 AM, stephen sefick <[EMAIL PROTECTED]> wrote: > how about this > f <- as.matrix(dmat) > f[,4:6] > #you get repeats but I think this is what you want > > On Tue, Jul 15, 2008 at 9:07 AM, Michael Rennie <[EMAIL PROTECTED]> wrote: >> >

[R] manipulating (extracting) data from distance matrices

2008-07-15 Thread Michael Rennie
Hi all, Does anyone have any tips for extracting chunks of data from a distance matrix? For instance, if one was interested in only a subset of distance comparisons (i.e., that of rows 4 thru 6, and no others), is there a simple way to pull that data out? >From some playing around with an exampl

Re: [R] Issue with postscript figures using WinAnsi encoding

2008-07-10 Thread Michael Rennie
or not there are any workarounds to the problem, but I appear to be working happliy (for now, at least) using East European encoding. Thanks to Paul for some hints on where to start looking for the problem. Mike On Sun, Jul 6, 2008 at 5:41 PM, Michael Rennie <[EMAIL PROTECTED]> wrote

Re: [R] matplot help

2008-07-10 Thread Michael Rennie
lues on the X-axis? I tried > 'xlim' but it didn't recognize Q1-60, Q3-62. > > Using 'xaxp' it appears that it can not handle non-numeric arguments? Am I > missing something? > > Thanks again, > > Morgan > > Fro

[R] sorting a data frame by rownames

2008-07-08 Thread Michael Rennie
Hi there, I'm sure there's an easy answer to this, and I can't wait to see it. The question: is there an easy way to sort a data frame by it's row names? My dilemma: I've had to pull apart a data frame, run it through a loop to do some calculations and generate new variables, and then re-constr

[R] Issue with postscript figures using WinAnsi encoding

2008-07-06 Thread Michael Rennie
Hi there, I've hit a bump in writing postscript files with special characters in the WinAnsi encoding on a windows machine. Here's some sample code: ### postscript(file = "test.eps", encoding="WinAnsi.enc", width = 3, height = 5.5, onefile = TRUE, h

[R] Issue with postscript figures using WinAnsi encoding

2008-07-06 Thread Michael Rennie
Hi there, I've hit a bump in writing postscript files with special characters in the WinAnsi encoding on a windows machine. Here's some sample code: ### postscript(file = "test.eps", encoding="WinAnsi.enc", width = 3, height = 5.5, onefile = TRUE, horiz

Re: [R] Query: how to add quotes when importing a txt file

2008-05-09 Thread Michael Rennie
Hi Stefano, Why do you *need* to add the quotes to the text file? If you leave them out, any of the standard methods of reading data (i.e., read.table(filename, sep="") should work. See help(read.table), help(scan), or help(read.fwf) for more info. Mike Stefano Sofia wrote: Dear R users, I

[R] interpreting significance of path coefficients from sem() output

2008-05-06 Thread Michael Rennie
Hi there, Quick question about the output from the sem() function in the library of the same name. If I am getting probabilities >0.05 for some of my estimates of path coefficients, I'm assuming the interpretation here is that the coefficient is not significantly different from zero, correc