Displaying 20 results from an estimated 1000 matches similar to: "dot-dot-dot as an actual argument"
2010 Feb 14
1
unexpected results with higher-order functions and lapply
I want to use lapply and a function returning a function in order to build a
list of functions.
> genr1 <- function(k) {function() {k}}
> l1 <- lapply(1:2,genr1)
> l1[[1]]()
[1] 2
This was unexpected. I had expected the answer to be 1, since that is the
value k should be bound to when genr1 is applied to the first element of
1:2.
By itself genr1 seems to work fine.
>
2010 Feb 16
1
ellipsis-related error: used in an incorrect context, no ... to look in
Hi,
I have the following code snippet:
require(lattice)
f.barchart <- function(...) {
barchart(...,
panel = function(x, y, ...) {
panel.barchart(x, y, ...)
}
)
}
x <- data.frame(a = c(1,1,2,2), b = c(1,2,3,4), c = c(1,2,2,1))
f.barchart(a ~ b, data = x, groups = c)
Which results in the following error being
2010 Mar 10
1
Trouble with plm in Ubuntu 9
Hello,
Apologies in advance if this is a stupid question. I am running R on Ubuntu
9.
R version 2.9.2 (2009-08-24)
I am trying to work with plm. I think the library is installed, as I can do
> library(plm)
Loading required package: kinship
Loading required package: survival
Loading required package: splines
Loading required package: nlme
Loading required package: lattice
[1] "kinship
2005 Jun 07
3
Icecast RTP support
Hi,
Does Icecast has RTP support for streaming OGG/Vorbis and OGG/theora
media files?
If so, then please give me some pointers on how to configure my
Icecast server to listen to RTP requests.
If it's not available, then is the inclusion of this feature, in plans
for future release of the product?
Thanks
--
Subhabrata Bhattacharya
2006 Aug 24
1
Need help with difficulty loading page www.bioconductor.org
The page is either too busy, or there is something seriously wrong with
access to this page.
Most of the time, trying to reach www.bioconductor.org results in
failure. Only once in a
blue moon, do I get through.
In fact, thus far, I have not been able to install bioconductor, since
the first source(...)
command from the R command window -- following instruction on
www.bioconductor.org
page,
2005 Dec 08
3
Finding all possible partitions of N units into k classes
Dear useRs!
I would like to generate a list of all possible (unique) partitions of N
units into k classes. For example, all possible partitions of 4 units into 2
classes are (I hope I have not missed anyone):
1,1,1,2 (this can be read as {1,2,3},{4})
1,1,2,1
1,2,1,1
2,1,1,1
1,1,2,2
1,2,1,2
1,2,2,1
The partitions 1,1,2,2 and 2,2,1,1 are the same and are therefore not two
unique
2009 Oct 10
1
auto.key legend color different from actual plot
Dear All,
I have created a barchart, but the legend created by auto.key does not match
the actual graph. Can someone give me some hint here?
For example, my coding are:
Library(lattice)
dataset.table <-
table(data.frame(id=c("a","b","c","a","c","b","a"),colour=c("blue","green","
2005 Jun 16
2
Icecast and ezstream
Hi,
What is the actual functionality of ezstream when I use it with
Icecast?What does it exactly do?
Why isn't Icecast written to read a file directly and stream it?
--
~$ubh
2012 Mar 23
2
R Error : DATA to MATRIX
Dear Sir/Madam,
I'm getting a problem with a R-code which converts a data frame to a matrix.
It first generate a (m^(n-m) * m) matrix A and then regenerate another
matrix B having less dimension than A which satisfy some condition. Now I
wish to assign each row of B to a vector as individual.
My problem is when I set any choice of (n,m) except m=1 it works fine but
setting m=1 I got the
2003 Nov 02
3
barchart in lattice
Dear all,
I have two factors 'country' and 'status' which I would like to plot via barchart (lattice).
'status' consist of three different levels and should be the grouping variable, i.e. there
should be drawn three different panels and within each panel a barchart of 'country'.
barchart(daten$COUNTRY|daten$STATUS),
2003 May 08
2
border of bars in lattice barchart
Hello!
How to change a color (or linewidth) of
border in lattice 'barchart'?
I am trying
barchart(
(......) - my arguments
panel=function(x,y,color,subscripts,groups,...)
{
panel.barchart(x=x,y=y,box.ratio=2,col=color,border=FALSE)
}))
or
...
panel.barchart(x=x,y=y,box.ratio=2,col=color,border='transparent')
...
or
2006 Jan 25
2
panel function with barchart (lattice)
Folks at R help,
I can't quite get the panel function to work the way I
want within barchart.
I guess I'm still not understanding how to piece
together multiple panel
arguments, especially when "groups" is specified.
Example: I want to be able to add the value of "yield"
to each section of
each bar in this graph:
barchart(yield ~ variety | site, data = barley,
2007 Feb 24
2
barchart (lattice) with text labels
I would like to place the value for each bar in barchart (lattice) at
the top of each bar. Something like the following code produces.
library(lattice)
mypanelfunc <- function(x, y, ...)
{
panel.barchart(x, y, ...)
panel.text(x, y, labels=as.character(round(x,2)), ...)
}
myprepanelfunc <- function(x, y, ...) list(xlim=c(0, max(x)+.1))
mydata <- expand.grid(a=factor(1:5),
2012 Mar 03
2
Grouped barchart confidence intervals in lattice
Hi everyone,
I'm having trouble adding error bars to a grouped barchart in lattice. I know that this topic has been addressed quite a bit, as I've been searching the internet for a while to try to troubleshoot the issue, but I've not been able to find any solution that I could get working on my data. I was wondering if someone could look at my code and tell me what I'm doing
2009 Feb 08
2
Using panel.grid in barchart
Hi all,
I'm trying to do an example in Deepayan Sarkar's Lattice book. It
involves making a barchart based on the Titanic dataset. I can get
the barchart to plot fine; however, when I try to edit panel.grid, I
get an error:
> titan<-barchart(Class ~ Freq | Age + Sex, data =
as.data.frame(Titanic), groups=Survived, stack=TRUE, layout=c(4,1),
2010 Jul 05
4
Data Labels in a barchart (Lattice or otherwise)
Hi,
Can anyone please help me with how I could add labels with the value for
each bar in a barchart? (similar to how data labels can be added in Excel) I
have done a lot of searching but havent been lucky.
Thanks,
Raoul
--
View this message in context: http://r.789695.n4.nabble.com/Data-Labels-in-a-barchart-Lattice-or-otherwise-tp2278027p2278027.html
Sent from the R help mailing list archive at
2008 Sep 16
2
Setting user colors in barchart
Dear R Users,
I have a basis question regarding the use of color in the lattice package. I
read the ?barchart help page and searched the R archives but could not
understand how to do it.
I just need to plot a barchart using specific colors for my groups, e.g.
green and red instead of the default lattice colors. How do I do that?
If I say:
barchart(x ~ a_factor, groups=my_groups,
2005 May 05
6
Need some quick help with lattice - barchart
For the following code below, the x-axis ticks are 1,2,3,4,5,6,7 when I was expection them to be 1,2,8,9,10,11,12. Please help me figure out where is the mistake.
library(lattice)
testdata <- as.data.frame(t(structure(c(
1,2005,9.24,6.18,634,
2,2005,8.65,6.05,96,
8,2004,6.81,6.51,16,
9,2004,9.0,7.29,8,
10,2004,8.84,6.18,524,
11,2004,8.54,6.35,579,
12,2004,9.97,6.3,614,
12,2005,8.75,5.84,32,
2004 Feb 10
3
confidence-intervals in barchart
Hi R users,
1) How does one show confidence-intervals in a barchart and use rownames for
labels on the y-axes? I have looked at "plotCI" in "gregmisc" package . But
it does not seem to produce something like a barchart. The statistic, error,
upper-bound, and lower-bound are in a dataframe.
2) How to show CI in a barchart either using the statistic and, either (a)
2007 Jul 10
1
Lattice: vertical barchart
barchart(Titanic, stack=F) produces a very nice horizontal barchart.
Each panel has four groups of two bars.
barchart(Titanic, stack=F, horizontal=F) doesn't produce the results I
would have expected, as it produces this warning message:
Warning message:
y should be numeric in: bwplot.formula(x = as.formula(form), data =
list(Class = c(1,
And it results in each panel having 22 groups of