Re: [R] Formatting Sweave in R-News

2007-08-27 Thread Arjun Narayan
Dear Paul, I stand corrected. Your solution was the right way. The following code now works: (Apparently I still need to specify the width command as my pdf is incorrectly sized by default) \begin{figure*}[b] \begin{center} \includegraphics[width=8in]{generatedPDF.pdf} \end{center} \end{figure*}

Re: [R] Formatting Sweave in R-News

2007-08-27 Thread Arjun Narayan
> > Thank you Paul for your response. Unfortunately that did not work. A > figure environment frames it neatly, but still contained in only one column. > I have tried various methods, but they all seem to not work, or if the > solutions involve manually setting the size, the grey column separator s

Re: [R] Formatting Sweave in R-News

2007-08-22 Thread Gregor Gorjanc
Hi Duncan, Duncan Murdoch wrote: >> Slightly off Arjuns topic is a problem with Schunk, Sinput and Soutput >> environments. They just use to much inline space. I have tweade this >> problem with sed (see bellow for Makefile content), but wonder if there >> is a better solution. > > You can change

Re: [R] Formatting Sweave in R-News

2007-08-22 Thread Duncan Murdoch
On 8/22/2007 3:20 AM, Gregor Gorjanc wrote: > Arjun Ravi Narayan arjunnarayan.com> writes: >> I am editing a document for submission to the R-news newsletter, and >> in my article my Sweave code inserts a dynamically generated PDF >> report that my R program generates. >> > > Slightly off Arjuns

Re: [R] Formatting Sweave in R-News

2007-08-22 Thread Gregor Gorjanc
Arjun Ravi Narayan arjunnarayan.com> writes: > I am editing a document for submission to the R-news newsletter, and > in my article my Sweave code inserts a dynamically generated PDF > report that my R program generates. > Slightly off Arjuns topic is a problem with Schunk, Sinput and Soutput e

Re: [R] Formatting Sweave in R-News

2007-08-21 Thread Paul Murrell
Hi Arjun Ravi Narayan wrote: > Hi, > > I am editing a document for submission to the R-news newsletter, and > in my article my Sweave code inserts a dynamically generated PDF > report that my R program generates. > > However, when I insert the PDF using the following Sweave code: > > \newpage

[R] Formatting Sweave in R-News

2007-08-21 Thread Arjun Ravi Narayan
Hi, I am editing a document for submission to the R-news newsletter, and in my article my Sweave code inserts a dynamically generated PDF report that my R program generates. However, when I insert the PDF using the following Sweave code: \newpage \includegraphics[scale=1.0]{\Sexpr{print(location

Re: [R] Formatting panel borders in lattice package

2007-07-10 Thread Deepayan Sarkar
On 7/10/07, Hil Lyons <[EMAIL PROTECTED]> wrote: > Hello all -- > > I would like to thicken the borders between panels -- or more generally, > all borders -- in a plot generated using lattice (specifically, > levelplot). Something similar perhaps to box() function in graphics. > I haven't been suc

[R] Formatting panel borders in lattice package

2007-07-10 Thread Hil Lyons
Hello all -- I would like to thicken the borders between panels -- or more generally, all borders -- in a plot generated using lattice (specifically, levelplot). Something similar perhaps to box() function in graphics. I haven't been successful in reviewing available documentation. The proble

[R] Formatting an arry to typeset as a table

2006-12-27 Thread Greg Snow
I am writting some functions that return an array of coefficients along with confidence intetervals for each coefficient. My intent is to eventually typeset the coefficients and intervals into a table (or tables) in a document. I would like to use existing tools such as the 'latex' function in t

Re: [R] formatting data to be analysed using multinomial logistic regression (nnet)

2006-09-13 Thread sun
o: Sent: Sunday, September 10, 2006 10:24 PM Subject: [R] formatting data to be analysed using multinomial logistic regression (nnet) > > > I am looking into using the multinomial logistic regression option in the > nnet library and have two questions about formatting the data. > &

[R] formatting data to be analysed using multinomial logistic regression (nnet)

2006-09-10 Thread Bob Green
I am looking into using the multinomial logistic regression option in the nnet library and have two questions about formatting the data. 1. Can data be analysed in the following format or does it need to be transformed into count data, such as the housing data in MASS? Id Crime parano

Re: [R] Formatting numbers for printing

2006-06-08 Thread Duncan Murdoch
On 6/8/2006 5:42 PM, Dennis Fisher wrote: > Colleagues > > I have numbers like "12012" that I will be printing in a graphic. I > would like to format them as follows: 012-012, i.e., the first two > digits padded to the left by a zero, followed by a dash, followed by > the final three digits

[R] Formatting numbers for printing

2006-06-08 Thread Dennis Fisher
Colleagues I have numbers like "12012" that I will be printing in a graphic. I would like to format them as follows: 012-012, i.e., the first two digits padded to the left by a zero, followed by a dash, followed by the final three digits, also padded to the left by zeros. I can do this wit

Re: [R] Formatting an anova table using latex

2006-03-13 Thread Dieter Menne
Michael Kubovy virginia.edu> writes: > > > Unfortunately this doesn't work. > > rowname = NULL > > suppresses row names altogether. I want to substitute different row > names > This example works for me. Take into account that rownamesTexCmd adds the leading \, so you cannot use it t

Re: [R] Formatting an anova table using latex

2006-03-13 Thread Michael Kubovy
Thanks Dieter, Unfortunately this doesn't work. rowname = NULL suppresses row names altogether. I want to substitute different row names by writing rownamesTexCmd = c('baR', 'addit', 'multip') When I do this without writing rowname = NULL, my row names appear first, followed by the default

Re: [R] Formatting an anova table using latex

2006-03-13 Thread Dieter Menne
Michael Kubovy virginia.edu> writes: > > > When I issue the command > > latex(anova(raw1.lmer0, raw1.lmer, raw1.lmerI), file = 'raw1.tex', > rownamesTexCmd = c('baR', 'addit', 'multip'), longtable = F, dcolumn > = T, booktabs = T, t able.env = F, colheads = NULL, colnamesTexCmd = c > ('',

[R] Formatting an anova table using latex

2006-03-13 Thread Michael Kubovy
Hi r-helpers, When I issue the command latex(anova(raw1.lmer0, raw1.lmer, raw1.lmerI), file = 'raw1.tex', rownamesTexCmd = c('baR', 'addit', 'multip'), longtable = F, dcolumn = T, booktabs = T, t able.env = F, colheads = NULL, colnamesTexCmd = c ('', 'df', 'aic', 'bic', 'logl', 'chisq', 'chi

Re: [R] formatting results from a function argument

2006-02-20 Thread Gabor Grothendieck
Not sure I followed what it is you want but perhaps this will help: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/67519.html On 2/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello all, > > I have a simple function which calculates summary statistics of a dataset > in terms of a factor

Re: [R] formatting results from a function argument

2006-02-19 Thread jim holtman
Is this what you want? > tapply(x$TcCB, x$Area, my.func) $cleanup Count Mean SDMin Median90% 95%MaxSum 5.000 2.1292699 0.9610394 1.1643714 2.1836433 3.0889716 3.3421262 3.5952808 10.6463495 $ref Count Mean SD

[R] formatting results from a function argument

2006-02-19 Thread matgopa1
Hello all, I have a simple function which calculates summary statistics of a dataset in terms of a factor (say area). > x = data.frame(Area = c(rep("cleanup", 5), rep("ref", 5)), TcCB = c(rnorm(5)+2, rnorm(5)));x Area TcCB 1 cleanup 2.5829747 2 cleanup 2.6796868 3 cleanup 2.5437

Re: [R] R formatting

2005-12-06 Thread Barry Rowlingson
Peter Dalgaard wrote: > > It doesn't calculate it though... ;-) > My previous example is a bit ugly - this one looks nicer: f1=function(n){ -1 x = --- n return(x) } And it returns f(1) as -1/1 and f(-1) as -1/-1 as well. __ R-

Re: [R] R formatting

2005-12-06 Thread Peter Dalgaard
Barry Rowlingson <[EMAIL PROTECTED]> writes: > While mucking about with semicolons and line endings I wrote this little > piece of mildly obfuscated R code: > > f1=function(n){ > >x = 1 >--- > n > >return(x) > } > > [best viewed with a proportionally-spaced font] >

[R] R formatting

2005-12-06 Thread Barry Rowlingson
While mucking about with semicolons and line endings I wrote this little piece of mildly obfuscated R code: f1=function(n){ x = 1 --- n return(x) } [best viewed with a proportionally-spaced font] f1(1) does indeed return 1/1. Baz _

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-31 Thread Marc Schwartz
On Tue, 2005-05-31 at 11:11 -0400, Duncan Murdoch wrote: > Marc Schwartz wrote: > > > Final note to Henrik: Note that the IEEE 754 rounding standard as > > implemented in R results in: > > > > > >>round(18.15, 1) > > > > [1] 18.1 > > > >>formatC(18.15, format = "f", digits = 1) > > > > [1] "1

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-31 Thread Gabor Grothendieck
On 5/31/05, Marc Schwartz <[EMAIL PROTECTED]> wrote: > On Mon, 2005-05-30 at 23:53 -0400, Gabor Grothendieck wrote: > > On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > > Gabor Grothendieck wrote: > > > > On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > > > > > > >>Henrik Andersso

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-31 Thread Duncan Murdoch
Marc Schwartz wrote: Final note to Henrik: Note that the IEEE 754 rounding standard as implemented in R results in: round(18.15, 1) [1] 18.1 formatC(18.15, format = "f", digits = 1) [1] "18.1" sprintf("%5.1f", 18.15) [1] " 18.1" This is because the rounding method implemented is th

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-31 Thread Marc Schwartz
On Mon, 2005-05-30 at 23:53 -0400, Gabor Grothendieck wrote: > On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > Gabor Grothendieck wrote: > > > On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > > > > >>Henrik Andersson wrote: > > >> > > >>>I have tried to get signif, round and form

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-30 Thread Gabor Grothendieck
On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > Gabor Grothendieck wrote: > > On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > > > >>Henrik Andersson wrote: > >> > >>>I have tried to get signif, round and format to display numbers like > >>>these consistently in a table, using e.g. s

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-30 Thread Duncan Murdoch
Gabor Grothendieck wrote: On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: Henrik Andersson wrote: I have tried to get signif, round and format to display numbers like these consistently in a table, using e.g. signif(x,digits=3) 17.01 18.15 I want 17.0 18.2 Not 17 18.2 Why is the

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-30 Thread Gabor Grothendieck
On 5/30/05, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > Henrik Andersson wrote: > > I have tried to get signif, round and format to display numbers like > > these consistently in a table, using e.g. signif(x,digits=3) > > > > 17.01 > > 18.15 > > > > I want > > > > 17.0 > > 18.2 > > > > Not > > > >

Re: [R] Formatting numbers with a limited amount of digits consistently

2005-05-30 Thread Duncan Murdoch
Henrik Andersson wrote: I have tried to get signif, round and format to display numbers like these consistently in a table, using e.g. signif(x,digits=3) 17.01 18.15 I want 17.0 18.2 Not 17 18.2 Why is the last digit stripped off in the case when it is zero! signif() changes the value;

[R] Formatting numbers with a limited amount of digits consistently

2005-05-30 Thread Henrik Andersson
I have tried to get signif, round and format to display numbers like these consistently in a table, using e.g. signif(x,digits=3) 17.01 18.15 I want 17.0 18.2 Not 17 18.2 Why is the last digit stripped off in the case when it is zero! Is this a "feature" of R or did I miss something? -

Re: [R] formatting output

2005-02-28 Thread Marc Schwartz
On Tue, 2005-03-01 at 01:21 +, Gabor Grothendieck wrote: > Here is a slight variation of Marc's solution that avoids explicit > setting of the row names: > > R> my.tmp <- split(warpbreaks$breaks, > + list(warpbreaks$wool, warpbreaks$tension)) > R> my.tmp <- lapply(my.tmp, quantile)

Re: [R] formatting output

2005-02-28 Thread Gabor Grothendieck
Marc Schwartz MedAnalytics.com> writes: : : On Mon, 2005-02-28 at 14:05 -0400, Peyuco Porras Porras . wrote: : >Dear R-users : > : >A basic question that I wasn't able to solve: Is it possible to get : >the results of the function 'quantile' expressed as data.frame? What : >

Re: [R] formatting output

2005-02-28 Thread Marc Schwartz
On Mon, 2005-02-28 at 14:05 -0400, Peyuco Porras Porras . wrote: >Dear R-users > >A basic question that I wasn't able to solve: Is it possible to get >the results of the function 'quantile' expressed as data.frame? What >I'm doing is to apply the following code to get the

[R] formatting output

2005-02-28 Thread Peyuco Porras Porras .
Dear R-users A basic question that I wasn't able to solve: Is it possible to get the results of the function 'quantile' expressed as data.frame? What I'm doing is to apply the following code to get the quantiles in a particular dataset: tmp<-tapply(data$DEN,list(Age=da

Re: [R] formatting tables with long column names via package:xtable within Sweave

2004-07-15 Thread Jonathan Baron
On 07/15/04 11:07, [EMAIL PROTECTED] wrote: >Hi, > >I use the excellent Sweave tools for writing documents >but was wondering how to neatly print a data.frame >with long column headings. >I cant manage to do this via package:xtable. I think a problem with xtable is this: > xtable(d1,align=c("|l|"

[R] formatting tables with long column names via package:xtable within Sweave

2004-07-15 Thread john.gavin
Hi, I use the excellent Sweave tools for writing documents but was wondering how to neatly print a data.frame with long column headings. I cant manage to do this via package:xtable. Typically the labels that I would like use for each column consist of more than one word, but even with just one

Re: [R] formatting

2004-06-30 Thread tobias . verbeke
[EMAIL PROTECTED] wrote on 30/06/2004 16:05:15: > > > I could not figure this out from the documentation: is there a way to send > formatted non-graphical data to a fancy output device (eg, latex, pdf...) > For example, if I want to include the summary of a linear model in a > document, I migh

[R] formatting

2004-06-30 Thread rivin
I could not figure this out from the documentation: is there a way to send formatted non-graphical data to a fancy output device (eg, latex, pdf...) For example, if I want to include the summary of a linear model in a document, I might want to have it automatically texified. Thanks! Igor

Re: [R] Formatting axis label numbers on plots

2003-11-12 Thread John Fox
Dear Ed, Take a look at the scipen option, new (I believe) in R 1.8.0, which can be used to suppress scientific notation. I hope that this helps, John At 02:45 PM 11/12/2003 -0800, M. Edward (Ed) Borasky wrote: Is there any way to control the format of the axis label numbers on a plot? More spe

Re: [R] Formatting axis label numbers on plots

2003-11-12 Thread James MacDonald
Look at xaxt and yaxt under ?par, as well as ?axis. HTH, Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 >>> "M. Edward (Ed) Borasky" <[EMAIL PROTECTED]> 11/12/03 17:56 PM >>>

[R] Formatting axis label numbers on plots

2003-11-12 Thread M. Edward (Ed) Borasky
Is there any way to control the format of the axis label numbers on a plot? More specifically, I have some plots that get axes with label numbers in exponential format, and I'd like to change that to non-exponential. Thanks!! -- M. Edward (Ed) Borasky, MS, MNLP, NST, FBG, PGS & PTA [EMAIL PROTE

Re: [R] Formatting significant digits with trailing zeros

2003-03-14 Thread Tony Plate
Does this do what you want? > x <- c(2.503,2.477,0.1204) > sapply(signif(x,3), sprintf, fmt="%#.3g") [1] "2.50" "2.48" "0.120" > This will give you scientific notation for very large or small numbers. At Friday 02:17 PM 3/14/2003 -0800, Don MacQueen wrote: >I need a function like signif(), bu

[R] Formatting significant digits with trailing zeros

2003-03-14 Thread Don MacQueen
I need a function like signif(), but returns the rounded values as character strings, formatted with trailing zeros where appropriate. If anyone has one, I would sure appreciate a copy. Thanks -Don Details: signif() rounds a number to a specified number of significant digits, for example: