Re: [R] don't print object attributes

2012-08-29 Thread Liviu Andronic
On Tue, Aug 28, 2012 at 9:05 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 28/08/2012 2:16 PM, Liviu Andronic wrote: I came up with a modified version of the above: print_noattr - function(x, keep.some=T, ...){ if(keep.some) xa - attributes(x)[c('names', 'row.names', 'class')]

Re: [R] don't print object attributes

2012-08-29 Thread R. Michael Weylandt
On Wed, Aug 29, 2012 at 4:23 AM, Liviu Andronic landronim...@gmail.com wrote: On Tue, Aug 28, 2012 at 9:05 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 28/08/2012 2:16 PM, Liviu Andronic wrote: I came up with a modified version of the above: print_noattr - function(x, keep.some=T,

[R] don't print object attributes

2012-08-28 Thread Liviu Andronic
Dear all Suppose the object below: require(Hmisc) require(plyr) x - dlply(iris, .(Species), describe) How can I print the object without displaying the attributes? I inspected ?print and ?print.default with no luck. x $setosa x[, Sepal.Length] n missing uniqueMean .05 .10

Re: [R] don't print object attributes

2012-08-28 Thread Duncan Murdoch
On 28/08/2012 1:12 PM, Liviu Andronic wrote: Dear all Suppose the object below: require(Hmisc) require(plyr) x - dlply(iris, .(Species), describe) How can I print the object without displaying the attributes? I inspected ?print and ?print.default with no luck. Assign a class to the object,

Re: [R] don't print object attributes

2012-08-28 Thread Peter Ehlers
On 2012-08-28 10:34, Duncan Murdoch wrote: On 28/08/2012 1:12 PM, Liviu Andronic wrote: Dear all Suppose the object below: require(Hmisc) require(plyr) x - dlply(iris, .(Species), describe) How can I print the object without displaying the attributes? I inspected ?print and ?print.default

Re: [R] don't print object attributes

2012-08-28 Thread Liviu Andronic
On Tue, Aug 28, 2012 at 7:34 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Assign a class to the object, and write a print method for it. For example, this doesn't quite do what you want, but it's a start: print.noattributes - function(x, ...) { attributes(x) - NULL print(x) }

Re: [R] don't print object attributes

2012-08-28 Thread R. Michael Weylandt
On Tue, Aug 28, 2012 at 1:16 PM, Liviu Andronic landronim...@gmail.com wrote: On Tue, Aug 28, 2012 at 7:34 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Assign a class to the object, and write a print method for it. For example, this doesn't quite do what you want, but it's a start:

Re: [R] don't print object attributes

2012-08-28 Thread Duncan Murdoch
On 28/08/2012 2:16 PM, Liviu Andronic wrote: On Tue, Aug 28, 2012 at 7:34 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: Assign a class to the object, and write a print method for it. For example, this doesn't quite do what you want, but it's a start: print.noattributes - function(x,

Re: [R] don't print object attributes on screen

2009-01-18 Thread jim holtman
Is this what you want: y - scale(x) str(x) int [1:10] 1 2 3 4 5 6 7 8 9 10 str(y) num [1:10, 1] -1.486 -1.156 -0.826 -0.495 -0.165 ... - attr(*, scaled:center)= num 5.5 - attr(*, scaled:scale)= num 3.03 y [,1] [1,] -1.4863011 [2,] -1.1560120 [3,] -0.8257228 [4,] -0.4954337

Re: [R] don't print object attributes on screen

2009-01-18 Thread Rolf Turner
On 18/01/2009, at 7:55 PM, Pedro Mardones wrote: Dear all; I have a function written in R that returns as a list of values as output that has associated some user defined attributes to it. How can hide these attributes when printing the output on screen? I'm using R-2.8.1 on WinXPit's like

[R] don't print object attributes on screen

2009-01-17 Thread Pedro Mardones
Dear all; I have a function written in R that returns as a list of values as output that has associated some user defined attributes to it. How can hide these attributes when printing the output on screen? I'm using R-2.8.1 on WinXPit's like hiding the attr of the output from the scale