[R] fun.zero.omit {GLDEX}

peter dalgaard pdalgd at gmail.com
Wed Mar 28 23:31:17 CEST 2012


On Mar 28, 2012, at 14:39 , Nelson Nomura wrote:

> Hello.  Sorry for the newbie question.  When I run the function
> fun.zero.omit (from the GLDEX package), I get a matrix and some descriptive
> information.  Can someone tell me how to strip out the descriptive
> information so that I'm only left with the matrix?

How about

mostattributes(x) <- NULL

or, more conservatively

attr(x,"na.message") <- NULL


>  Here's an example:
> 
> 
> 
>> x=fun.zero.omit(c(0,1,2,3,4,0))
> 
>> x
> 
>       [,1]
> 
> [1,]    1
> 
> [2,]    2
> 
> [3,]    3
> 
> [4,]    4
> 
> attr(,"na.message")
> 
> [1] "Dropped 2 cases due to zero values"
> 
> 
> 
> Thanks very much.
> 
> 
> 
> Nelson
> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list