Displaying 20 results from an estimated 10000 matches similar to: "Bug in boxplot(..., add=TRUE) ?"
2003 Mar 17
4
X11 connection error in web cgi mode only
Dear all,
I am trying to create a web interface using Perl-CGI to call R plots and
to display them.
The following codes works perfectly fine when I copy and paste into the
console directly or if I save it into script.file and then R --no-save <
script.file producing the graphs.
jpeg("graph.jpeg", width=400, height=400)
plot(rnorm(100))
dev.off()
Now, I put the line system("R
2013 Jun 27
1
'modifyList' drops (not adds) NULL components
Dear list,
Utils::modifyList() drops NULL components in its second argument, instead of adding them to the first argument. Compare:
> modifyList(x=list(A=1), val=list(B=2, C=3))
$A
[1] 1
$B
[1] 2
$C
[1] 3
> modifyList(x=list(A=1), val=list(B=NULL, C=3))
$A
[1] 1
$C
[1] 3
To me this seems inconsistent with the documentation ("Elements in 'val' which are missing from
2003 Jul 21
2
Bug in file.copy: overwrite=FALSE ignored (PR#3529)
I am using R 1.7.1 on Windows XP Pro.
The 'overwrite=FALSE' argument appears to be ignored in
file.copy():
> file.exists(c("file1.txt", "file2.txt"))
[1] TRUE TRUE
> file.copy(from="file2.txt", to="file1.txt", overwrite=FALSE)
[1] TRUE
>
and sure enough, file1.txt has been overwritten.
Rich Raubertas
Biometrics Research, RY33-300
Merck
2003 Aug 15
6
plot.lm mislabels points with na.exclude (PR#3750)
R 1.7.1 on Windows XP
The "normal Q-Q plot" produced by plot.lm() mislabels points
when the model is fitted using na.action=na.exclude. Example:
x <- 1:50
y <- x + rnorm(50)
y[c(5,10,15)] <- NA # insert some NA's
y[40] <- 50 # add an outlier
plot(lm(y ~ x, na.action=na.omit)) # outlier correctly labeled in all
# four plots
2002 Apr 23
2
Bug in read.table() (PR#1477)
The following command,
temp <- read.table("c:/rfr/r/test.txt")
reads the text file "test.txt", which contains the following lines:
21437
21438
21419-2
21420-2
21421-2
21422-2
and produces the following result:
> temp
V1
1 21437+0i
2 21438+0i
3 0+0i
4 0+0i
5 0+0i
6 0+0i
>
These "numbers" are actually sample ID's, and I
2012 Mar 12
2
How to create interrupted boxplot
Hello,
I have created two boxplots with following R code. There is one outlier in
B group.
The outlier is 33. But the all other data are between 0 to 4.
How can I skip y-axis around 5 to 25, and expand 0-4 for this case. Also I
want keep the outlier in my boxplot.
I want my boxplot look like the second one, keep the outlier, and make an
interrupt of y-axis from 5 to 25.
Thanks,
Jianghong
2001 Dec 10
1
boxplot labels incorrect when horizontal = TRUE (PR#1207)
#Example:
y <- rnorm(10)
group <- gl(2,5)
plot(y ~ group, horizontal = TRUE) # BUG: default xlab & ylab interchanged
plot(y ~ group, horizontal = FALSE) # OK: supplies correct default xlab & ylab
# Using boxplot() instead of plot() omits default axis labels altogether
# (not sure if this is intentional):
boxplot(y ~ group, horizontal = FALSE) # no default axis labels supplied
2006 Oct 05
1
unexpected behavior of boxplot(x, notch=TRUE, log="y")
A function I've been using for a while returned a surprising [to me,
given the data] error recently:
Error in plot.window(xlim, ylim, log, asp, ...) :
Logarithmic axis must have positive limits
After some digging I realized what was going on:
x <- c(10460.97, 10808.67, 29499.98, 1, 35818.62, 48535.59, 1, 1,
42512.1, 1627.39, 1, 7571.06, 21479.69, 25, 1, 16143.85, 12736.96,
2002 Sep 17
2
legend in image()
System info:
Linux slackware
R Version 1.5.1 (2002-06-17)
ESS 5.1.21
Emacs 21.2.1
-------------------
Colleagues
Is there a way to add a legend to an image plot? I don't see any
reference to legends in the documentation (so I suppose the answer is
no?). Although the documentation says image takes plot() parameters, it
isn't clear to me how the usual use of legend in a plot command
2003 Mar 12
1
cex.axis in boxplot (PR#2628)
Hi,
the graphical parameter "cex.axis" does not have any affect for "boxplot":
data(iris)
boxplot(iris[,1:4], ylab="y", cex.lab=2, cex.axis=2)
The patch is simply adding "cex.axis" to the search for axis relevant
parameters in "bxp":
ax.pars <- pars[names(pars) %in% c("xaxt", "yaxt", "las",
2012 Jun 22
2
Boxplot with Log10 and base-exponent axis
Dear all,
I would like to (i) produce boxplot graphs with axis in logarithm in base 10
and (ii) showing the values on the axis in 10^exponent format rather than
10E+exponent.
To illustrate with an example, I have some widely spread data that I chart
plot using boxplot() [figure on the left]; the log="y" option of boxplot()
I obtained the natural logarithm conversion of the data and
2003 Mar 05
8
how to find the location of the first TRUE of a logical vector
without having to check the vector element by element? Thanks a lot!
Jason
=====
Jason G. Liao, Ph.D.
Division of Biometrics
University of Medicine and Dentistry of New Jersey
335 George Street, Suite 2200
New Brunswick, NJ 08903-2688
phone (732) 235-8611, fax (732) 235-9777
http://www.geocities.com/jg_liao
2012 Sep 24
3
boxplot of different colors
Hello,
I am making a boxplot of 13 boxes.
I tried to color the box using 13 colors but failed.
Only red and brown were displayed.
Green, blue, and grey disappeared.
Please kindly advise modification after checking the code below.
Thank you in advance.
Elaine
R code
# data input
dataN
<-read.csv("H:/a_mig_distance_B_NB/R_data/Mig_bird_586_20120925.csv",header=T,
row.names=1)
2013 Mar 29
2
changing y-axis intervals in a boxplot
Dear R-users,
I'm a bit of a rooky in R and do not know how to change the y-axis intervals of a boxplot.
The y-axis in my boxplot ranges from 0 to 100 which is fine. The problem is the interval level in between. Now it increases with steps of 20 but I'd like to have it changed by steps of 5.
Anyone knows how to do this in R?
I used the following code for producing this boxplot:
2001 Jul 27
2
boxplot question
I'm graphing a series of boxplots of grouped data inside a function that
passes the data.frame, the names vector, and a title vector.
Because both the data subset changes with each successive pass through the
function, occasionally the names vector turns up with only one group to
plot. This is an expected result. However, when the names argument in
boxplot has only a single name, it
2010 Jan 02
2
Boxplot- input the median point and the median value
Dear,
I am a newbie to R.
Now I am learning to draw boxplot using graphics().
I want to highlight the median position
with a round point and the value left (or on the top of)to the point.
Please kindly share the command and thank you.
Elaine
[[alternative HTML version deleted]]
2007 Oct 15
4
boxplot() confuses x- and y-axes (PR#10345)
Full_Name: Bob O'Hara
Version: 2.6.0
OS: Windows XP
Submission from: (NULL) (88.112.20.250)
Using horizontal=TRUE with boxplot() confuses it as to what is an x- or y-axis.
At least, xlim= and ylim= are the wrong way round, log="x" (or "y") and xaxt=
work as expected, I haven't looked at anything else.
Some code to see if you can reproduce the bug (or discover
2018 Sep 11
1
var() with 0-length vector -- docs inconsistent with result
R 3.5.1 on Windows 7
The documentation for 'var' says: "These functions return 'NA' when there is only one observation (whereas S-PLUS has been returning 'NaN'), and fail if 'x' has length zero." The function 'sd' (based on 'var') has similar documentation.
However, I get:
var(numeric(0))
[1] NA
rather than an error.
Personally I
2002 Dec 30
2
Writing packages with `methods' package
I'm trying to write a package which uses classes/methods as defined in the
`methods' package. I have a single .R file which defines the class and
various methods for that class. At the top of the file I have
require(methods)
and then
setClass("myclass", ...)
setGeneric("intersect")
setMethod("intersect", "myclass", function(x,y) ...)
I noticed
2003 Jan 15
2
Contour Plots
r-help,
I can't seem to get the below data organized in such a manner so as to
generate a contour plot
using any of the functions {lattice.contourplot, base.contour,
base.filled.contour}. I was wondering
if anyone could please tell me what I need to do to accomplish this.
X,Y,Level
-31.105,86.911,3843
-3.385,86.911,3896
24.335,86.911,3874
-24.175,79.700,3900
-3.385,79.700,3927