I did read the section on Loops-and-conditional-execution but I did not see
any mention of using multiple lines. Ideally I read the whole R-intro. @Martin
Morgan Thanks for your help.
http://cran.fhcrc.org/doc/manuals/R-intro.html#Loops-and-conditional-execution

  *Vincent Davis
720-301-3003 *
vincent@vincentdavis.net
 my blog <http://vincentdavis.net> |
LinkedIn<http://www.linkedin.com/in/vincentdavis>


On Mon, Apr 5, 2010 at 9:09 PM, Martin Morgan <mtmorgan@fhcrc.org> wrote:

> Hi Vincent --
>
> On 04/05/2010 07:57 PM, Vincent Davis wrote:
> > I very new to R and having a little trouble with CdfEnvAffy, I am going
> > thought the
>
> Might help to read through
>
>  http://cran.fhcrc.org/doc/manuals/R-intro.html
>
> (also available by typing help.start() in to your R session).
>
> > Here are my steps
> >> fasta.filename <- system.file("/Users/vmd/Dropbox/dna/toxodb/",
> > "TgondiiME49Genomic_ToxoDB-6.0.fasta", package = "altcdfenvs")
> >> con <- file(fasta.filename, open = "r")
> > Warning message:
> > In file(fasta.filename, open = "r") :
> >   file("") only supports open = "w+" and open = "w+b": using the former
> >
> > #### Not sure what to do about this error so I just removed, <open =
> "r">,
> > this seems to be ok
> >
> >> con <- file(fasta.filename)
> >
> > #### This is where I am really stuck
> >
> >> while (!is.null(fasta.seq$header)) {print(fasta.seq) fasta.seq <-
> > read.FASTA.entry(con)}
> > Error: unexpected symbol in "while (!is.null(fasta.seq$header))
> > {print(fasta.seq) fasta.seq"
>
> This is saying that you cannot write
>
>  print(fasta.seq) fasta.seq <- read.FASTA.entry(con)
>
> on a single line -- it is a syntax error and would normally be written
> on two separate lines
>
>  while (!is.null(fastq.seq$header)) {
>      print(fasta.seq)
>     fasta.seq <- read.FASTA.entry(con)
>  }
>
> Martin
>
> > #### So I tried this and it is better but still not right
> >> while (!is.null(fasta.seq$header)) {print(fasta.seq) (fasta.seq <-
> > read.FASTA.entry(con))}
> > FASTA sequence:
> >    >gnl|UG|Hs#S1730546 membrane-spanning 4-domains, subfamily A ...
> >    AACCCATTTCAACTGCCTATTCAGAGCATGCAGTAAGAGGAAATCCACCAAGTCTCAATA ...
> > Error: attempt to apply non-function
> >
> >
> > So I am not sure how to get this to work.
> > Thanks
> > Vincent
> >
> >
> >> sessionInfo()
> > R version 2.10.1 (2009-12-14)
> > x86_64-apple-darwin9.8.0
> >
> > locale:
> > [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
> >
> > attached base packages:
> > [1] stats     graphics  grDevices utils     datasets  methods   base
> >
> > other attached packages:
> >  [1] altcdfenvs_2.8.0    hypergraph_1.18.0   graph_1.24.4
> >  makecdfenv_1.24.0   affyio_1.14.0
> >  [6] matchprobes_1.18.0  Biostrings_2.14.12  IRanges_1.4.16
> >  AnnotationDbi_1.8.2 affy_1.24.2
> > [11] Biobase_2.6.1
> >
> > loaded via a namespace (and not attached):
> > [1] DBI_0.2-5            preprocessCore_1.8.0 RSQLite_0.8-4
> >  tools_2.10.1
> >
> >
> >
> >   *Vincent Davis
> > 720-301-3003 *
> > vincent@vincentdavis.net
> >  my blog <http://vincentdavis.net> |
> > LinkedIn<http://www.linkedin.com/in/vincentdavis>
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
> --
> Martin Morgan
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
>
> Location: Arnold Building M1 B861
> Phone: (206) 667-2793
>

	[[alternative HTML version deleted]]

