This in an enhancement requestion, to add the capability to pass
arguments through barplot() to legend(). I've created a version that
does this.
# Run this code; notice that the legend
# is superposed over one bar:
barplot(height =
cbind(x = c(465,91) / 465 * 100,
y = c(840,
> d <- data.frame(x=1:3, y=2:4)
> d[["r"]] <- d[1]/d[2]
> d
x y x
1 1 2 0.500
2 2 3 0.667
3 3 4 0.750
It appears that the name "x" was given
instead of "r". That is not correct:
> names(d)
[1] "x" "y" "r"
> showStructure(d) # from package splus2R
list[3,3] S3 class: data.f
If save() fails because an object is not found,
it should not overwrite an existing file.
> a <- 1:9
> save(a, file = "a.rda")
> rm(a)
> load("a.rda")
> a
[1] 1 2 3 4 5 6 7 8 9
> rm(a)
> save(a, file = "a.rda")
Error in save(a, file = "a.rda") : object 'a' not found
> load("a.rda")
Error
Suppose that a package "foo" contains a tests directory with a number
of *.R files. Currently, each of the .R files must begin with
library("foo")
or the library is not loaded.
I suggest that the package be loaded automatically (at the beginning
of each file, or before any of the files are ru
Here are three different scenarios in which the browser() exits
when I don't want it to. These are all related to the browser
accepting either c or (return) to exit. I would like an option
to turn off the (return) behavior in order to avoid these problems.
# Case 1 - when calling help
# Note,
I would like a way to modify the behavior of browser(), so that
entering a blank line does nothing rather than being equivalent to "c".
I'm running R using emacs ESS.
I often debug functions by inserting a browser, and stepping through
one line at a time, sending a line at a time from a buffer wit