Displaying 20 results from an estimated 4000 matches similar to: "add error bars in a plot"
2011 Mar 13
3
how to change the margins of a plot area
Dear all,
I am ploting two boxplot of two chemical variables using the format
boxplot(Alkalinity, logAlkalinity, log="y", col=c("lightblue"), lwd=0.6, boxwex=0.3)
However when I plot like this, the distance between the two boxplots is very big and as well the distance of each boxplot from the plot area, left and right. How can I minimise that distance between the boxplots and
2018 Apr 18
3
Problem with regression line
Hello,
I am trying to graph a regression line using the followings:
Age <- c(39, 47, 45, 47, 65, 46, 67, 42, 67, 56, 64, 56, 59, 34, 42, 48, 45,
17, 20, 19, 36, 50, 39, 21, 44, 53, 63, 29, 25, 69)
BloodPressure <- c(144, 220, 138, 145, 162, 142, 170, 124, 158, 154, 162,
150, 140, 110, 128, 130, 135, 114, 116, 124, 136, 142, 120, 120, 160, 158,
144, 130, 125, 175)
SimpleLinearReg1=lm(Age ~
2018 Apr 18
0
Problem with regression line
Hi, Anne,
assign Age and Bloodpressure in the correct order
to the axes in your call to plot as in:
plot(y = Age, x = BloodPressure)
abline(SimpleLinearReg1)
Hth -- Gerrit
---------------------------------------------------------------------
Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen
Tel:
2010 Nov 04
5
Logical vectors
Hi folks,
Pls help me to understand follow;
An Introduction to R
2.4 Logical vectors
http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics
1)
> x
[1] 1 2 3 4 5
> temp <- x != 1
> temp
[1] FALSE TRUE TRUE TRUE TRUE
>
2)
> x
[1] 1 2 3 4 5
> temp <- x > 1
> temp
[1] FALSE TRUE TRUE TRUE TRUE
Why NOT
> temp
[1] TRUE FALSE FALSE FALSE
2010 Nov 04
5
Logical vectors
Hi folks,
Pls help me to understand follow;
An Introduction to R
2.4 Logical vectors
http://cran.r-project.org/doc/manuals/R-intro.html#R-and-statistics
1)
> x
[1] 1 2 3 4 5
> temp <- x != 1
> temp
[1] FALSE TRUE TRUE TRUE TRUE
>
2)
> x
[1] 1 2 3 4 5
> temp <- x > 1
> temp
[1] FALSE TRUE TRUE TRUE TRUE
Why NOT
> temp
[1] TRUE FALSE FALSE FALSE
2018 Jan 17
0
effects & lme4: error since original data frame notfoundWASeffects: error when original data frame is missing
Dear Gerrit,
This issue is discussed in a vignette in the car package (both for functions in the car and effects packages): vignette("embedding", package="car") . The solution suggested there is the essentially the one that you used.
I hope this helps,
John
-----------------------------
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web:
2018 Jan 17
0
effects & lme4: error since original data frame not found WASeffects: error when original data frame is missing
Hi, again,
I have to modify my query since my first (too simple)
example doesn't reflect my actual problem. Second try:
When asking Effect() inside a function to compute an effect
of an lmer-fit which uses a data frame local to the body of
the function, as in the following example (simplifying my
actual application), I get the "Error in is.data.frame(data) :
object 'X' not
2009 Aug 27
2
Comparing and adding two data series
Dear R helpers
I have two series A and B as given below -
A <- c(2, 2, 1, 3, 7, 3, 3, 1, 14, 7, 31)
B <- c(0.0728,0.9538,4.0140,0.0020,2.5593,0.1620,2.513,0.3798, .0033,0.2282, 0.1614)
I need to calculate the total in dataset B corresponding to the numbers in dataset A i.e. for no 1 in A, I need the total as 4.0140+0.3798 (as 1 is repeated twice)
for no 2, I need the total as
2010 Dec 14
3
Question about cut()
Dear all,
I would like to use cut() to make numerics to factors, the sample codes are as follows. However, the result is not what I want, since r[3] =?9 should be in the interval of "8-10%" rather than "2-4%". Maybe cut() is not the right function to use for my situation. Please help. > r <- c(1,1,9,1,1,1)
> col_no <-
2018 Jan 17
4
effects: error when original data frame is missing
Hello, everyody,
when asking, e.g., Effect() to compute the effects of a fitted,
e.g., linear model after having deleted the data frame from the
workspace for which the model was obtained an error is reported:
> myair <- airquality
> fm <- lm(Ozone ~ Temp, data = myair)
> rm(myair)
> Effect("Temp", fm)
Error in eval(model$call$data, envir) : object 'myair'
2012 Mar 27
2
Supperscript, subscript and double lines in the main/sub title and using greek letters
Dear R-help,
I am trying to express myself as best as I can here. If you also use Latex
to edit math reports or other languages with similar editing method,
you'll see what I'm talking about. My sincere appologies if my question is
not clear enough to some extend, as also I'm not able to provide my code
here because I don`t know which one I can use...
When editing the title in R
2010 Aug 31
2
specify axis range
Dear all,
I want to make a plot where I can specify the range of y axis. I am using the interaction.plot command and because the values of y axis are from 2 to 500, I am using a logarithmic scale.
>interaction.plot(speclong$Date,speclong$time2,speclong$outcome,xaxt="n",type="l",pch=20,xlab="", log="y", ylab="Concentration
2018 Jan 09
1
barplot_add=TRUE
Dear Gerrit
Thanks a lot. "rbind" seems to be the right function. Unfortunately there is a shift in the x-axis (see pdf). There are 52 trapcatch values each, m and w, but m$trapcatch and w$trapcatch are shifted up to x-value 60.
The follow-up lines for temp and humidity are fine.
Thanks
Sibylle
setwd("~/Desktop/DatenLogger2017") # am Mac sks
trap =
2012 Jun 27
4
formula version of sunflowerplot() fails when axis label specified
Hello, R-help,
does anybody have already a work-around for the problem that the formula
version of sunflowerplot() throws an error when provided with a value for
xlab (or ylab) different from NULL:
> sunflowerplot( Sepal.Length ~ Sepal.Width, data = iris, xlab = "A")
Error in model.frame.default(formula = Sepal.Length ~ Sepal.Width, data = iris, :
variable lengths differ
2008 Nov 17
3
Time plots
Dear all,
I want to do some time plots and actually the dates are in the format of dd/mm/yyyy. So first I input my dataframe in R in a csv form. What I do is
DF<-read.csv("C:/Documents and Settings/DF.csv")
DATE<-as.Date(DATE, "%d/%m/%Y") # to tell R that DATE column is indeed dates
with(DF, plot(DATE,pH))
Until here it works fine, but I have the graph plotting
2005 Mar 22
2
lattice xyplot() postscript (?) problem in R 2.0.0
Dear all,
I work with R Version 2.0.0 on
Machine hardware: sun4u
OS version: 5.9
Processor type: sparc
Hardware: SUNW,Sun-Blade-1000
and I have a very simple data frame (called OR) with the following
variables:
> sapply( OR, class)
X ci FTyp
"factor" "numeric" "factor"
(In OR$ci there are some Inf-values. OR's
2009 Aug 11
3
Lattice: How to do error bars
I am trying to add 2 stdev error bars to lattice type plots:
panel.ebar<-function(x,y,dy=NULL,...) {
panel.xyplot(x,y,...)
panel.segments(x,y-dy,x,y+dy,...)
}
Then:
xyplot(y~x|fc,data=dat,dy=dat$dy,panel=panel.ebar)
This adds error bars but they are not conditioned on the factor fc.
xyplot(y+I(y-dy)+I(y+dy)~x|fc,data=dat)
This produces 3 series of points in different colors, conditioned
2010 Nov 18
3
problems subsetting
Dear all,
I have searched the forums for an answer - and there is plenty of
questions along the same line - but none of the paproaches shown worked
to my problem:
I have a data frame that I get from a csv:
summarystats<-as.data.frame(read.csv(file=f_summary));
where I have the columns Dataset, Class, Type, Category,..
Problem1: I want to find a subset of this frame, based on values in
2018 Jan 09
3
barplot_add=TRUE
Dear R users
aim
Barplot of insect trap catches (y variable trapcatch) at one specific station (variable FiBL_Hecke) from week 1-52 ( x variable week).
It works well using the function tapply (sum trapcatch per week, males and females not separated), however, I intend to separate the y variable trapcatch in males and females (variable m_w: m and w)
problem
I used the function "add" to
2018 Jan 09
0
barplot_add=TRUE
Hi, Sibylle,
since you write '"mathematically" add', does
barplot(rbind(m$trapcatch, w$trapcatch))
do what you want (modulo layout details)?
Hth -- Gerrit
---------------------------------------------------------------------
Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen
Tel: