[Bioc-devel] Error in Biobase docs

Martin Morgan mtmorgan at fhcrc.org
Tue Oct 17 06:39:50 CEST 2006


Thanks Keith for the report. The pdf file is created (like other
vignettes) by some R code called Sweave, from a document written in
the markup language LaTeX. The document is actually 'computed', that
is, I wrote the R code, but Sweave performed the calculations that
appear in the document. This is quite amazing for many reasons (e.g.,
providing documentation of, and a repeatable way for conducting, a
complicated analysis), but in the present case it means that there is
no syntax error in the R code used to generate the document.

The problem is a visual one. Sweave provides some control over how
output looks, but some lines of code (especially with very long names
and no clear places to insert breaks) can be hard to format correctly
-- inserting cues like line breaks doesn't help, because Sweave parses
the blank lines as though they didn't exist. I'll try to arrange for
this to be formatted better.

In the mean time, you can find the original source for the document by
looking at the location returned by

> system.file("doc", package="Biobase")

In fact, you can extract the exact R code in the document by using
'setwd()' or on windows under the 'File' menu choose "Change dir" to
move to a directory where you can safely write a file, and then type
the command

> Stangle(system.file("doc", "BiobaseDevelopment.Rnw",
+ package="Biobase"))

This will create a file BiobaseDevelopment.R, and in that file you'll
find each of the 'chunks' of code used to generate the PDF. See below
for the problematic line you mention!

Hope that helps,

Martin



Keith Satterley <keith at wehi.EDU.AU> writes:

> To Biobase authors, in particular Martin Morgan,
>
> I was looking at Vignette no. 2 in the Biobase package which displays a pdf 
> entitled "Biobase development and the new eSet"
> The author is Martin T. Morgan, and it is dated 7 August, 2006 and the revision 
> text is "Revised 4 September, 2006 √ featureData slot".
>
> On Page 11 of this document, you have
>
> ===========
> and add code to update to the new version
>  > setMethod("updateObject", signature(object = "MySet"), function(object,
> + ..., verbose = FALSE) {
> + if (verbose)
> + message("updateObject(object = MySet )")
> + object <- callNextMethod()
> + if (isCurrent(object)["MySet"])
> + return(object)
> + if (!isVersioned(object))
> + new("MySet", assayData = updateObject(assayData(object)),
> + phenoData = updateObject(phenoData(object)), experimentData = 
> updateObject(experimentData(+ annotation = updateObject(annotation(object)))
> + else {
> + classVersion(object)["MySet"] <- classVersion("MySet")["MySet"]
> + object
> + }
> + })
> [1] "updateObject"
> ==============
>
> One doesn't see the error in the pdf as it is past the right margin. When copied 
> and pasted into an R console there is an error message because of the following 
> error:
> "updateObject(experimentData(+ annotation = updateObject(annotation(object)))"
> I can see this is meant to be
> "updateObject(experimentData),
> + annotation = updateObject(annotation(object)))"

experimentData = updateObject(experimentData(object)),


> Perhaps another line break before "experimentData =" in the line before this 
> would also avoid the text going beyond the right margin.
>
> Thanks for all the work you put into R package development,
>
>  > sessionInfo()
> R version 2.4.0 (2006-10-03)
> i386-pc-mingw32
>
> locale:
> LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia.1252
>
> attached base packages:
> [1] "tools"     "methods"   "stats"     "graphics"  "grDevices" "utils" 
> "datasets"  "base"
>
> other attached packages:
>   Biobase
> "1.12.0"
>  >
>
> cheers,
>
> Keith
>
> ========================
> Keith Satterley
> Bioinformatics Division
> The Walter and Eliza Hall Institute of Medical Research
> Parkville, Melbourne,
> Victoria, Australia
>
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

-- 
Martin T. Morgan
Bioconductor / Computational Biology
http://bioconductor.org



More information about the Bioc-devel mailing list