boxplot中na.action有哪些选项? [英] What are the options for na.action in boxplot?

查看:323
本文介绍了boxplot中na.action有哪些选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

boxplot 有关的两个问题:


  1. na.action ?文档没有列出它们。

  2. 将来我将如何回答这些类型的问题?

  1. What are the options for na.action? The documentation doesn't list them.
  2. How would I go about answering these types of question in the future?


推荐答案

通常,我发现内置帮助非常好。没错,尽管 boxplot 的帮助页面提到了 na.action 而没有说明选项是什么。

In general, I find the built-in help to be pretty good. You're right though that the help page for boxplot mentions na.action without stating what the options are.

在这种情况下,?na.action 以及-从那之后开始-? na.omit 解释了可能性(这些很普遍,也适用于 boxplot 以外的其他事物。)

In this instance, ?na.action and -- following on from there -- ?na.omit explain the possibilities (these are quite general and also apply to things other than 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’.

这篇关于boxplot中na.action有哪些选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆