Displaying 3 results from an estimated 3 matches for "jyotirmoy".
2010 Feb 14
1
unexpected results with higher-order functions and lapply
...;function() {k}}
> l2 <- lapply(1:2,genr2)
> l2[[1]]()
[1] 1
This gives the answer I expected.
Now I am confused. The function returned by genr2 is exactly the same
function that was being returned by genr1. Why should evaluating k make a
difference?
I am using R 2.9.2 on Ubuntu Linux.
Jyotirmoy Bhattacharya
[[alternative HTML version deleted]]
2010 Feb 19
3
dot-dot-dot as an actual argument
...library(lattice)
f.barchart <- function(...) {
? ? barchart(...)
}
x <- data.frame(a = c(1,1,2,2), b = c(1,2,3,4), d = c(1,2,2,1))
print(f.barchart(a ~ b, data = x, groups = d))
This gives the error:
Error in eval(expr, envir, enclos) :
..3 used in an incorrect context, no ... to look in
Jyotirmoy Bhattacharya
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