search for: toothgrowth

Displaying 20 results from an estimated 44 matches for "toothgrowth".

2010 Nov 20
10
An empty grey diagram
Hi folks, Win7 64bit R 1.12.0 I run following command on R:- > ToothGrowth > attach(ToothGrowth) > plot(dose,len) > matrics=lm(len~dose) > abline(metrics) Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet Only a grey diagram is displayed without content > plot(abline(metrics)) Error in int_abline(a =...
2011 Aug 15
2
Missing datasets (2.13.1)
Dear all How does one resolve the variance between the actual availability of data sets in the default implementation with those mentioned in the documentation? I am unable to attach some of the datasets, even though help() is available for the same datasets. For example, "ToothGrowth" is a dataset that is widely mentioned in the documentation as being part of the base install. help("ToothGrowth") does bring up help. However, the dataset is missing from the install as I'm unable to attach() it. (An aside: why is the data() command silent on a missing dataset...
2010 Apr 02
1
lineplot.CI in "sciplot": option "ci.fun" can't be changed?
...and Manuel, I have encounter the following problem with the function "lineplot.CI".? I'm running R 2.10.1, sciplot 1.0-7 on Win XP.? It seems like it's a scoping issue, but I couldn't figure it out. Thanks! ...Tao > lineplot.CI(x.factor = dose, response = len, data = ToothGrowth)??? ## fine > lineplot.CI(x.factor = dose, response = len, data = ToothGrowth, fun=median)? ## fine > lineplot.CI(x.factor = dose, response = len, data = ToothGrowth, fun=mean)? ## fine > lineplot.CI(x.factor = dose, response = len, data = ToothGrowth, ci.fun= function(x) c(fun(x)-2*se(x),...
2010 Nov 27
1
How to add multiple ablines
Hi folks Run; > ToothGrowth > attach(ToothGrowth) > toothgrowth=lm(len~dose) adding abline: > abline(toothgrowth) I got it done adding single abline. How to add more ablines on the same diagram? I found following thread, applying "mapply" command; Plotting multiple ablines http://www.mail-archive.com/...
2008 Sep 12
2
Again, about boxplot
Thank you for your guys reply for my previous question. But I got one more question about the boxplot. With the code in the R-help: boxplot(len ~ dose, data = ToothGrowth, boxwex = 0.25, at = 1:3 - 0.2, subset = supp == "VC", col = "yellow", main = "Guinea Pigs' Tooth Growth", xlab = "Vitamin C dose mg", ylab = "tooth length", ylim = c(0, 35), yaxs = "i") boxplot(...
2011 Mar 25
2
error in bargraph.CI {sciplot}
Hi to all, Does anybody knows why this is giving an error? data(ToothGrowth) # Two-way design with options bargraph.CI(dose, len, group = supp, data = ToothGrowth, xlab = "Dose", ylab = "Growth", cex.lab = 1.5, x.leg = 1, col = "black", angle = 45, cex.names = 1.25, density = c(0,20), legend = TRUE) Error i...
2004 May 26
0
aggregate.formula
This relates to a message from Christophe Pallier to r-help some time ago. Like myself, he finds aggregate very useful, but the interface a little cumbersome. I've implemented a more compact formula interface, found at the bottom of this message: data(ToothGrowth) # I used to aggregate like this: aggregate(list(len=ToothGrowth$len), list(supp=ToothGrowth$supp,dose=ToothGrowth$dose), mean) # Recently, I discovered a slightly shorter call: with(ToothGrowth, aggregate(list(len=len), list(supp=supp,dose=dose), mean)) # But aggregate.for...
2004 Jan 04
0
termplot; failure to subset non-dataframe carriers (PR#6327)
termplot() does not carry subsetting over to carriers that are in the environment but not in the data frame. This generates a "subscript out of bounds" error. > data(ToothGrowth) > logdose <- log(ToothGrowth$dose) > tooth.lm <- lm(len ~ logdose, data=ToothGrowth) > termplot(tooth.lm) ## Works fine > toothVC2.lm <- lm(len ~ poly(dose,2), data=ToothGrowth, + subset=ToothGrowth$supp=="VC") > termplot(toothVC2.lm) #...
2010 Sep 26
2
Changing x-axis on boxplot
...s() command.? I have also tried variations in the names= argument but can't get it to work.? Ideally I would like tickmarks on either side of each factor with the number for the level centered between the two tick marks.? Any suggestions? ? Thanks, ?Tim? Example: boxplot(len ~ dose, data = ToothGrowth, ??????? boxwex = 0.25, at = 1:3 - 0.2, ??????? subset = supp == "VC", col = "yellow", ??????? main = "Guinea Pigs' Tooth Growth", ??????? xlab = "Vitamin C dose mg", ??????? ylab = "tooth length", ??????? xlim = c(0.5, 3.5), ylim = c(0, 35), ya...
2007 Nov 21
1
Manipulating x axis in stripchart
Hi all, I I need to manipulate the x axis in a stripchart. I will use one of the data sets included in R to explain what I need to do. attach(ToothGrowth) stripchart(len[supp=='VC']~dose[supp=='VC'], vertical=TRUE, group.names=c('A','A','A')) stripchart(len[supp=='OJ']~dose[supp=='OJ'], add=TRUE, vertical=TRUE, at=c(1:3)+.1, group.names=c('B','B','B')) As you can read...
2006 Nov 17
2
s.e. on interaction plots
Is it possible to add standard error bars to the means on interaction plots? Thanks Murray -- Murray Pung Statistician, Datapharm Australia Pty Ltd 0404 273 283 [[alternative HTML version deleted]]
2001 Aug 15
1
Help with XGobi.
Hi, I followed the following sequence of commands after installing 'XGobi': >library(xgobi); >data(ToothGrowth); >xgobi(ToothGrowth); I got the following warning message: C:/R13 1.0/rw1030/library/xgobi/scripts/xgobi.bat -vtitle 'ToothGrowth' -std mmx C:/DOCUME~1/h1452992/LOCALS 1/Temp/xgobi-TthGr5705 Warning message: argument `pkg' is deprecated. Use `package' instead. in: system.fi...
2008 Feb 04
7
adding the mean and standard deviation to boxplots
Dear list, How can I add the mean and standard deviation to each of the boxplots using the example provided in the boxplot function? boxplot(len ~ dose, data = ToothGrowth, boxwex = 0.25, at = 1:3 - 0.2, subset = supp == "VC", col = "yellow", main = "Guinea Pigs' Tooth Growth", xlab = "Vitamin C dose mg", ylab = "tooth length", ylim = c(0, 35), yaxs = "i") boxplot(...
2009 Mar 21
1
bargraph.CI change se for sd
Hi there, I am a beginner. I would like to change the error bars in the bargraph.CI function from the default (se) to (sd). The help file says ci.fun= function(x) c(fun(x)-se(x), fun(x)+se(x)) Is there a simple way of telling the function what (x) precisely is - I already define in in the of the bargraph.CI function and assume that is should be able to use that information. cheers, Herwig --
2001 Jul 25
2
pch with plot and legend
I'm trying to plot a scatterplot of two variables using pch to plot different characters based on a third factor. Here is my example > data("ToothGrowth") > attach(ToothGrowth) > levels(supp) [1] "OJ" "VC" > plot(len ~ dose,pch=as.numeric(supp)) > legend(locator(1),pch=as.numeric(supp),legend=levels(supp)) The command as.numeric(supp) returns 2 2 2 2 ... 1 1 1 ... for the factor supp which the plot command use...
2001 Jan 07
0
boxplot question
...the variance (rectangle height = 2s, whiskers >going from +1s to +2s and -1s to -2s). Is there a way to produce such >boxplot with R ? Yes, by using the bxp() function on a data structure containing the relevant values: # # using a standard R dataset # data(ToothGrowth) attach(ToothGrowth) # # standard boxplot # boxplot(len) # # get stats for the standard boxplot # bp.stats <- boxplot.stats(len) # # have a look at the structure (list) returned by boxplot.stats()...
2011 Apr 19
5
Simple Missing cases Function
...2) { miss.list[[i]] <- miss.list[[i]][2] } } for (i in 1:length(miss.list)) { if (names(miss.list[[i]]) == "FALSE") { miss.list[[i]] <- 0 } } data.frame(names(data), as.numeric(miss.list)) } Example: data(ToothGrowth) data.m <- ToothGrowth data.m$supp[sample(1:nrow(data.m), size=25)] <- NA miss(data.m) [[alternative HTML version deleted]]
2000 Dec 10
1
more boxplot questions
Hello, I have a couple more questions about boxplots. In the books I've read on statistics (I'm not a statistics expert but just a poor engineer trying to help his wife with the analysis of the data she gathered for her medieval history PhD), I seen two kinds of box plots: one using quartiles to determine the height of the rectangles and whiskers which is what the standard R boxplot does,
2009 Nov 03
2
bargraph.ci - CI and color question.
Hello, When using bargraph.CI in package sciplot can the bars for each group be different colors? How do I select the color for each group? When I use this instead of the default (SD vs SE): bargraph.CI(x.factor = dose, response = len, data = ToothGrowth, ci.fun= function(x) c(mean(x)-sd(x), mean(x) + sd(x)) ) Am I getting 95% CI bars? Thank you kindly, Michael Just
2009 Jan 13
5
indexing question
Hi all, i have a pretty easy indexing question, at least i believe so. The main reason i post it here, is that brackets and $ are hard to google. How do I index correctly, if i just want to display the whole dataset conditioned on the fact that some particular column equals one. I know i can do something like: data$somecolumn[data$particularcol ==1] . That will show all "some