[R] is.infinite usage

2004-04-21 Thread Ernesto Jardim
Hi,

Is there a way of using is.infinite as is.na ? I'd like to avoid looping
the data.frame.

 mat
  x   y  z
1 1 Inf NA
2 2 Inf NA
3 3 Inf NA
 is.na(mat)
  x yz
1 FALSE FALSE TRUE
2 FALSE FALSE TRUE
3 FALSE FALSE TRUE

What I get at the moment is

 is.infinite(mat)
x y z
FALSE FALSE FALSE

Thanks

EJ

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] is.infinite usage

2004-04-21 Thread Uwe Ligges
Ernesto Jardim wrote:

Hi,

Is there a way of using is.infinite as is.na ? I'd like to avoid looping
the data.frame.

mat
  x   y  z
1 1 Inf NA
2 2 Inf NA
3 3 Inf NA
is.na(mat)
  x yz
1 FALSE FALSE TRUE
2 FALSE FALSE TRUE
3 FALSE FALSE TRUE
What I get at the moment is


is.infinite(mat)
x y z
FALSE FALSE FALSE


No, but what's the problem using

  sapply(mat, is.infinite)

instead?

Uwe Ligges



Thanks

EJ

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] is.infinite usage

2004-04-21 Thread Ernesto Jardim
On Wed, 2004-04-21 at 15:53, Uwe Ligges wrote:
 Ernesto Jardim wrote:
 
  Hi,
  
  Is there a way of using is.infinite as is.na ? I'd like to avoid looping
  the data.frame.
  
  
 mat
  
x   y  z
  1 1 Inf NA
  2 2 Inf NA
  3 3 Inf NA
  
 is.na(mat)
  
x yz
  1 FALSE FALSE TRUE
  2 FALSE FALSE TRUE
  3 FALSE FALSE TRUE
  
  What I get at the moment is
  
  
 is.infinite(mat)
  
  x y z
  FALSE FALSE FALSE
 
 
 No, but what's the problem using
 
sapply(mat, is.infinite)
 
 instead?
 
 Uwe Ligges
 
 
 
  Thanks
  
  EJ
  
  __
  [EMAIL PROTECTED] mailing list
  https://www.stat.math.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

None,

It works !

Thanks

EJ

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html