[R] fun.zero.omit {GLDEX}
Nelson Nomura
nelson at translucentanalytics.com
Wed Mar 28 23:35:07 CEST 2012
Peter,
That's perfect. Thanks very much for your help.
Best,
Nelson
-----Original Message-----
From: peter dalgaard [mailto:pdalgd at gmail.com]
Sent: Wednesday, March 28, 2012 5:31 PM
To: Nelson Nomura
Cc: r-help at r-project.org
Subject: Re: [R] fun.zero.omit {GLDEX}
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