similar to: don't print object attributes

Displaying 20 results from an estimated 100 matches similar to: "don't print object attributes"

2003 Jun 13
1
problem with latex of object summary reverse
Hi, I have the following problem (library Hmisc loaded, iris data loaded, R Version 1.7.0 (2003-04-16), packages updated, running on a linux Debian i386): > summary(Species~Sepal.Length,method="reverse")->a > a Descriptive Statistics by Species +------------+-----------------+-----------------+-----------------+ | |setosa |versicolor |virginica
2012 Sep 26
1
Change in order of names after applying "plyr" package
Dear R helpers I have following two data.frames viz. equity_data and param. equity_data = data.frame(security_id = c("Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "Air", "AB", "AB", "AB", "AB",
2010 Oct 03
1
plyr: a*ply with functions that return matrices-- possible bug in aaply?
I have an application where I have a function to calculate results for a 2-way table or matrix, which returns a matrix with one less row and column. To keep this short, the function below captures the structure: fun2way <- function(f){ if (!length(dim(f)) ==2) stop("only for 2-way arrays") R <- dim(f)[1] C <- dim(f)[2] f[1:(R-1), 1:(C-1)] } Now, I want to
2018 Mar 25
0
R-devel Digest, Vol 181, Issue 22
Thanks. I am fully aware of what aggregate() returnes, and I can post-process this into the form I want ? if the names are available. But for foo, the returned object is both different in structure and loses the name altogether: foo <- function(x) { c(mean = base::mean(x)) } str(aggregate(iris$Sepal.Length, by = list(iris$Species), FUN = foo)) ## 'data.frame': 3 obs. of 2 variables:
2010 Jul 14
1
Dot Plot with Confidence Limits
Hi, I have the following dataset and I would like to create a dotplot with confidence limits: CAT1 CAT2 MEAN Lower Upper 1 1 1 0.619 0.392 0.845 2 1 10 1.774 1.030 2.518 3 1
2010 Nov 17
3
stacking consecutive columns
I have a file, each column of which is a separate year, and each row of each column is mean precipitation for that month. Looks like this (except it goes back to 1964). month X2000 X2001 X2002 X2003 X2004 X2005 X2006 X2007 X2008 X2009 1 1.600 1.010 4.320 2.110 0.925 3.275 3.460 0.675 1.315 2.920 2 2.960 3.905 3.230 2.380 2.720 1.880 2.430 1.380
2006 Dec 14
5
Nicely formatted tables
If I use latex(summary(X)) where X is a data frame with four variables I get something like Rainfall Education Popden Nonwhite Min. :10.00 Min. : 9.00 Min. :1441 Min. : 0.80 1st Qu.:32.75 1st Qu.:10.40 1st Qu.:3104 1st Qu.: 4.95 Median :38.00 Median :11.05 Median :3567 Median :10.40 Mean :37.37 Mean :10.97 Mean :3866
2018 Mar 23
2
aggregate() naming -- bug or feature
In the examples below, the first loses the name attached by foo(), the second retains names attached by bar(). Is this an intentional difference? I?d prefer that the names be retained in both cases. foo <- function(x) { c(mean = base::mean(x)) } bar <- function(x) { c(mean = base::mean(x), sd = stats::sd(x))} aggregate(iris$Sepal.Length, by = list(iris$Species), FUN = foo) #>
2018 Mar 23
1
aggregate() naming -- bug or feature
On Fri, Mar 23, 2018 at 6:43 PM, Rui Barradas <ruipbarradas at sapo.pt> wrote: > Hello, > > Not exactly an answer but here it goes. > If you use the formula interface the names will be retained. Also if you pass named arguments: aggregate(iris["Sepal.Length"], by = iris["Species"], FUN = foo) # Species Sepal.Length # 1 setosa 5.006 # 2
2004 Aug 21
2
more on apply on data frame
Hi R People: Several of you pointed out that using "tapply" on a data frame will work on the iris data frame. I'm still having a problem. The iris data frame has 150 rows, 5 variables. The first 4 are numeric, while the last is a factor, which has the Species names. I can use tapply for 1 variable at a time: >tapply(iris[,1],iris[,5],mean) setosa versicolor virginica
2009 Dec 19
3
DROP and KEEP statements in R
What is equivalent to DROP or KEEP statements of SAS in R? -- This message was sent on behalf of sarjinder at yahoo.com at openSubscriber.com http://www.opensubscriber.com/messages/r-help at r-project.org/topic.html
2010 Jun 09
4
question about "mean"
Hi there: I have a question about generating mean value of a data.frame. Take iris data for example, if I have a data.frame looking like the following: --------------------- Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2
2012 Oct 10
2
Summary using by() returns character arrays in a list
I use by() to generate a summary statistics like so: Lbys <- by(dat[Nidx], dat$LipTest, summary) where Nidx is an index vector with names picking out the columns in the data frame dat. This returns a list of character arrays (see below for str() output) where the columns are named correctly but the rownames are empty strings and the values are strings prepended with the summary
2005 Mar 16
2
how to draw xyplot figure like figure 4.18 of MASS (4th) ?
Dear All: Could you please tell me how I can draw figure formatted like figure 4.18 of MASS (4th) with the attached data set? Thanks Zhongming Yang --------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sample.txt Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050316/abfdb85e/sample.txt
2011 Feb 14
1
Return list of data frames.
Hi, I've got a problem with a function trying to return 2 data frames in a list. The code is as follow: function(x) { # code.... MyList<- list("a"=df.a,"b"=df.b) return(MyList) } and I got the following message: Error in list_to_dataframe(res, attr(.data, "split_labels")) : Results must be all atomic, or all data frames At first instance I thought it
2008 Aug 07
6
multiple tapply
Hi folk, I tried this and it works just perfectly tapply(iris[,1],iris[5],mean) but, how to obtain a single table from multiple variables? In tapply x is an atomic object so this code doesn't work tapply(iris[,1:4],iris[5],mean) Thanx and great summer holidays Gianandrea -- View this message in context: http://www.nabble.com/multiple-tapply-tp18868063p18868063.html Sent from the R help
2015 May 08
3
pregunta
Estimados Al dirigir la lectura de un folder tYA1.csv me da este error y no me percato del motivo, adjunto archivo. Espero su ayuda Saludos Jos? > setwd("D:/Public/Documents/R/bioimpedancia") > a<-read.csv("tYA1.csv",header=TRUE, sep=",", dec=".") Error in read.table(file = file, header = header, sep = sep, quote = quote, : more
2001 Feb 19
1
means by column after split
Colleagues ---------------------------------- System info: R version rw1020 on NT ESS using emacs ver. 20.4 ---------------------------------- I need to get the means for each column of a dataframe in the list created by splitting a data frame. At present, I am getting the mean of all columns in aggregate. The structure of the unsplit data is: > shuttle.tr1[1:10,] juliandate
2008 Mar 24
1
Great difference for piecewise linear function between R and SAS
Dear Rusers, I am now using R and SAS to fit the piecewise linear functions, and what surprised me is that they have a great differrent result. See below. #R code--Knots for distance are 16.13 and 24, respectively, and Knots for y are -0.4357 and -0.3202 m.glm<-glm(mark~x+poly(elevation,2)+bs(distance,degree=1,knots=c(16.13,24)) +bs(y,degree=1,knots=c(-0.4357,-0.3202
2012 Jun 11
1
saving sublist lda object with save.image()
Greetings R experts, I'm having some difficulty recovering lda objects that I've saved within sublists using the save.image() function. I am running a script that exports a variety of different information as a list, included within that list is an lda object. I then take that list and create a list of that with all the different replications I've run. Unfortunately I've been