Re: [R] Simple error handling in R

2010-11-16 Thread Aleksey Naumov
:17 AM, ottorino wrote: > Il giorno mar, 16/11/2010 alle 10.58 -0500, Aleksey Naumov ha scritto: > > for (i in 1:10) { > >if (i == 5) > > # I'd like to be able to stop right here with an error message I > > have > > complete control over > > }

[R] Simple error handling in R

2010-11-16 Thread Aleksey Naumov
1 my_error_function(message) # ... } where my_error_function() simply prints the detailed error message and then stops execution -- i.e. gets out of f(). Does this make sense? Thank you, Aleksey On Tue, Nov 16, 2010 at 11:16 AM, David Winsemius wrote: > > On Nov 16, 2010, at 10:58

[R] Simple error handling in R

2010-11-16 Thread Aleksey Naumov
Hi R experts, I am looking for a simple error handling approach, whereby I could stop function execution with a customized error message. For example: for (i in 1:10) { if (i == 5) # I'd like to be able to stop right here with an error message I have complete control over } The problem

Re: [R] Sweave and optional document sections

2010-03-05 Thread Aleksey Naumov
ge or not). My recollection > was that there wasn't any way around this, but it's been a thorn in my > side for a while. > > I suggest using LaTeX in the short term to do this. > > Max > > > > On Fri, Mar 5, 2010 at 12:55 PM, Aleksey Naumov wrote: > > Dea

[R] Sweave and optional document sections

2010-03-05 Thread Aleksey Naumov
Dear R and Sweave users, Is there a way to have optional sections in a Sweave-generated report document, complete with section header(s), text and code chunks? In other words, I'd like for my report to include or omit certain sections based on the data itself. For example, If I examine the input

Re: [R] Automate generation of multiple reports using odfWeave

2010-02-26 Thread Aleksey Naumov
mething like this: > > allstations <- c("station1", "station2", "station3") > > for (i in allstations) { > thisstation <- i > odfWeave("inputfile.odt", paste("output-", i, ".odt", sep="")) > } >

[R] Automate generation of multiple reports using odfWeave

2010-02-26 Thread Aleksey Naumov
Dear R and odfWeave users, I am looking for a way to automate generation of many reports using odfWeave. All reports would use the same input ODT file, the only difference would be in the name of the dataset which will be analyzed in any particular report. Right now, the name of the dataset is har

Re: [R] odfTable: table width and alignment

2010-02-16 Thread Aleksey Naumov
Max, Thank you for your help. Please see my responses below. On Tue, Feb 9, 2010 at 8:20 PM, Max Kuhn wrote: > > I am trying to figure out how to control table width and alignment on the > > page for a table generated by odfTable. Based on reading odfWeave > > documentation (including formatti

[R] odfTable: table width and alignment

2010-02-09 Thread Aleksey Naumov
Dear R and odfWeave users, I am trying to figure out how to control table width and alignment on the page for a table generated by odfTable. Based on reading odfWeave documentation (including formattingOut.odt), here is how I manipulate the styles: st = getStyleDefs() # modify the table style tab

Re: [R] Read.table fail to recognize (+/-) sign

2008-10-06 Thread Aleksey Naumov
I am able to replicate your problem, using R 2.7.2: R version 2.7.2 (2008-08-25) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 ... > source <- read.table("clipboard") > source V1 V2V3 V4 V5 V6V7 1 HIT1 hg18 chr8 + 175

Re: [R] Setting user colors in barchart

2008-09-16 Thread Aleksey Naumov
Richard, Thank you for your help again. You are right, wrapping panel.barchart was not as hard as it seemed to me. Thanks, Alex On Tue, Sep 16, 2008 at 12:44 PM, <[EMAIL PROTECTED]> wrote: > > Thank you for a clear example, it works. I tried to play with > > superpose.polygon before to no avail

Re: [R] Setting user colors in barchart

2008-09-16 Thread Aleksey Naumov
Richard, Thank you for a clear example, it works. I tried to play with superpose.polygon before to no avail, this clarifies things. Another question: would you know how to add gridlines to the plot? I'd like to have a few horizontal gridlines on my barchart plot for better readability. Do I have

[R] Setting user colors in barchart

2008-09-16 Thread Aleksey Naumov
Dear R Users, I have a basis question regarding the use of color in the lattice package. I read the ?barchart help page and searched the R archives but could not understand how to do it. I just need to plot a barchart using specific colors for my groups, e.g. green and red instead of the default

[R] Problem with odfWeave: Unescaped '<' not allowed in attributes values

2008-05-13 Thread Aleksey Naumov
Dear R users, I am having a problem with odfWeave: when I run odfWeave('notes.odt', 'notes_out.odt') I get a bunch of errors that start with "Unescaped '<' not allowed in attributes values" in post-processing: ... 'content_1.xml' has been Sweaved Removing content.xml Post-processing