gpt4 book ai didi

r - boxplot 中的 na.action 选项有哪些?

转载 作者:行者123 更新时间:2023-12-04 02:16:01 26 4
gpt4 key购买 nike

boxplot相关的两个问题:

  • na.action有哪些选项?文档没有列出它们。
  • 将来我将如何回答这些类型的问题?
  • 最佳答案

    总的来说,我发现内置帮助非常好。您是对的,尽管 boxplot 的帮助页面是正确的提及 na.action没有说明选项是什么。

    在这种情况下,?na.action和 - 从那里开始 - ?na.omit解释可能性(这些很笼统,也适用于 boxplot 以外的事情。)

    Handle Missing Values in Objects

    Description:

    These generic functions are useful for dealing with ‘NA’s in e.g.,
    data frames. ‘na.fail’ returns the object if it does not contain
    any missing values, and signals an error otherwise. ‘na.omit’
    returns the object with incomplete cases removed. ‘na.pass’
    returns the object unchanged.

    Usage:

    na.fail(object, ...)
    na.omit(object, ...)
    na.exclude(object, ...)
    na.pass(object, ...)

    Arguments:

    object: an R object, typically a data frame

    ...: further arguments special methods could require.

    Details:

    At present these will handle vectors, matrices and data frames
    comprising vectors and matrices (only).

    If ‘na.omit’ removes cases, the row numbers of the cases form the
    ‘"na.action"’ attribute of the result, of class ‘"omit"’.

    ‘na.exclude’ differs from ‘na.omit’ only in the class of the
    ‘"na.action"’ attribute of the result, which is ‘"exclude"’. This
    gives different behaviour in functions making use of ‘naresid’ and
    ‘napredict’: when ‘na.exclude’ is used the residuals and
    predictions are padded to the correct length by inserting ‘NA’s
    for cases omitted by ‘na.exclude’.

    关于r - boxplot 中的 na.action 选项有哪些?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5557676/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com