similar to: Bug in by() function which works for some FUN argument and does not work for others

Displaying 20 results from an estimated 1000 matches similar to: "Bug in by() function which works for some FUN argument and does not work for others"

2016 Apr 15
4
Bug in by() function which works for some FUN argument and does not work for others
Dear All, Thanks for your help. However, I would like to draw your attention to the following: Actually, I was replicating the Example 2.3, using the dataset "brainsize.txt" given in Section 2.3.3 ("Summarize by group") at page 55, of a famous book "R by Example" written by "Jim Albert and Maria Rizzo" published in Springers (2012) in a Use R! Series. The
2016 Apr 16
2
Bug in by() function which works for some FUN argument and does not work for others
Dear All, I have got your core message, that it is my responsibility to determine whether any particular function in my version of R satisfies the language requirements at the time of your use. Jim Albert and Maria Rizzo must have used their code, which was permitted in the R-code of their time (2012). Therefore, I have now modified my R-code, as per R-3..2.4 version, according to my requirement
2016 Apr 14
0
Bug in by() function which works for some FUN argument and does not work for others
I think you are not using the best function for what your intentions are. Try: > by(data=mtcars, INDICES=list(as.factor(mtcars$am)), FUN=colMeans) : 0 mpg cyl disp hp drat wt qsec vs 17.1473684 6.9473684 290.3789474 160.2631579 3.2863158 3.7688947 18.1831579 0.3684211 am gear carb 0.0000000
2016 Apr 17
0
Bug in by() function which works for some FUN argument and does not work for others
> On Apr 16, 2016, at 2:03 AM, Akhilesh Singh <akhileshsingh.igkv at gmail.com> wrote: > > Dear All, > > I have got your core message, that it is my responsibility to determine whether any particular function in my version of R satisfies the language requirements at the time of your use. Jim Albert and Maria Rizzo must have used their code, which was permitted in the R-code
2016 Apr 15
0
Bug in by() function which works for some FUN argument and does not work for others
> On Apr 15, 2016, at 1:16 AM, Akhilesh Singh <akhileshsingh.igkv at gmail.com> wrote: > > Dear All, > > Thanks for your help. However, I would like to draw your attention to the > following: > > Actually, I was replicating the Example 2.3, using the dataset > "brainsize.txt" given in Section 2.3.3 ("Summarize by group") at page 55, > of a
2018 Apr 26
1
Package 'data.table' in version R-3.5.0 not successfully being installed
Dear Sir, I am using R on Windows OS platform. I upgraded my R-system to version R-3.5.0. While upgrading my libraries in R as well as in RStudio, I am stuck up in the package 'data.table', which is required by many other packages in R-codes in my R-Markdown files. I tried to install 'data.table' from "USA-berkely" and "UK-bristol" as well as
2018 Apr 27
2
Package 'data.table' in version R-3.5.0 not successfully being installed
Dear Akhilesh, I hope that it's clear that the Windows binary I provided for the data.table package is a temporary solution, and that the maintainer should fix the package so that it passes its own tests. You should be careful using the package in its current state. Best, John > -----Original Message----- > From: Akhilesh Singh [mailto:akhileshsingh.igkv at gmail.com] > Sent:
2018 Jan 06
4
Error occurring in "emmeans" package for the two data sets I used. Please help.
I am a Professor of Statistics at Indira Gandhi Krishi Vishwavidyalaya, Raipur, India. While teaching in class about analysis of variance using R, I was doing a one-way analysis for the two data-sets given below in the R-class. I got a typical error in "emmeans" package, please help: Data-set-1: -------------- Medley and Clements (1998) investigated the impact of zinc contamination (and
2018 Apr 27
0
Package 'data.table' in version R-3.5.0 not successfully being installed
Akhilesh, I don't know if I am adding signal or noise here, but I installed R 3.5.0 yesterday and installed data.table just fine, but I have Rtools installed. "Building packages from source" may sound intimidating, but Rtools is really easy to install and once installed, it does all the work for you. Thanks, Roger -----Original Message----- From: R-help [mailto:r-help-bounces
2018 Jan 10
0
[FORGED] Error occurring in "emmeans" package for the two data sets I used. Please help.
Thanks for your kind reply. Problem is solved. However, it's "confidence interval / treatment comparison plot" is not taking main title. And the fonts of axes labels can not be changed using 'cex' parameter. I will appreciate if you could help in this matter too. Dr. A. K. Singh On 09-Jan-2018 8:18 PM, "Sal Mangiafico" <salvatore.s.mangiafico at gmail.com>
2018 Jan 08
0
[FORGED] Error occurring in "emmeans" package for the two data sets I used. Please help.
On 07/01/18 02:19, Akhilesh Singh wrote: > I am a Professor of Statistics at Indira Gandhi Krishi Vishwavidyalaya, > Raipur, India. While teaching in class about analysis of variance using R, > I was doing a one-way analysis for the two data-sets given below in the > R-class. I got a typical error in "emmeans" package, please help: > > Data-set-1: > --------------
2018 Apr 26
3
Package 'data.table' in version R-3.5.0 not successfully being installed
Dear A.K. Singh, As you discovered, the data.table package has an error under R 3.5.0 that prevents CRAN from distributing a Windows binary for the package. The reason that you weren't able to install the package from source is apparently that you haven't installed the R package-building tools for Windows. See <https://cran.r-project.org/bin/windows/Rtools/>. Because a number of
2020 Oct 18
2
Resultado de la consola como un tibble
Buen día estimados Estoy tratando de hacer un tibble con los resultados de un apply que se muestran en la consola que me da R, no estoy seguro si eso se pueda hacer, pero me gustaría organizar los resultados de esa manera. mi código es: data("mtcars") Mtcars_matriz <- as.matrix(mtcars) apply(Mtcars_matriz, MARGIN =2, FUN = shapiro.test) DF2 <- tibble(Variable = NA, W = NA, Pvalue =
2020 Oct 18
1
Resultado de la consola como un tibble
Hola, Bueno, puedes hacer el cálculo de una forma mucho más compacta y rápida. Esta forma es especialmente recomendable cuando tienes muchas columnas y muchas filas. > library(data.table) > myDT <- as.data.table(mtcars) > myDTlong <- melt(myDT, measure.vars=1:ncol(myDT)) > myDTlong[ , list(p_value = shapiro.test(value)$p.value, v_stat = shapiro.test(value)$statistic) , by
2013 Apr 12
3
Why copying columns of a data.frame becomes numeric?
Dear list, I want the 1st, 2nd, 5th, and 6th columns of mtcars. After copying them, the columns become numeric class rather than data frame. But, when I copy rows, they data frame retains its class. Why is this? I don't see why copying rows vs columns is so different. > class(mtcars) [1] "data.frame" > head(mtcars) mpg cyl disp hp drat wt qsec vs
2012 Nov 04
1
Apply same linear model to subset of dataframe
I have applied the same linear model to several different subsets of a dataset. I recently read that in R, code should never be repeated. I feel my code as it currently stands has a lot of repetition, which could be condensed into fewer lines. I will use the mtcars dataset to replicate what I have done. My question is: how can I use fewer lines of code (for example using a for loop, a function or
2017 Aug 29
2
DBI::dbWriteTable syntax error apparently from quotes
I have been successfully using RODBC for a long time (years) to connect to MS SQL Server from R. This week I wanted to try using odbc but I am seeing some problems which may be related to how I set up my driver and/or connection. The dbWriteTable manual page gives as an example command: dbWriteTable( pDB$con, "mtcars", mtcars[1:5,]) When I try this I get the following error Error:
2007 May 12
2
Implicit vs explicit printing and the call stack
Hi everyone, I've run into a bit of strange problem with implicit vs explicit printing and the call stack. I've included an example at the bottom of this email. The basic problem is that I have an S3 object with a print method. When the object is implicitly printed (ie. typed directly into the console) the function arguments in the call stack are exploded out to their actual values,
2002 May 23
2
crosstabulation of means
Hello, I am trying to print a crosttabulation of mean,sd,n for a continuous variable crossclassified by anoother/s grouping variables. I came up with: xtab2 <- function(x,g1,g2) { funy <- function(z) list(mean(z,na.rm=T),sd(z,na.rm=T),length(z)) aa <- by(x,list(g1,g2),funy) bb <- matrix(unlist(aa),nrow=3 ,dimnames=list(c("mean","sd","n"),
2013 Apr 16
2
efficiently diff two data frames
Dear all, What is the quickest and most efficient way to diff two data frames, so as to obtain a vector of indices (or logical) for rows/columns that differ in the two data frames? For example, > Xe <- head(mtcars) > Xf <- head(mtcars) > Xf[2:4,3:5] <- 55 > all.equal(Xe, Xf) [1] "Component 3: Mean relative difference: 0.6863118" [2] "Component 4: Mean relative