NEWS and readNEWS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NEWS and readNEWS

Hadley Wickham-2
readNEWS() states:

     Read R's ‘NEWS’ file or a similarly formatted one.  This is an
     experimental feature, new in R 2.4.0 and may change in several
     ways

and news() also indicates that this tool is supposed to work with
non-R news files.  However, I've not been able to get readNEWS to read
a package news file, even when following the format indicated in
news().  Looking at the code for readNEWS() it seems there are couple
of places where it assumes it's working with the main R NEWS file:

  * s.post <- " SERIES NEWS"
  * s.pre <- "^[\t ]*CHANGES IN R VERSION "

Is this a bug or is the documentation incorrect?

Hadley

--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: NEWS and readNEWS

Kurt Hornik-5
>>>>> Hadley Wickham writes:

> readNEWS() states:
>      Read R's ‘NEWS’ file or a similarly formatted one.  This is an
>      experimental feature, new in R 2.4.0 and may change in several
>      ways

> and news() also indicates that this tool is supposed to work with
> non-R news files.  However, I've not been able to get readNEWS to read
> a package news file, even when following the format indicated in
> news().  Looking at the code for readNEWS() it seems there are couple
> of places where it assumes it's working with the main R NEWS file:

>   * s.post <- " SERIES NEWS"
>   * s.pre <- "^[\t ]*CHANGES IN R VERSION "

> Is this a bug or is the documentation incorrect?

readNEWS() is really for such 3-level files, but then R itself will move
to an 2-level Rd format in R 2.12.0.

Use news() to read package news files.

-k

> Hadley

> --
> Assistant Professor / Dobelman Family Junior Chair
> Department of Statistics / Rice University
> http://had.co.nz/

> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: NEWS and readNEWS

Hadley Wickham-2
>>   * s.post <- " SERIES NEWS"
>>   * s.pre <- "^[\t ]*CHANGES IN R VERSION "
>
>> Is this a bug or is the documentation incorrect?
>
> readNEWS() is really for such 3-level files, but then R itself will move
> to an 2-level Rd format in R 2.12.0.
>
> Use news() to read package news files.

Ah, ok, this is rather unclear from the current documentation.  So if
I want to read a NEWS file off disk to check that I have the right
format (without installing the package first), I should use
tools:::.build_news_db ?

Hadley

--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel