Skip to content

news markdown incorrectly rendered to html #7617

@tdhock

Description

@tdhock

NEWS items with indented markdown render ok on github https://github.com/Rdatatable/data.table/blob/HEAD/NEWS.md but not on https://r-datatable.com/news/index.html

Image above left we see unexpected backticks at the end of news items 3 and 4, and Additionally… in item 4 is rendered as code.

source code is https://raw.githubusercontent.com/Rdatatable/data.table/596f65d53efee3918d62e9dddb69acda37778876/NEWS.md

3. Rolling functions `frollmean` and `frollsum` distinguish `Inf`/`-Inf` from `NA` to match the same rules as base R when `algo="fast"` (previously they were considered the same). If your input into those functions has `Inf` or `-Inf` then you will be affected by this change. As a result, the argument that controls the handling of `NA`s has been renamed from `hasNA` to `has.nf` (_has non-finite_). `hasNA` continues to work with a warning, for now.

    ```r
    ## before
    frollsum(c(1,2,3,Inf,5,6), 2)
    #[1] NA  3  5 NA NA 11

    ## now
    frollsum(c(1,2,3,Inf,5,6), 2)
    #[1]  NA   3   5 Inf Inf  11
    ```

4. `frollapply` result is not coerced to numeric anymore. Users' code could possibly break if it depends on forced coercion of input/output to numeric type.

    ```r
    ## before
    frollapply(c(F,T,F,F,F,T), 2, any)
    #[1] NA  1  1  0  0  1

    ## now
    frollapply(c(F,T,F,F,F,T), 2, any)
    #[1]    NA  TRUE  TRUE FALSE FALSE  TRUE
    ```

    Additionally argument names in `frollapply` has been renamed from `x` to `X` and `n` to `N` to avoid conflicts with common argument names that may be passed to `...`, aligning to base R API of `lapply`. `x` and `n` continue to work with a warning, for now.

5. Negative and missing values of `n` argument of adaptive rolling functions trigger an error.

how to fix so it renders ok in both places?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions