Re: [R] ifelse on a series of rows for multiple criteria

2010-02-05 Thread Thomas Liebig
Hi Steve, as far as i understood, you're trying to do this: direction_func <- function(combdframe) { ifelse(mean(combdframe==0), -9, sum((sign(mean(combdframe))*combdframe)>0)) } direction<-apply(combdframe, 1, direction_func) direction cheers, thomas --

Re: [R] how to trigger variable creation?

2009-06-12 Thread Thomas Liebig
objects and to compare these lists at each time step. what else could be done? cheers, Thomas Thomas Liebig schrieb: Hello R users, i'm wondering how to trigger variable creation. Whenever a variable is created i want my own function myFun(...) to be started. if (exists("x")

[R] how to trigger variable creation?

2009-06-12 Thread Thomas Liebig
call myFun etc. Has anyone an idea? Unfortunately, this feature is also missing in the library trackObjs. regards, Thomas -- Thomas Liebig Fraunhofer-Institut für Intelligente Analyse- und Informationssysteme (IAIS) Schloss Birlinghoven, D-53754 Sankt Augustin, Germany Email: thomas.lie...@iai

Re: [R] write text file as output without quotes

2009-04-07 Thread Thomas Liebig
,col.names=F,sep="\t", quotes=FALSE) regards, Thomas Liebig Ravi S. Shankar schrieb: Hi R, When I use the below to write the text file try=data.frame(rep("a",5), rep("b",5)) write.table(try,"z:\\try.txt",row.names=F,col.names=F,sep="\t") th

Re: [R] enscript states file for R scripts?

2009-04-06 Thread Thomas Liebig
have been part of a2ps' upstream releases for a long time. Dirk Unfortunately, a2ps doesn't support Unicode (and afaics u2ps does not do indentation...). -- Thomas Liebig Fraunhofer-Institut für Intelligente Analyse- und Informationssysteme (IAIS) Schloss Birlinghoven, D-5