Displaying 6 results from an estimated 6 matches for "listx".
Did you mean:
list
2011 Aug 02
2
Memory limit in Aggregate()
...two lists here), but get a
memory error.
Here is the code I'm running :
sessionInfo()
print(paste("memory.limit() ", memory.limit()))
print(paste("memory.size() ", memory.size()))
print(paste("memory.size(TRUE) ", memory.size(TRUE)))
print(paste("size listX ", object.size(listX)))
print(paste("size listBy ", object.size(listBy)))
print(paste("length ", object.size(nrow(listX))))
tableAgg <- aggregate(x = listX
, by = listBy
, FUN = "max")
It returns :
R version 2.9.0 Patched (2009-05-09 r48513)
i386-...
2010 Feb 05
1
unique function works funny
I have 3 nested functions, the core function goes like this:
listx<-function(x,tox)
{
xt=table(x)
wa=sort(unique(x,fromLast=FALSE))
print(xt)
print(wa)
......
return(kk)
}
listx get called in functionB, and functionB get called in functionC.
When I test functionB, the listx function works just fine. When I call
functionB from functionC, strange thing hap...
2009 Oct 12
1
Creating object referant from argument name
...nput){
id<-substring(input,3,3)
j<-list1
if(id==2)j<-list2
if(id==3)j<-list3
if(id==4)j<-list4
...}
Instead of all these if() arguments, I was hoping to use something like:
j<-paste("list",substring(input,3,3),sep="")
but this just assigns j the value of "listx" of _character_ mode, instead of
the actual object 'listx'.
Is there any way to get around this?
Thanks.
--
View this message in context: http://www.nabble.com/Creating-object-referant-from-argument-name-tp25861902p25861902.html
Sent from the R help mailing list archive at Nabble.com.
2009 Jan 14
2
coercing a list into matrix
Dear list,
I have a list of number sequences. Each number sequence has different
numbers of elements. Is there a quick way (other than to iterate
through the entire list) way to coerce list to matrix with NAs filling
in the short sequences?
An example of what I mean is this:
A <- list(c(3,2,3),c(6,5))
I'd like to get A so that it is
3 2 3
6 5 NA
Best,
Ken
2009 Jul 16
2
quoting expressions in a list
Dear R-help,
I am having quite a difficult time coming up with what I want to do involving named lists.
I have a list of logical expressions, and I would really like it if the "names" of the components of the list were identical to the corresponding logical expression.
So, as an example:
df.example <- data.frame(a = 1:10, b = rnorm(10, 5))
list.example <- list(df.example$a
2009 Sep 29
3
How do I access class slots from C?
Hi
I'm trying to implement something similar to the following R snippet using
C. I seem to have hit the wall on accessing class slots using C.
library(fPortfolio)
lppData <- 100 * LPP2005.RET[, 1:6]
ewSpec <- portfolioSpec()
nAssets <- ncol(lppData)
setWeights(ewSpec) <- rep(1/nAssets, times = nAssets)
ewPortfolio <- feasiblePortfolio(
data = lppData,
spec = ewSpec,