Displaying 20 results from an estimated 65 matches for "carbs".
Did you mean:
carb
2005 Apr 02
2
An exercise in the use of 'substitute'
I would like to create a method for the generic function "with" applied
to a class of fitted models. The method should do two things:
1. Substitute the name of the first argument for '.' throughout the
expression
2. Evaluate the modified expression using the data argument to the
fitted model as the first element of the search list.
The second part is relatively easy. The
2011 Feb 03
3
interpret significance from the contr.poly() function
Hello R-help
I don’t know how to interpret significance from the contr.poly() function . From
the example below
: how can I tell if data has a significant Linear/quadratic/cubic trend?
> contr.poly(4, c(1,2,4,8))
.L .Q .C
[1,] -0.51287764 0.5296271 -0.45436947
[2,] -0.32637668 -0.1059254 0.79514657
[3,] 0.04662524 -0.7679594 -0.39757328
[4,] 0.79262909
2002 Jun 26
1
Bug? (PR#1710)
Hi,
I tried to do a multiple linear model from the example
dataset Formaldehyde. However, the function lm() did not
estimate the coefficient of the term carb^2. The same
problem occurred with the (nlme)dataset Pixel with both
function lme() and lm(). I am using the windows version of
R 1.5.1
Lauri Mehtatalo
The Formaldehyde example:
> data(Formaldehyde)
>
2013 Jun 25
1
F statistic in add1.lm vs add1.glm
Should the F statistic be the same when using add1() on models created by lm and glm(family=gaussian)?
They are in the single-degree-of-freedom case but not in the multiple-degree-of-freedom case.
MASS:addterm shows the same discrepancy. It looks like the deviance (==residual sum of squares) gets
divided by the number of degrees of freedom for the term twice in add1.glm. Using anova() on the
2002 Dec 13
2
how to get Residual Standard Error
Hi,
I use lm or loess to make smoothing. After smoothing I need "Residual
Standard Error" in my script. Could you please tell me how can I get
this information?
Thanks,
1997 Dec 02
1
R-alpha: NextMethod in 0.50-a4
I am encountering difficulty with NextMethod in 0.50-a4. We created a
class of groupedData objects which are data.frames with additional
attributes. The most important attribute is a formula describing
roles of some of the variables in the experimental design.
The class of such objects ends in "groupedData", "data.frame". The
print method for the groupedData class simply
2020 Jun 17
2
subset data.frame at C level
Hi,
Hope you are well.
I was wondering if there is a function at C level that is equivalent to
mtcars$carb or .subset2(mtcars, "carb").
If I have the index of the column then the answer would be VECTOR_ELT(df,
asInteger(idx)) but I was wondering if there is a way to do it directly
from the name of the column without having to loop over columns names to
find the index?
Thank you
Best
2010 Nov 30
3
pca analysis: extract rotated scores?
Dear all
I'm unable to find an example of extracting the rotated scores of a
principal components analysis. I can do this easily for the un-rotated
version.
data(mtcars)
.PC <- princomp(~am+carb+cyl+disp+drat+gear+hp+mpg, cor=TRUE, data=mtcars)
unclass(loadings(.PC)) # component loadings
summary(.PC) # proportions of variance
mtcars$PC1 <- .PC$scores[,1] # extract un-rotated scores of
2012 Apr 05
2
count() function
I keep expecting R to have something analogous to the =count function in
Excel, but I can't find anything. I simply want to count the data for a
given category.
I've been using the ddply() function in the plyr package to summarize
means and st dev of my data, with this code:
ddply(NZ_Conifers,.(ElevCat, DataSource, SizeClass), summarise,
avgDensity=mean(Density),
2016 Apr 14
4
Bug in by() function which works for some FUN argument and does not work for others
Dear Sirs,
I am Professor at Indira Gandhi Krishi Vishwavidyalaya, Raipur,
Chhattisgarh, India.
While taking classes, I found the *by() *function producing following error
when I use FUN=mean or median and some other functions, however,
FUN=summary works.
Given below is the output of the example I used on a built-in dataset
"mtcars", along with error message reproduced herewith:
>
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 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
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
2009 Apr 27
0
VIF's in R using BIGLM
Dear R-help
This is a follow-up to my previous post here:
http://groups.google.com/group/r-help-archive/browse_thread/thread/d9b6f87ce06a9fb7/e9be30a4688f239c?lnk=gst&q=dobomode#e9be30a4688f239c
I am working on developing an open-source automated system for running
batch-regressions on very large datasets. In my previous post, I posed
the question of obtaining VIF's from the output 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 =
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
2008 Mar 05
0
Using tune with gbm --grid search for best hyperparameters
Hello LIST,
I'd like to use tune from e1071 to do a grid search for hyperparameter
values in gbm. However, I can not get this to work. I note that there is no
wrapper for gbm but that it is possible to use non-wrapped functions (like
lm) without problem. Here's a snippet of code to illustrate.
> data(mtcars) obj <-
>
2011 Aug 27
1
Grouping variables in a data frame
Hi All,
I have a data frame as follow:
user_id time age location gender
.....
and I learn a logistic regression to learn the weights (glm with family= (link = logit))), my response value is either zero or one. I would like to group the users based on user_id and time and see the y values and predicted y values at the same time. Or plot them some how. Is there any way to somehow group them
2000 Dec 30
0
editor in Windows doesn't like a data frame with row names (PR#797)
The editor in R version 1.2.0 returns an error after editing a data frame
that has row names. This is on a Windows 2000 system, but I've encountered
the same problem under Windows 95. Here's a simple example:
------------------------------------------------------------------------------------
R : Copyright 2000, The R Development Core Team
Version 1.2.0 (2000-12-15)
R is free
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