similar to: overriding "summary.default" or "summary.data.frame". How?

Displaying 20 results from an estimated 100 matches similar to: "overriding "summary.default" or "summary.data.frame". How?"

2018 Apr 04
0
Plot data in sequence
Hi, Thanks for the reproducible example. Looking at str(datn) would give you a clue. STATUS is a factor because it contains character values. Factor levels by default are alphabetical with numbers first, but you can change those. > str(datn) 'data.frame': 36 obs. of 3 variables: $ LEVEL : Factor w/ 4 levels "DIPLOMA","MATRIC",..: 1 1 1 1 1 1 1 1 1 4 ... $
2011 Aug 25
2
within-groups variance and between-groups variance
Hello, I have been looking for functions for calculating the within-groups variance and between-groups variance, for the case where you have several numerical variables describing samples from a number of groups. I didn't find such functions in R, so wrote my own versions myself (see below). I can calculate the within- and between-groups variance for the Sepal.length variable (iris[1]) in
2010 Mar 30
1
Adding RcppFrame to RcppResultSet causes segmentation fault
Hi, I'm a bit puzzled. I uses exactly the same code in RcppExamples package to try adding RcppFrame object to RcppResultSet. When running it gives me segmentation fault problem. I'm using gcc 4.1.2 on redhat 64bit. I'm not sure if this is the cause of the problem. Any advice would be greatly appreciated. Thank you. Rob. int numCol=4; std::vector<std::string>
2018 Apr 04
2
Plot data in sequence
Hi r-users, I would like to draw line plots. However, the plot starts from 11121 data and plot data ENTRY last in the plot. Here is the code and data. datn <- read.table(header=TRUE, text=' LEVEL STATUS CGPA DIPLOMA ENTRY 3.32 DIPLOMA 11121 2.91 DIPLOMA 11122 2.90 DIPLOMA 12131 2.89 DIPLOMA 12132 2.89 DIPLOMA 13141 2.93 DIPLOMA 13142 2.96 DIPLOMA 14151 2.76 DIPLOMA 14152 2.73 STPM
2010 Oct 21
1
gam plots and seWithMean
hello I'm learning mgcv and would like to obtain numerical output corresponding to plot.gam. I can do so when seWithMean=FALSE (the default) but only approximately when seWithMean=TRUE. Can anyone show how to obtain the exact values? Alternatively, can you clarify the explanation in the manual "Note that, if seWithMean=TRUE, the confidence bands include the uncertainty about the
2010 Oct 08
3
Import Multiple csv files and merge into one Master file
Dear R Group: How to import multiple csv files and merge into one dataset. Thanks and Regards, Xing [[alternative HTML version deleted]]
2011 Aug 02
1
update.default: fall back on model.frame in case that the data frame is not in the parent environment
Dear all, Suppose the following code: --------------8<-------------- mm <- function(datf) { lm(y ~ x, data = datf) } mydatf <- data.frame(x = rep(1:2, 10), y = rnorm(20, rep(1:2, 10))) l <- mm(mydatf) -------------->8-------------- If I want to update l now without providing the data argument an error occurs: --------------8<-------------- > update(l, . ~ .) Error in
2011 Nov 03
1
Select columns of a data.frame by name OR index in a function
Dear all, Sometimes I have the situation where a function takes a data.frame and an additional argument describing come columns. For greater flexibility I want to allow for either column names or column indices. What I usually do then is something like the following: -------------8<------------- f <- function(datf, cols) { nc <- seq_along(datf) cn <- colnames(datf) colOK <-
2018 Jul 20
3
Should there be a confint.mlm ?
It seems that confint.default returns an empty data.frame for objects of class mlm. For example: ``` nobs <- 20 set.seed(1234) # some fake data datf <- data.frame(x1=rnorm(nobs),x2=runif(nobs),y1=rnorm(nobs),y2=rnorm(nobs)) fitm <- lm(cbind(y1,y2) ~ x1 + x2,data=datf) confint(fitm) # returns: 2.5 % 97.5 % ``` I have seen proposed workarounds on stackoverflow and elsewhere, but
2000 Mar 07
1
update fails after specific sequence of steps (PR#474)
# Your mailer is set to "none" (default on Windows), # hence we cannot send the bug report directly from R. # Please copy the bug report (after finishing it) to # your favorite email program and send it to # # r-bugs@biostat.ku.dk # ###################################################### I stumbled on this error while doing a classroom demonstration. The error is reproducible,
2015 Sep 22
2
Excel vs. R
Antes que nada puedes encontrar documentación sobre la librería ggplot2 que es la que yo uso para gráficos como el que quieres hacer, aunque hay otros paquetes que te pueden ser útiles: http://docs.ggplot2.org/current/ Adicionalmente a lo dicho por Carlos aquí te van otros ejemplos (los agrego porque no nos proporcionaste datos con lo que pudiéramos ver mejor lo que buscas):
2012 Apr 20
1
predictOMatic for regression. Please try and advise me
I'm pasting below a working R file featuring a function I'd like to polish up. I'm teaching regression this semester and every time I come to something that is very difficult to explain in class, I try to simplify it by writing an R function (eventually into my package "rockchalk"). Students have a difficult time with predict and newdata objects, so right now I'm
1999 Jul 08
0
summary.default & is.recursive
I'm moving this part of an on-going discussion to r-devel because I think I've uncovered a bug: >summary.default : How is yours different from R's (I didn't try to find out) > If it has an advantage you should post to R-devel as a proposal I did propose it along time ago, but ... The fix was for a bug that Splus 3.2 and 3.3 have. It does not work properly with lists
2005 Apr 04
1
How to extrct F value
Hello sir: Here's the result of repeated measures ANOVA. $"Error: Within" Df Sum Sq Mean Sq F value Pr(>F) t 2 524177 262089 258.24 1.514e-06 *** Residuals 6 6089 1015 --- Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 My question is: How to extract the F value only? If the result is a
2011 Dec 19
1
pls help to print out first row of terms(model) output in example program
Greetings. I've written a convenience function for multicollinearity diagnosis. I'd like to report to the user the formula that is used in a regression. I get output like this: > mcDiagnose(m1) [1] "The following auxiliary models are being estimated and returned in a list:" [1] "`x1` ~ ." formula(fmla)() [1] "`x2` ~ ." I'd like to fill in the period
2018 Jul 20
0
Should there be a confint.mlm ?
>>>>> steven pav >>>>> on Thu, 19 Jul 2018 21:51:07 -0700 writes: > It seems that confint.default returns an empty data.frame > for objects of class mlm. For example: > It seems that confint.default returns an empty data.frame for objects of > class mlm. Not quite: Note that 'mlm' objects are also 'lm' objects, and so it is
2011 Sep 03
2
mclust: modelNames("E") vs modelNames=("V")
Hi, I'm trying to use the library mclust for gaussian mixture on a numeric vector. The function Mclust(data,G=3) is working fine but the fitting is not optimal and is using modelNames="E". When I'm trying Mclust(data,G=3,modelName="V") I have the following message: Error in if (Sumry$G > 1) ans[c(orderedNames, "z")] else ans[orderedNames] : argument is
2011 Sep 04
2
mclust: modelName="E" vs modelName="V"
Hi, I'm trying to use the library mclust for gaussian mixture on a numeric vector. The function Mclust(data,G=3) is working fine but the fitting is not optimal and is using modelNames="E". When I'm trying Mclust(data,G=3,modelName="V") I have the following message: Error in if (Sumry$G > 1) ans[c(orderedNames, "z")] else ans[orderedNames] : argument is
2003 Jan 29
3
Analyzing an unbalanced AB/BA cross-over design
I am looking for help to analyze an unbalanced AB/BA cross-over design by requesting the type III SS ! # Example 3.1 from S. Senn (1993). Cross-over Trials in Clinical Research outcome<-c(310,310,370,410,250,380,330,270,260,300,390,210,350,365,370,310,380,290,260,90,385,400,410,320,340,220) subject<-as.factor(c(1,4,6,7,10,11,14,1,4,6,7,10,11,14,2,3,5,9,12,13,2,3,5,9,12,13))
2010 Jun 03
3
Nested ANOVA with covariate using Type III sums of squares
Hello, I have been trying to get an ANOVA table for a linear model containing a single nested factor, two fixed factors and a covariate: carbonmean<-lm(C.Mean~ Mean.richness + Diversity + Zoop + Diversity/Phyto + Zoop*Diversity/Phyto) where, *Mean.richness* is a covariate*, Zoop* is a categorical variable (the species), *Diversity* is a categorical variable (Low or High), and