Displaying 20 results from an estimated 700 matches similar to: "About error bars on barplots"
2017 Jun 18
0
[FORGED] About error bars on barplots
On 18/06/17 12:10, lily li wrote:
> Hi R users,
>
> I have a question about adding uncertainty bars to stacked bar plots.
>
> DF:
> year A B C Amin Amax Bmin Bmax Cmin Cmax
> 2009 40 45 15 30 61 23 56 14 17
> 2010 36 41 23 26 54 22 51 22 24
>
> I use the code below:
>
>
2012 Mar 27
1
Rgdal package - get information
>
> Hi,
>
> I used
> GDALinfo("MOD13Q1.A2001049.h13v11.005.2007002215512.250m_16_days_EVI.tif") and
> got the results:
>
> rows 10
> columns 11
> bands 1
> origin.x 150701.4
> origin.y 7744897
> res.x 250
> res.y 250
> ysign -1
> oblique.x 0
> oblique.y 0
> driver GTiff
>
2011 Oct 24
1
nonlinear model
Hello,
I am trying to do a nonlinear model using the "nls" command in R software.
The data I am using is as follows:
A<-c(7.132000,8.668667,9.880667,8.168000,10.863333,10.381333,11.059333,7.589333,4.716667,4.268667,7.265333,10.309333,8.456667,13.359333,8.624000,13.571333,12.523333,4.084667
,NaN,NaN)
2009 Mar 12
3
avoiding termination of nls given convergence failure
Hello. I have a script in which I repeatedly fit a nonlinear regression to
a series of data sets using nls and the port algorithm from within a loop.
The general structure of the loop is:
for(i in 1:n){
… extract relevant vectors of dependent and independent variables …
… estimate starting values for Amax and Q.LCP…
2024 Feb 05
1
ggarrange & legend
I'm sorry but that is not a working example.
A working example needs to create the plots being used.
For example, stealing some code from
https://rpkgs.datanovia.com/ggpubr/reference/ggarrange.html
#=================================================================
data <https://rdrr.io/r/utils/data.html>("ToothGrowth")df <-
ToothGrowthdf$dose <- as.factor
2024 Feb 05
2
ggarrange & legend
Dear John Kane
Dear R community
Here my working example
1. Example that is working with legend=?top?. However, as mentioned, the legend is in the middle of the top axis.
mylist<-list(p1, p2)
dev.new(width=28, height=18)
fig1<- ggarrange(plotlist=mylist, common.legend = TRUE, legend="top", labels = c("(A)", "(B)"), font.label = list(size = 18, color =
2011 Apr 07
1
df with max function applied to 6 lags of a variable?!?
Hello everyone!
I have a data frame of 136 variables with 270 observations. I would like to create a new data frame such that each element of that data frame contains the maximum value of the 6 prior lags of the initial data frame. So for example, if my original data frame, A, were
A1=c(7.72, 7.94, 7.56, 7.54, 0.93, 0.59, 7.21, 8.00, 7.19, 7.57)A2=c(4.27, 3.70, 3.80, 3.67, 3.83, 3.95, 4.02, 2.06,
2013 Jan 28
1
Adding 95% contours around scatterplot points with ggplot2
Hi all,
I have been looking for means of add a contour around some points in a
scatterplot as a means of representing the center of density for of the
data. I'm imagining something like a 95% confidence estimate drawn around
the data.
So far I have found some code for drawing polygons around the data. These
look nice, but in some cases the polygons are strongly influenced by
outlying points.
2014 Jun 13
2
no x label using axis.Date
I have tried multiple different methods to figure out how to get a date axis
of my preference (start date of each month). Any assistance would be
appreciated.
The below section is not producing a date axis:
plot(totaldays$totaldays,totaldays$y,type="n",ylim=c(0,Emax),xaxt="n")
*xlabels<-(strptime(totaldays$totaldays,"%Y-%m-%d",tz=""))
2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks,
I'm surprised, but I didn't find this question addressed anywhere. I'd
like to generate a LaTeX caption with R code. I've tried the code
below, but I get the following TeX error:
! Argument of \@caption has an extra }.
<inserted text>
\par
l.21 }
Any thoughts? Perhaps I'll have to write the "\caption{}" text with R?
thanks!
2007 Oct 24
4
X11 graphics windows under CMD BATCH
Hi there,
I am trying to plot some output from a FORTRAN (ifort) program using
R (2.5.1) under batch mode. In the FORTRAN code, I call R in batch
mode to execute a script called fig1.R using something like
PROGRAM test
USE IFPORT
IMPLICIT NONE
DO
!Some function which makes an output file called ~/fortran_output.txt
CALL myfunc()
!System call to R plotting routine
CALL SYSTEM
2017 Aug 25
2
about multi-optimal points
Hi R users,
I have some sets of variables and put them into one dataframe, like in the
following. How to choose a specific set of pareto front, such as 10 from
the current datasets (which contains more than 100 sets)? And how to show
the 10 points on one figure with different colors? I can put all the points
on one figure though, and have the code below. I drew two ggplots to show
their
2012 Dec 02
1
Problem with figures
I am having problem making ggplot2, tikzDevice, and knitr working together.
I used a very simple example:
---------------------------example.Rnw-----------------------------
\documentclass[preview]{standalone}
\begin{document}
\begin{figure}
<<fig1,eval=TRUE,echo=FALSE,dev='tikz'>>=
library(ggplot2)
qplot(displ, hwy, data = mpg, colour = factor(cyl))
@
\end{figure}
2004 Dec 06
2
Blank eps output files
Dear all,
The following commands results in a blank graph file,
postscript(file = "C:/Temp/Fig1.eps", height=4.0, width=4.0,
horizontal = FALSE, onefile = FALSE, paper = "special")
x11(height=3,width=3)
par(mar=.1+c(4.5,4.5,0,0))
x <- c(10,20,30)
y <- c(5, 7, 9)
plot (x,y)
dev.off()
The codes function normally without any error in the command window.
However, the
2017 Aug 26
0
about multi-optimal points
HI lily,
for the colouring of individual points you can set the colour aesthetic.
The ID is numeric so ggplot applies a colour scale. If we cast ID to a
factor we get the appropriate colouring.
test_df <- data.frame(ID = 1:20, v1 = rnorm(20), v2 = rnorm(20), v3 =
rnorm(20))
ggplot(data=test_df, aes(x=v1,y=v2, colour = as.factor(ID))) +
geom_point()+ theme_bw()+
xlab('Variable 1')+
2004 Feb 19
1
controlling nls errors
Hello. I am using the nonlinear least squares function (nls). The
function that I am trying to fit seems to be very sensitive to the
starting values and, if these are not chosen properly, the nls function
stops and gives an error message:
Error in numericDeriv(form[[3]], names(ind), env) :
Missing value or an Infinity produced when evaluating the model
In addition: Warning
2011 Mar 08
4
minimum distance between line segments
Dear R helpers,
I think that this may be a bit of a math question as the more I
consider it, the harder it seems. I am trying to come up with a way to
work out the minimum distance between line segments. For instance,
consider 20 random line segments:
x1 <- runif(20)
y1 <- runif(20)
x2 <- runif(20)
y2 <- runif(20)
plot(x1, y1, type = "n")
segments(x1, y1, x2, y2)
2011 May 06
1
Sweave: no eps fig
Hi everyone,
I'm using R, Latex and Sweave for some years now, but today it confuses me alot:
Running Sweave produces only figures in .pdf format, no .eps figures.
The header looks like this:
<<echo=TRUE, fig=TRUE, label=Fig1>>=
There was no error message.
Does anybody have an idea?
Any changes in the Sweave-package?
Or a missing driver or something like that?
I recently
2000 Feb 14
2
par(fig) problem
hello R-users,
I'd like to plot four graphics on the same page but with different
sizes. I've tried to use :
par(fig=c(0,0.5,0,0.6))
plot(fig1)
par(fig=c(0.5,1,0,0.6))
plot(fig2)
etc...
but when a figure is plotted, it erase the previous.
I've tried to pass 'new=T' to plot function but it's not possible.
What can I do ? is it a bug ?
I've already reported this a 2 or
2013 Jan 17
0
help with error: DV "converted to a factor"
I've spent several days compiling the following code (I apologize in advance
- this code is very inelegant, and I'm sure could be written much more
efficiently, but I've stuck with whatever method I could get to work -
sometimes the more efficient code I just couldn't get to work without an
error, because of my R inexperience).
My main motivation for writing the code is that