search for: mysummary

Displaying 9 results from an estimated 9 matches for "mysummary".

2017 Sep 08
2
quote()/eval() question
...create an object from dplyr::summarise, and then evaluate it on a data frame. I know I could directly do: df %>% dplyr::summarise(x1_mean = mean(x1)) but this is not what I'm looking for. library(dplyr) df <- data.frame(x1 = rnorm(100), x2 = rnorm(100)) foo <- function(df) { mySummary <- quote(dplyr::summarise(x1_mean = mean(x1))) df %>% eval(mySummary) } foo(df) Error in eval(., mySummary) : invalid 'envir' argument of type 'language' Thank you, Axel. [[alternative HTML version deleted]]
2009 May 06
4
tapply changing order of factor levels?
...IN0019800021 IN0019800021 IN0020020064 IN0020020064 IN0019800021 Levels: IN0020020155 IN0019800021 IN0020020064 > summary(myfactor) IN0020020155 IN0019800021 IN0020020064 2 4 3 # Everything fine upto this point. The order of levels is maintained as it is. > mysummary<-tapply(myfactor,mydata,length) > mysummary IN0019800021 IN0020020064 IN0020020155 4 3 2 # Now the order has changed. Is this the expected behavior? Any idea on how to avoid the change in order? Regards, Chirantan ____________________________________ Visit...
2015 Jul 21
2
glm com etiquetas en las variables
Hola: Si aún hay alguien que no está de vacaciones, igual me pueden ayudar. Quiero ajustar unos modelos: REG_LOG <- glm (low ~ X, family = "binomial", data = DATOS) Ejemplo: library(MASS) data(birthwt, package="MASS") birthwt$low <- factor(birthwt$low) birthwt$race <- factor(birthwt$smoke) REG_LOG <- glm (low ~ smoke, family =
2012 Feb 22
1
xtable prcomp
Hi, I need to export to LaTex the summary of a PCA. So: myPCA <- prcomp(myDF) mySummary <- summary(myPCA) # print(xtable(mySummary)) How can I export to LaTeX not all the summary but only the first nPCs?? Best Riccardo
2006 Jul 08
1
Summary Statistics for data.frame
I apologize for my constant questions but I am new to R and trying to gain an appreciation for its capabilities. The following task is easy in Excel and I was hoping somebody could give me a quick explanation for how it can be acheived in R so I can avoid having to switch between the two applications. How do I find the Summary Statistics in one Vector of the dataframe by levels in another of the
2011 Jan 06
2
memisc-Tables with robost standard errors
Hello, I've got a question concerning the usage of robust standard errors in regression using lm() and exporting the summaries to LaTeX using the memisc-packages function mtable(): Is there any possibility to use robust errors which are obtained by vcovHC() when generating the LateX-output by mtable()? I tried to manipulate the lm-object by appending the "new" covariance
2009 Nov 01
3
Collapse factor levels
I'm sure this is simple enough, but an R site search on my subject terms did suggest a solution. I have a numeric vector with many values that I wish to create a factor from having only a few levels. Here is a toy example. > x <- 1:10 > x <-
2010 May 07
4
Any way to apply TWO functions with tapply()?
I need to compute the mean and the standard deviation of a data set and would like to have the results in one table/data frame. I call tapply() two times and do then merge the resulting tables to have them all in one table. Is there any way to tell tapply() to use the functions mean and sd within one function call? Something like tapply(data$response, list(data$targets, data$conditions), c(mean,
2008 Jul 09
5
Summary Stats (not summary(x))
I'm looking for a function that lists a few summary stats for a column (or row) of data. I'm aware of summary(x), but that does not give me what I'm looking for. I'm actually looking for something that is very similar to the descriptive statistics tool in excel; i.e. Mean, Std. Error, Std. Deviation, Kurtosis. I'm positive that I came across a function that did this (possibly