search for: rogard

Displaying 9 results from an estimated 9 matches for "rogard".

Did you mean: regard
2008 Oct 20
2
Extracting variables with a given prefix in the parent environment
hi, get.vars.name.prefix<-function(prefix){ result<-list() len<-nchar(prefix) var.names<-ls(name=1,pattern=prefix) #name=1 probably wrong option print(var.names) for(i in 1:length(var.names)){ name<-var.names[i] field<-substr(name,len+1,nchar(name)) result[[field]]<-get(name) } result } for example x.1<-1 x.2<-2 get.vars.name.prefix("x.") should
2008 Oct 27
3
Arrays of Trellis plots
hello, the example below does not work. (i know it's not supposed, but it makes it clear what i'm trying to achieve) par(mfrow=c(2,1)) xyplot(y~x2|x1,data=dataframe1,pch=20) xyplot(y~x2|x1,data=dataframe2,pch=20) i know i could probably merge the two datasets and do something like xyplot(y~x2|x1+dataset,data=merged) any other suggestion? thanks. [[alternative HTML version deleted]]
2008 Oct 13
1
Trellis, conditioning on more than 2 variables,
hello, i need help with: data$f1<-as.factor(data$f1) data$f2<-as.factor(data$f2) s3<-equal.count(data$s2,number=3) densityplot(~y| f1 + f2 + s3, data=mydata ) this produces 3 plots, *successively*, one for each value of s3. i was hoping it would produce one plot. is trellis limited to 2 conditional variables? if not, what are the appropriate commands? thanks! [[alternative HTML
2008 Mar 21
4
difference between 2 ecdfs
hi, a) i have something like: ecdfgrp1<-ecdf(subset(mydata,TMT_GRP==1)$Y); ecdfgrp2<-ecdf(subset(mydata,TMT_GRP==2)$Y); how can i plot the difference between these 2 step functions? i could begin with ecdfrefl<-function(x){ecdfgrp2(x)-ecdfgrp1(x);} ... what next? b) if i have a vector with repeated numeric values how can i get the subset without repeated values .e.g (0,4,0,2,2)
2008 Mar 27
1
histogram for integer data
hi, library(lattice) x<-c(-1,-1,-1,0,0,0,0,1,1,2) rng<-range(x) histogram(x,endpoints=c(rng[1]-0.5,rng[2]+0.5),nint=length(unique(x))) instead of contiguous bins, i'd like spaces between them to indicate that the data is discrete, or even better, line segments positioned at integer values. i know how to do this with plot, but i need it with histogram, so that in more complicated
2008 Oct 17
1
R-code in Latex --- $ sign causes error
hi, here's what i have: \lstset{ basicstyle=\ttfamily, keywordstyle=\bfseries, showstringspaces=false, columns = fullflexible, mathescape = true, language=R } \begin{lstlisting} lst$val<-val \end{lstlisting} ./software.tex:16:Extra }, or forgotten \endgroup. lst$ the culprit here is the $ sign. thanks. ps: i'm posting here rather than Latex is bec i guess an R user is
2008 Oct 20
1
passing a list where names arguments are expected
hi, say i have a function f and i'd like to to call it like this: 1) f(list(a=...,b=...)) but i can't do it, because f is defined as: 2) f<-function(a=NULL,b=NULL){...} is there a way that i can approximate 1), such as mapping list(a=,...b=...) to "list(a=,...b=...)" and then replacing "list" by "f", and then evaluating the expression? thanks.
2008 Nov 13
2
growing a list sequentially -- memory management
hello, i have something like: out<-list() for(i in 1:n){ data<-gen(...) #fixed size data out[[i]]<- fun(data) } > object.size(out[[1]]) 6824 In principle 1 GB should allow n = 1024^3/6824 = 157347? i have about 2GB are not taken by other processes. however, I can see the memory shrinking quite rapidly on my system monitor and have to stop the simulation after only n=300. why
2008 Jun 03
2
JGR / linux
Hi all, i'm trying to install JGR on linux (see bottom), but it runs into errors. The bottom of the sequence below shows "JavaJD could not be found" Any suggestion, please? $ sudo apt-get install sun-java6-jdk $ sudo update-alternatives --config java There are 5 alternatives which provide `java'. Selection Alternative ----------------------------------------------- 1