[R] Autogenerate tags in tag=value pairs for

2007-03-06 Thread Jon Olav Vik
Dear list,

Is there a way to programmatically specify tag names for the ... (ellipsis) 
part of the argument list to a function? In other words, a way to do this:

x <- data.frame(A=1:5)

if the name "A" was not hardcoded but given by a variable, and without 
resorting to:

x <- data.frame(1:5)
names(x) <- "A"


A longer example describing my actual problem follows. Thanks in advance for 
any help.

Best regards,
Jon Olav


I want to use function transformBy() in package doBy. The key is that the "... 
Further arguments of the form tag=value" require "tag" to be specified, 
otherwise the output does not include the results of my groupwise calculations.

Quoting the documentation:
" transformBy(doBy)
" Function to make groupwise transformations of data 
" by applying the transform function to subsets of data. 
" 
" Usage
" transformBy(formula, data, ...)
" 
" Arguments
" formula A formula with only a right hand side, see examples below 
" data A data frame 
" ... Further arguments of the form tag=value 

### example ###

# a function to replace NAs with the last non-NA value from above 
filldown <- function(x) {
notna <- !is.na(x) # elements with values
ix <- cumsum(notna) # index to previous element (but zeros where we need NA)
ix[ix==0] <- NA # use [NA] as index to produce NA in output
return(x[notna][ix]) # for each: return previous value if found, else NA
}
# illustration of how it works
tmp <- c(NA,NA,1,NA,3,NA,NA)
cbind(tmp,filldown(tmp))

# I now want to apply filldown() to subsets of a data frame
# and I want it to work on several columns

# generate a data frame for illustration, 
# with a few non-NA values scattered round
set.seed(5) # repeatable example
x <- data.frame(id = rep(1:4,each=6), v1=NA, v2=NA)
ix <- which(runif(nrow(x))>0.75)
x[ix,2] <- rpois(length(ix),5)
ix <- which(runif(nrow(x))>0.75)
x[ix,3] <- rpois(length(ix),5)
x

library(doBy)
# the hard way -- works as required, 
# but I would like not having to hardcode column names v1 etc.
transformBy(~id,data=x,v1.fd = filldown(v1),v2.fd = filldown(v2))

# does not work because
# output includes only columns explicitly mentioned in the ... argument
transformBy(~id,data=x,function(y) lapply(y,filldown))

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Generic distributions

2007-03-06 Thread Matthias Kohl
Hello Alberto, hello Greg,

in distr you can do:

library(distr)
N <- Norm(mean = 1, sd = 2)
p(N)(0.5)
r(N)(100)

!!! not: p(N, 0.5) or r(N, 100) !!!
A detailed description of package "distr" is given in package "distrDoc".

library(distrDoc)
vignette("distr")

hth
Matthias



- original message 

Subject: Re: [R] Generic distributions
Sent: Tue, 06 Mar 2007
From: Greg Snow<[EMAIL PROTECTED]>

> I think the distr package does this.  There are also packages that link
> to winbugs if that is what you really want to do.
> 
> -- 
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> [EMAIL PROTECTED]
> (801) 408-8111
>  
>  
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> > Alberto Monteiro
> > Sent: Tuesday, March 06, 2007 1:38 PM
> > To: r-help@stat.math.ethz.ch
> > Subject: [R] Generic distributions
> > 
> > Is there any class that generalizes distributions?
> > 
> > For example, I could say
> > x <- generic_distribution("normal", list(mean=1, sigma=0.5)) 
> > and then use it like rgeneric_distribution(100, x) to get a 
> > sample of 100, or pgeneric_distribution(0.5, x) to get the 
> > pdf at (x = 0.5).
> > 
> > In the openbugs/winbugs package, that uses a language that 
> > looks like R/S, we can do things like x ~ dnorm(mu, tau), 
> > forget that x is a normal with mean mu and variance 1/tau, 
> > and then treat it generically.
> > 
> > Alberto Monteiro
> > 
> > PS: this is noise... but due to spam invasion, anything that 
> > increases the nonspam/spam ratio should be welcome :-)
> > 
> > __
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide 
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

--- original message end 

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Waiting for Key input

2007-03-06 Thread Petr Klasterecky
?browser
?readline

Petr

Saptarshi Guha napsal(a):
> Hi,
>   I have another question. Is there any command that waits for key input?
>   I am running R on OS X, so getGraphicsEvents doesn't work.
>   I have put some debug print messages in a function and would like to  
> pause the code every time the message is printed and continue on a  
> keypress.
> 
>   Thank you
>   Saptarshi
> 
> Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

-- 
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Sweave issue: quotes in verbatim-like output print incorrectly

2007-03-06 Thread Peter Dunn
Hi all

I love Sweave; use it all the time.

But I recently received a new computer, and ever since I
have had a problem I've never seen before.

For example, I place the following in my Snw file:

<<>>=
sms <- 
read.table("http://www.sci.usq.edu.au/staff/dunn/Datasets/applications/popular/smsspeed.dat";,
header=TRUE)
attach(sms)

sms.lm <- lm( Time ~ Age*Phone, subset=(Age>30) )
summary(sms.lm)
@

Standard stuff.   The output appears in the corresponding LaTeX
file as it should, in a verbatim-like environment as it should. 

But since I have had this new machine, this line of output:

Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

appears in my resulting pdf document as

Signif. codes: 0 ^a˘A¨Y***^a˘A´Z0.001 ^a˘A¨Y**^a˘A´Z0.01 ^a˘A¨Y*^a
˘A´Z0.05 ^a˘A¨Y.^a˘A´Z0.1 ^a˘A¨Y^a˘A´Z1

In short, every quote is replaced by garbage.  This makes my
output looks incredibly bad.  (This is true for all cases; the above
is the output from my example.)

I also imagine (hope!) there is a very simple fix.  Can anyone help me?

Documents which used to produce the correct output document
now do this, so it must be something to do with my machine 
set up, or R set up, rather than the documents themselves, I guess.

Any help appreciated.  I have no idea where to look for the solution
(the FAQ. manuals and mailing archives were no help that I could see;
happy to be corrected).

P.


> version
   _
platform   i486-pc-linux-gnu
arch   i486
os linux-gnu
system i486, linux-gnu
status Patched
major  2
minor  4.0
year   2006
month  11
day25
svn rev39997
language   R
version.string R version 2.4.0 Patched (2006-11-25 r39997)

> sessionInfo()
R version 2.4.0 Patched (2006-11-25 r39997)
i486-pc-linux-gnu

locale:
LC_CTYPE=en_AU.UTF-8;LC_NUMERIC=C;LC_TIME=en_AU.UTF-8;LC_COLLATE=en_AU.UTF-8;LC_MONETARY=en_AU.UTF-8;LC_MESSAGES=en_AU.UTF-8;LC_PAPER=en_AU.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_AU.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] "stats" "graphics"  "grDevices" "utils" "datasets"  "methods"
[7] "base"

-- 
Dr Peter Dunn  |  dunn  usq.edu.au
Faculty of Sciences, USQ; http://www.sci.usq.edu.au/staff/dunn
Aust. Centre for Sustainable Catchments: www.usq.edu.au/acsc

This email (including any attached files) is confidential an...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Sigmoidal Fitting

2007-03-06 Thread Cressoni, Massimo \(NIH/NHLBI\) [F]

I want to thank professor Tura for his help but the function in some cases 
fails to converge and I am not able to
understand the reason :

> GAS
[1] 0.8108649 1.0386906 1.1638837 2.4144286
> PRESSURE
[1]  0  5 15 45
>  model.1 <- nls(GAS_PER_G ~ SSlogis(PRESSURE, ASym, xmid, scal))
 
 model.1 <- nls(GAS_PER_G ~ SSlogis(PRESSURE, ASym, xmid, scal))
Error in nls(y ~ 1/(1 + exp((xmid - x)/scal)), data = xy, start = list(xmid = 
aux[1],  : 
step factor 0.000488281 reduced below 'minFactor' of 0.000976562
> 

Massimo Cressoni

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Memory Limits in Ubuntu Linux

2007-03-06 Thread Dirk Eddelbuettel

On 6 March 2007 at 12:43, [EMAIL PROTECTED] wrote:
| I am an R user trying to get around the 2Gig memory limit in Windows, so 

The real limit on 32bit systems is a 3gb address space. R under Windows can
get there, see the R-Windows FAQ.

| here I am days later with a working Ubuntu, and R under Ubuntu. But - the 
| memory problems seem worse than ever. R code that worked under 
| windows fails, unable to allocate memory.

Well, maybe you had virtual memory enabled under Windows but not under
Ubuntu. Or maybe you had other memory-hungry applications up under Ubuntu.

There is only so much magic the OS can do.  You easiest remedy will be to
upgrade to 4gb.  And even 8gb can useful on 32bit system, despite the fact
that each individual address space can only max out at 3gb, as you may have
multi-core / multi-cpu systems that allow you to multitask better.  
 
| Which way to go?
| 
| 1) Try to install 64-bit version for bigger address space. Would this help?

Yes, but you'd probably would have to buy more ram to. The main advantage is
that your limit is now way above the 3gb -- and probably set by your hardware
or budget. Maybe it is as high as 16gb.

But again, on the _same_ box with the _same_ amount of ram that is already
constrained under 32bit, you will not see any improvement.  Rather the
opposite as the basic building block is now 8 bytes instead of 4, you will
need more memory for the same tasks.  No free lunch, as they say.

| 2) Recompile R to get bigger memory capability?

Nope. It's what you give your OS in terms of RAM what's binding here.

| 3) Any other suggestions? 

Different algorithms or approaches, tricks like the data.frame-in-sqlite or
biglm, ...

Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
  -- Thomas A. Edison

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Marc Schwartz
On Tue, 2007-03-06 at 12:36 -0600, Douglas Bates wrote:
> On 3/6/07, Peter Dalgaard <[EMAIL PROTECTED]> wrote:
> > Bert Gunter wrote:
> > > Folks:
> > >
> > > In the past 2 days I have seen a large increase of  spam getting into
> > > R-help. Are others experiencing this problem? If so, has there been some
> > > change to the spam filters on the R-servers? If not, is the problem on my
> > > end?
> > >
> > > Feel free to reply privately.
> > >
> > Martin Maechler is still walking about upside-down after the DSC, slated
> > to return on March 8 (plus presumably a day or two to recover from the
> > flight...).
> 
> Actually he is walking around sideways at present.  He's in Dubai, not
> New Zealand.

LOLand hopefully having a great time.

It is at times like these, as Uwe noted, where it becomes clear the
extent and results of Martin's efforts in filtering this stuff from the
lists.

Martin deserves a hearty "Well Done!" for managing this great resource
in a superior fashion.

Regards,

Marc

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R plug in for Eclipse

2007-03-06 Thread Harry Ho
Hi Dominik,

Yes, I am currently running

Version: 3.2.2
Build id: M20070212-1330


>From: "Dominik Holenstein" <[EMAIL PROTECTED]>
>To: "Harry Ho" <[EMAIL PROTECTED]>
>Subject: Re: [R] R plug in for Eclipse
>Date: Tue, 6 Mar 2007 23:00:29 +0100
>
>Hi,
>Are you using Eclipse 3.2?
>
>semanticum
>
>2007/3/6, Harry Ho <[EMAIL PROTECTED]>:
>>Hello,
>>
>>Is there any R plug-in available for Eclipse other than StatET?
>>
>>StatET doesn't seem to work with the latest release of Eclipse properly,
>>i.e. syntax highlighting isn't enabled for R commands. I already contacted
>>the author some time ago, but have not yet received a response.
>>
>>Would also be great if somebody could tell me whether they have the same
>>problem. I already tried installing it on two different machines so I 
>>guess
>>it isn't a local problem, but you never know...
>>
>>
>>Thx a lot
>>
>>_
>>Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit
>>Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu!
>>
>>__
>>R-help@stat.math.ethz.ch mailing list
>>https://stat.ethz.ch/mailman/listinfo/r-help
>>PLEASE do read the posting guide 
>>http://www.R-project.org/posting-guide.html
>>and provide commented, minimal, self-contained, reproducible code.
>>

_
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit 
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu!

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Estimating parameters of 2 phase Coxian using optim

2007-03-06 Thread Gad Abraham
Andy Fugard wrote:
> Hi There,
> 
> Perhaps the problem is the line
> 
>  loglik<-log(p %*% expm(Q * y(i)) %*% q)
> 
> You mention that y is a vector but here you're treating it as a  
> function.  Maybe try
> 
>  loglik<-log(p %*% expm(Q * y[i]) %*% q)
> 
> ?
> 
> Don't have a clue about the correctness of the contents of cox2.lik...
> 
> Andy
> 
> 
> On 6 Mar 2007, at 08:54, Laura Hill wrote:
> 
>> Hi,
>>
>> My name is Laura. I'm a PhD student at Queen's University Belfast  
>> and have
>> just started learning R. I was wondering if somebody could help me  
>> to see
>> where I am going wrong in my code for estimating the parameters  
>> [mu1, mu2,
>> lambda1] of a 2-phase Coxian Distribution.
>>
>> cox2.lik<-function(theta, y){
>> mu1<-theta[1]
>>
>> mu2<-theta[2]
>>
>> lambda1<-theta[3]
>>
>> p<-Matrix(c(1, 0), nrow=1, ncol=2)
>>
>> Q<-Matrix(c(-(lambda1 + mu1), 0, lambda1, -mu2), nrow=2, ncol=2)
>>
>> q<-Matrix(c(mu1, mu2), nrow=2, ncol=1)
>>
>> for (i in 1:length(y)){
>> loglik<-log(p %*% expm(Q * y(i)) %*% q)
>> return(loglik)}
>>
>> sumloglik<-sum(loglik)
>>
>> return(-sumloglik)
>> }

Just to add my 2 AU cents regarding the for loop:

You're trying to create a vector of log likelihoods to sum up later, but 
that's not what's happening there. Instead, assign an empty vector of 
same length as y, then assign the loglik from each iteration to a 
different cell.

Lastly, there's no need to return anything from a for loop, it's not a 
function.

HTH,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
The University of Melbourne
Parkville 3010, Victoria, Australia
email: [EMAIL PROTECTED]
web: http://www.ms.unimelb.edu.au/~gabraham

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Question

2007-03-06 Thread Michael Kubovy
> How can I evaluate two or more expressions to return two or more  
> columns?
>
> eval(expression(with(bd,Var1*100),with(bd,Var2*200)))
>
> The execution is always for the last expression. I can't execute  
> the two expressions at the same time. It is possible?

How about something like this

with(bd, c(Var1 * 100, Var2 * 200))
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
 McCormick RoadCharlottesville, VA 22903
Office:B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Waiting for Key input

2007-03-06 Thread Saptarshi Guha
Hi,
I have another question. Is there any command that waits for key input?
I am running R on OS X, so getGraphicsEvents doesn't work.
I have put some debug print messages in a function and would like to  
pause the code every time the message is printed and continue on a  
keypress.

Thank you
Saptarshi

Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and SAS proc format

2007-03-06 Thread Jason Barnhart

- Original Message - 
From: "John Kane" <[EMAIL PROTECTED]>
To: "lamack lamack" <[EMAIL PROTECTED]>; 
Sent: Tuesday, March 06, 2007 2:13 PM
Subject: Re: [R] R and SAS proc format


>
> --- lamack lamack <[EMAIL PROTECTED]> wrote:
>
>> Dear all, Is there an R equivalent to SAS's proc
>> format?
>
> What does the SAS PROC FORMAT do?

It formats or reformats data in the SAS system.

It looks this:

proc format; value kanefmt 1='A' 2='B' 3='C' 4='X' 5='Throw me 
out';
data temp; do i=1 to 10; kanevar=put(i,kanefmt.); output; end;
proc print; run;

And produces this:

Obs i  kanevar
  1 1A
  2 2B
  3 3C
  4 4X
  5 5Throw me out
  6 6   6
  7 7   7
  8 8   8
  9 9   9
 1010  10


But it is more robust than what is shown here.



>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Stangle and annotate

2007-03-06 Thread Duncan Murdoch
On 3/6/2007 5:20 PM, Brett Presnell wrote:
> How exactly should I go about turning off annotation when running
> Stangle (Rtangle) with "R CMD Stangle myfile.Rnw"?
> 
> Ideally I would like to be able to turn annotation off and on for
> individual code chunks, or maybe better, to annotate only named
> chunks.  Are either of these things easily done?
> 
> Is there some way to figure out this sort of thing without reading
> through the source code in Sweave.R?

I don't think R CMD Stangle has a way to pay attention to optional args 
to Stangle, but this works:

echo "Stangle('myfile.Rnw', annotate=F)" | Rterm --slave

Duncan Murdoch

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Substituting functions in package - Lattice

2007-03-06 Thread Saptarshi Guha
Hi,
Got it. This worked
environment(print.trellis) <- getNamespace("lattice")
where print.trellis is my modified print.trellis.

Thanks.
Regards
Saptarshi

Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha

On Mar 6, 2007, at 5:29 PM, Greg Snow wrote:

> You need to set the environment on your version of print.trellis to
> match that of the original (at least that is what has worked for me  
> when
> trying to do modified functions from the trellis package).  Try
> something like:
>
>> environment(print.trellis) <- environment(lattice::print.trellis)
>
> Hope this helps,
>
> -- 
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> [EMAIL PROTECTED]
> (801) 408-8111
>
>
>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Saptarshi Guha
>> Sent: Tuesday, March 06, 2007 2:55 PM
>> To: R-Help
>> Subject: [R] Substituting functions in package - Lattice
>>
>> Hi,
>>  I'm trying to learn how a package works but
>> substituting a parituclart function with my own (basically
>> the original one with some debug statements).
>>  The package is lattice and the method is
>> "print.trellis" which is a
>> S3 method and is not visible.
>>  To replace this, i sourced a file with the rewritten
>> print.trellis, and the old one was replaced.
>>  However, i get this error when I attempt to print a
>> trellis object (e.g an xyplot)
>>  
>>  Error in assign("last.object", x, env = .LatticeEnv) :
>>  object ".LatticeEnv" not found
>>  
>>  I notice that .LatticeEnv is defined in zzz.R (in the R
>> folder of the lattice source).
>>
>>  My question, how does one do development on the lattice
>> package without having to recompile everything and install a package?
>>
>>  I read something about emacs and development (i use
>> emacs) in the zzz.R file
>>  "## .First.lib will be used if the NAMESPACE file is
>> missing.  This is ## useful during development, thanks to C-c
>> C-l in Emacs/ESS. It won't ## be used if a NAMESPACE file is
>> present.  Note: Due to registration ## of C functions done in
>> the NAMESPACE file, wireframe (and possibly ## cloud) won't
>> work in this scenario."
>>
>>  But couldn't quite figure it out.
>>  Thanks for any help provided.
>>  Saptarshi
>>
>>
>> Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha
>>
>>
>>  [[alternative HTML version deleted]]
>>
>> __
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting- 
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] qr decomposition issue inside lm (solved)

2007-03-06 Thread Horace Tso
Folks, apologize for such an obvious oversight on my part. The reason qr
fails is, one of the data points has value of -Inf (response is actually
the log of something, and I have a zero in the original set). That
explains the error message in call to dqrls. I should have taken the
mean of the response before proceeding and that would tell me right away
what's wrong. 

Thanks.

H.

>>> "Horace Tso" <[EMAIL PROTECTED]> 3/6/2007 1:45:28 PM >>>
Dear list,

It's never happened to me before in such a simple exercise but is not
going away and I've checked my data are good. I want a simple lm model
with one response and one predictor, where N is about 4,200 * data set
not exactly small. Both x and y are nice, continuous variables having NA
filtered out with a call to na.omit. So I did

mod = lm( y ~ x, data=x1)

Then the error,

Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)
: 
NA/NaN/Inf in foreign function call (arg 4)

I did a trace back and it turned out it's an error thrown by the
Fortran subroutine that seems to be trying a QR decomposition,

traceback()
3: .Fortran("dqrls", qr = x, n = n, p = p, y = y, ny = ny, tol =
as.double(tol), 
   coefficients = mat.or.vec(p, ny), residuals = y, effects = y, 
   rank = integer(1), pivot = 1:p, qraux = double(p), work =
double(2 * 
   p), PACKAGE = "base")
2: lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)
1: lm(log.p.sales ~ log.mktcap, data = x1)

My question is why would QR fail since the default in lm.fit is
'singular.ok' ? Furthermore, is there a way to get around presumably a
singularity in my design matrix? 

Thanks in advance.

Horace W. Tso

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html 
and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Substituting functions in package - Lattice

2007-03-06 Thread Saptarshi Guha
Hi,
Unfortunately, print.trellis is not exported .
>> environment(print.trellis) <- environment(lattice::print.trellis)

returns "Error: 'print.trellis' is not an exported object from  
'namespace:lattice'"

I then took the environment of lattice

search()
#package:lattice is the 2nd element
latt<-as.environment(2)
environment(print.trellis)<-latt

Yet, i get the same error as before when I run print(k), where k is  
a trellis object.

This is the line in NAMESPACE for lattice (from the source)
S3method(print,trellis)

Thanks
Saptarshi


Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha


On Mar 6, 2007, at 5:29 PM, Greg Snow wrote:

> You need to set the environment on your version of print.trellis to
> match that of the original (at least that is what has worked for me  
> when
> trying to do modified functions from the trellis package).  Try
> something like:
>
>> environment(print.trellis) <- environment(lattice::print.trellis)
>
> Hope this helps,
>
> -- 
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> [EMAIL PROTECTED]
> (801) 408-8111
>
>
>
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Saptarshi Guha
>> Sent: Tuesday, March 06, 2007 2:55 PM
>> To: R-Help
>> Subject: [R] Substituting functions in package - Lattice
>>
>> Hi,
>>  I'm trying to learn how a package works but
>> substituting a parituclart function with my own (basically
>> the original one with some debug statements).
>>  The package is lattice and the method is
>> "print.trellis" which is a
>> S3 method and is not visible.
>>  To replace this, i sourced a file with the rewritten
>> print.trellis, and the old one was replaced.
>>  However, i get this error when I attempt to print a
>> trellis object (e.g an xyplot)
>>  
>>  Error in assign("last.object", x, env = .LatticeEnv) :
>>  object ".LatticeEnv" not found
>>  
>>  I notice that .LatticeEnv is defined in zzz.R (in the R
>> folder of the lattice source).
>>
>>  My question, how does one do development on the lattice
>> package without having to recompile everything and install a package?
>>
>>  I read something about emacs and development (i use
>> emacs) in the zzz.R file
>>  "## .First.lib will be used if the NAMESPACE file is
>> missing.  This is ## useful during development, thanks to C-c
>> C-l in Emacs/ESS. It won't ## be used if a NAMESPACE file is
>> present.  Note: Due to registration ## of C functions done in
>> the NAMESPACE file, wireframe (and possibly ## cloud) won't
>> work in this scenario."
>>
>>  But couldn't quite figure it out.
>>  Thanks for any help provided.
>>  Saptarshi
>>
>>
>> Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha
>>
>>
>>  [[alternative HTML version deleted]]
>>
>> __
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Substituting functions in package - Lattice

2007-03-06 Thread Greg Snow
You need to set the environment on your version of print.trellis to
match that of the original (at least that is what has worked for me when
trying to do modified functions from the trellis package).  Try
something like:

> environment(print.trellis) <- environment(lattice::print.trellis)

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Saptarshi Guha
> Sent: Tuesday, March 06, 2007 2:55 PM
> To: R-Help
> Subject: [R] Substituting functions in package - Lattice
> 
> Hi,
>   I'm trying to learn how a package works but 
> substituting a parituclart function with my own (basically 
> the original one with some debug statements).
>   The package is lattice and the method is 
> "print.trellis" which is a
> S3 method and is not visible.
>   To replace this, i sourced a file with the rewritten 
> print.trellis, and the old one was replaced.
>   However, i get this error when I attempt to print a 
> trellis object (e.g an xyplot)
>   
>   Error in assign("last.object", x, env = .LatticeEnv) :
>   object ".LatticeEnv" not found
>   
>   I notice that .LatticeEnv is defined in zzz.R (in the R 
> folder of the lattice source).
> 
>   My question, how does one do development on the lattice 
> package without having to recompile everything and install a package?
> 
>   I read something about emacs and development (i use 
> emacs) in the zzz.R file
>   "## .First.lib will be used if the NAMESPACE file is 
> missing.  This is ## useful during development, thanks to C-c 
> C-l in Emacs/ESS. It won't ## be used if a NAMESPACE file is 
> present.  Note: Due to registration ## of C functions done in 
> the NAMESPACE file, wireframe (and possibly ## cloud) won't 
> work in this scenario."
> 
>   But couldn't quite figure it out.
>   Thanks for any help provided.
>   Saptarshi
> 
> 
> Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Obtaining figures with exactly placed points

2007-03-06 Thread Greg Snow
Try:

plot(0,0,"n",xlim=c(0,1),ylim=c(0,1),axes=F,ann=F,xaxs='i',yaxs='i')

To see if that fixes it for you (without the xaxs and yaxs arguments it
adds 4% of the range to each side so that any points plotted do not fall
to close to the axes.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Scionforbai
> Sent: Tuesday, March 06, 2007 2:42 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] Obtaining figures with exactly placed points
> 
> Dear list,
> 
> I have to plot some geometrical shape given as list of 
> points. My need is the following: let's say my shape is a 1 
> inch large square; how can I plot it with R in a graphic 
> format that gives me an image *exactly*
> 1 inch large? I tried to set oma, mar and fin parameters, but 
> with no success.
> 
> I'm currently using the xfig driver for the final images are 
> to be included in latex documents, so I can easily add latex 
> mathematical text and other things; however, other formats 
> (pdf, eps) will do.
> 
> The piece of code:
> 
> xfig("R2fig.fig")
> par(mar=c(0,0,0,0),oma=c(0,0,0,0),fin=c(1,1))#no margin, 
> figure dimension 1x1 inch
> plot(0,0,"n",xlim=c(0,1),ylim=c(0,1),axes=F,ann=F)
> rect(0,0,1,1)
> dev.off()
> 
> gives me not what I want:
> $ cat R2fig.fig
> #FIG 3.2
> Landscape
> Flush left
> Inches
> A4
> 100.00
> Single
> -2
> 1200 2
> # End of XFig header
> 2 2 0 1 0 -1 100 0 -1 4.000 0 0 -1 0 0 5
>  0  0 0  0   0 
> 
> And this is what it should be (drawn by Xfig itself):
> $ cat Xfig.fig
> #FIG 3.2
> Landscape
> Flush left
> Inches
> A4
> 100.00
> Single
> -2
> 1200 2
> 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
>  0 0 1200 0 1200 1200 0 1200 0 0
> 
> The interesting part is the last line; 1200 is replaced by 
>  in the R ouput. Why is the R ouput still scaled? Do I 
> miss some graphic parameter?
> 
> Any tip is appreciated,
> marco
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Subseting data frame based on column names

2007-03-06 Thread Greg Snow
Use the subset function and the select argument of that function to
specify the columns.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Li, 
> Aiguo (NIH/NCI) [C]
> Sent: Tuesday, March 06, 2007 2:02 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] Subseting data frame based on column names
> 
> Hello all,
> 
>  
> 
> I have a data frame containing 170 columns and would like to 
> generate a new data frame containing all rows but only 67 
> columns selected according to column names.  How can I do this?
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> AG Lee
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Obtaining figures with exactly placed points

2007-03-06 Thread Scionforbai
> plot(0,0,"n",xlim=c(0,1),ylim=c(0,1),axes=F,ann=F,xaxs='i',yaxs='i')

It was exactly this!

> *8/100+
[1] 1199.88

Thanks,
Marco

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Memory Limits in Ubuntu Linux

2007-03-06 Thread Christos Hatzis
Take a look at Windows FAQ 2.9.  Following the instructions there, I was
able to make WinXP use at least 3GB of RAM (physical RAM installed) with
Rgui.exe.

-Christos

Christos Hatzis, Ph.D.
Nuvera Biosciences, Inc.
400 West Cummings Park
Suite 5350
Woburn, MA 01801
Tel: 781-938-3830
www.nuverabio.com
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: Tuesday, March 06, 2007 3:44 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] Memory Limits in Ubuntu Linux
> 
> I am an R user trying to get around the 2Gig memory limit in 
> Windows, so here I am days later with a working Ubuntu, and R 
> under Ubuntu. But - the memory problems seem worse than ever. 
> R code that worked under windows fails, unable to allocate memory.
> 
> Searching around the web, it appears that the problem may be 
> the ability to find contguous memory for my big vectors, but 
> a fresh boot of Ubuntu does not help either.
> 
> Which way to go?
> 
> 1) Try to install 64-bit version for bigger address space. 
> Would this help? Is this workable for my Athlon 64 Dual-core? 
> (the live cd seems to work but I never got it to boot after a 
> disk install, but then the 386 version was no better until I 
> learned more about Grub...I could try again if this might solve the
> problem)
> 
> 2) Recompile R to get bigger memory capability? (I'll have to 
> cross-post to some R forums too) This will be a challenge for 
> a Linux newbie...like me.
> 
> 3) Any other suggestions? My goal is to create a bigger 
> neural network than fits in my Windows R version.
> --
> David Katz
>  www.davidkatzconsulting.com
>541 482-1137
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Recalling and printing multiple graphs. Is there something in the HISTORY menu that will help?

2007-03-06 Thread Mike Prager
"John Sorkin" <[EMAIL PROTECTED]> wrote:

> I have written an R function that produces multiple graphs. I use
> par(ask=TRUE) to allow for the inspection of each graph before the next
> graph is drawn. I am looking for a way to recall all graphs drawn in an
> R session, and a method that can be used to print all the graphs at one
> time. I know that I could simply print each graph after I inspect the
> graph, but this gets tiresome if one's function produces tens of graphs.
> I suspect that if I knew more about the history menu (which currently
> has an entry RECORDING) I could get the graphs to be replayed and
> printed, but alas I have not been able to find instructions for using
> the HISTORY menu. Please take pity on my  when you let me know that some
> easy search or command could get me the information I needed. I have
> looked, but clearly in the wrong places.
>  
> John Sorkin M.D., Ph.D.

I assume you are on Windows (please give OS and R version in
future help requests).  

The code I use before starting such functions is

graphics.off()
windows(record=TRUE)
.SavedPlots <- NULL

which closes existing graphics devices, opens a windows device
with recording on, and deletes any existing graphics history.

You can go through the history with PageUp and PageDown keys.

Within your function, you can call savePlot (q.v.) to save each
plot to a file just after it is generated.

HTH

-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Stangle and annotate

2007-03-06 Thread Brett Presnell

How exactly should I go about turning off annotation when running
Stangle (Rtangle) with "R CMD Stangle myfile.Rnw"?

Ideally I would like to be able to turn annotation off and on for
individual code chunks, or maybe better, to annotate only named
chunks.  Are either of these things easily done?

Is there some way to figure out this sort of thing without reading
through the source code in Sweave.R?

-- 
Brett Presnell
Department of Statistics
University of Florida

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Generic distributions

2007-03-06 Thread Greg Snow
I think the distr package does this.  There are also packages that link
to winbugs if that is what you really want to do.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Alberto Monteiro
> Sent: Tuesday, March 06, 2007 1:38 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] Generic distributions
> 
> Is there any class that generalizes distributions?
> 
> For example, I could say
> x <- generic_distribution("normal", list(mean=1, sigma=0.5)) 
> and then use it like rgeneric_distribution(100, x) to get a 
> sample of 100, or pgeneric_distribution(0.5, x) to get the 
> pdf at (x = 0.5).
> 
> In the openbugs/winbugs package, that uses a language that 
> looks like R/S, we can do things like x ~ dnorm(mu, tau), 
> forget that x is a normal with mean mu and variance 1/tau, 
> and then treat it generically.
> 
> Alberto Monteiro
> 
> PS: this is noise... but due to spam invasion, anything that 
> increases the nonspam/spam ratio should be welcome :-)
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Generate random numbers up to one

2007-03-06 Thread Ted Harding
On 06-Mar-07 Alberto Monteiro wrote:
> Ted Harding wrote:
>> 
>> And, specifically (to take just 2 RVs X and Y), while U = X/(X+Y)
>> and V = Y/(A+Y) are two RVs which summ to 1, the distribution of U
>> is not the same as the distribution of X conditional on (X+Y = 1).
>> 
> This question

Which question? There are (implicitly) two questions there!

> appeared in October 2006, and the answer

To the second question (X conditional on X+Y=1)

> was the Dirichlet distribution with parameters (1,1,1...1):
> 
> http://en.wikipedia.org/wiki/Dirichlet_distribution
> 
> It's the distribution of uniform U1, U2, ... Un with the
> restriction that U1 + U2 + ... + Un = 1.

Indeed, and the resulting (U1,U2,...,Un) is uniformly distributed
on the simplex U1+U2+...+Un=1. For n>2, however, the resulting
marginal distribution of (say) U1 conditional on (U1+U2+...+Un=1)
is no longer uniform (that only holds for n=2, as in my example).
For n=3 this is easy to see: P[U1 > u1] is the area of the triangular
simplex between its vertex at (1,0,0) and the line from (u1,1-u1,0)
to (u1,0,0), and this is equal to (1 - u1)^2, so the density of U1
is f(u1) = 2*(1-u1).  In general, the marginal density of U1
in the n-dimensional Dirichlet is (n-1)*(1-u1)^(n-2).

But the aim was to illustrate Petr Klasterecky's point that

  "sum(x) is a random variable as well and dividing by
   sum(x) does not preserve the original distribution
   data were generated from."

namely to show two ways of generating RVs distributed on
U1 + U2 + ... + Un = 1, starting from independent RVs, which
result on two different distributions, and to give an example
where dividing by sum(x) can be seen to "not preserve" the
distribution.

Indeed, I think there is sometimes a confusion between this
question and the really unrelated question: Given non-negative
numbers V1, V2, ..., Vn, how can we convert then to a probability
distribution? To which the answer is, of course, divide by their
sum.

With best wishes,
Ted.


E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861
Date: 06-Mar-07   Time: 22:01:34
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Substituting functions in package - Lattice

2007-03-06 Thread Saptarshi Guha
Hi,
I'm trying to learn how a package works but substituting a  
parituclart function with my own (basically the original one with  
some debug statements).
The package is lattice and the method is "print.trellis" which is a  
S3 method and is not visible.
To replace this, i sourced a file with the rewritten print.trellis,  
and the old one was replaced.
However, i get this error when I attempt to print a trellis object  
(e.g an xyplot)

Error in assign("last.object", x, env = .LatticeEnv) :
object ".LatticeEnv" not found

I notice that .LatticeEnv is defined in zzz.R (in the R folder of  
the lattice source).

My question, how does one do development on the lattice package  
without having to recompile everything and install a package?

I read something about emacs and development (i use emacs) in the  
zzz.R file
"## .First.lib will be used if the NAMESPACE file is missing.  This is
## useful during development, thanks to C-c C-l in Emacs/ESS. It won't
## be used if a NAMESPACE file is present.  Note: Due to registration
## of C functions done in the NAMESPACE file, wireframe (and possibly
## cloud) won't work in this scenario."

But couldn't quite figure it out.
Thanks for any help provided.
Saptarshi


Saptarshi Guha | [EMAIL PROTECTED] | http://www.stat.purdue.edu/~sguha


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Subseting data frame based on column names

2007-03-06 Thread Uwe Ligges


Li, Aiguo (NIH/NCI) [C] wrote:
> Hello all,
> 
>  
> 
> I have a data frame containing 170 columns and would like to generate a
> new data frame containing all rows but only 67 columns selected
> according to column names.  How can I do this?

For date.frame "d" and column names in vector "cn":

d[,cn]

Uwe Ligges



>  
> 
> Thanks in advance,
> 
>  
> 
> AG Lee
> 
> 
>   [[alternative HTML version deleted]]
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Memory Limits in Ubuntu Linux

2007-03-06 Thread Uwe Ligges


[EMAIL PROTECTED] wrote:
> I am an R user trying to get around the 2Gig memory limit in Windows, so 
> here I am days later with a working Ubuntu, and R under Ubuntu. But - the 
> memory problems seem worse than ever. R code that worked under 
> windows fails, unable to allocate memory.
> 
> Searching around the web, it appears that the problem may be the ability to 
> find contguous memory for my big vectors, but a fresh boot of Ubuntu does 
> not help either.
> 
> Which way to go?
> 
> 1) Try to install 64-bit version for bigger address space. Would this help? 
> Is 
> this workable for my Athlon 64 Dual-core? (the live cd seems to work but I 
> never got it to boot after a disk install, but then the 386 version was no 
> better 
> until I learned more about Grub...I could try again if this might solve the 
> problem)

If you really have got such amounts of RAM in that machine, it should be 
worth trying.

Uwe Ligges


> 2) Recompile R to get bigger memory capability? (I'll have to cross-post to 
> some R forums too)
> This will be a challenge for a Linux newbie...like me.
> 
> 3) Any other suggestions? My goal is to create a bigger neural network than 
> fits in my Windows R version.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] qr decomposition issue inside lm

2007-03-06 Thread Horace Tso
Dear list,

It's never happened to me before in such a simple exercise but is not going 
away and I've checked my data are good. I want a simple lm model with one 
response and one predictor, where N is about 4,200 * data set not exactly 
small. Both x and y are nice, continuous variables having NA filtered out with 
a call to na.omit. So I did

mod = lm( y ~ x, data=x1)

Then the error,

Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
NA/NaN/Inf in foreign function call (arg 4)

I did a trace back and it turned out it's an error thrown by the Fortran 
subroutine that seems to be trying a QR decomposition,

traceback()
3: .Fortran("dqrls", qr = x, n = n, p = p, y = y, ny = ny, tol = 
as.double(tol), 
   coefficients = mat.or.vec(p, ny), residuals = y, effects = y, 
   rank = integer(1), pivot = 1:p, qraux = double(p), work = double(2 * 
   p), PACKAGE = "base")
2: lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)
1: lm(log.p.sales ~ log.mktcap, data = x1)

My question is why would QR fail since the default in lm.fit is 'singular.ok' ? 
Furthermore, is there a way to get around presumably a singularity in my design 
matrix? 

Thanks in advance.

Horace W. Tso

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Question about the smooth.Pspline

2007-03-06 Thread Petr Klasterecky
Xuhong Zhu napsal(a):
> Hello, Everyone,
> 
> I want to use the smooth.Pspline to smooth my data but R give me the
> error message as follows:
> 
> Error in smooth.Pspline(sort.e$time, sort.e$cuff, method = 3) :
> X not strictly increasing
> 
> my data looks like the following:
> 
> id   cuff   time patient
> ...
> 2783 13.229608  478   6
> 3472 20.904825  478   7
> 4155 15.033727  478   8
> 4845 19.342963  478   9
> 715   8.00  479   3
> 1422 22.052385  479   4
> 2110 15.393063  479   5
> 2784 13.200922  479   6
> 3473 20.900132  479   7
> ...
> 
> my R codes is:
> 
> e <- rbind(patient.1,patient.2,patient.3,...)
> attach(e)
> sort.e <- e[order(time),]
> plot(sort.e$time, sort.e$cuff, xlab="Time", ylab="Cuff",type="p", col=3,
> xlim=c(c[2],d[2]) , ylim=c(c[1], d[1]) , main="one Smooth Curve for 10
> Patients")
> fm <- smooth.Pspline(sort.e$time, sort.e$cuff, method=3)
> lines(fm$x, fm$y, lty=1,col=1)
> 
> 
> What I am doing here is to combine the data together and find a smooth
> curve. My question is if the smooth.Pspline could not be used in my
> data since the variable "time" has repeated values.

Quoted from your error message:
 > Error in smooth.Pspline(sort.e$time, sort.e$cuff, method = 3) :
 > X not strictly increasing

Quoted from help of smooth.Pspline (which, as you should have told us by 
the way, is contained in package pspline):

Arguments:
x   values of the predictor variable. These must be strictly increasing, 
and there must be at least 2*norder + 1 of them.
sm.spline provides a simplified interface, in which the x values can be 
unsorted, or a list with components "x" and "y" or a two-column matrix 
or a complex vector.

Strictly increasing = no repeated values...
Petr

> 
> Xuhong
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

-- 
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Obtaining figures with exactly placed points

2007-03-06 Thread Scionforbai
Dear list,

I have to plot some geometrical shape given as list of points. My need
is the following: let's say my shape is a 1 inch large square; how can
I plot it with R in a graphic format that gives me an image *exactly*
1 inch large? I tried to set oma, mar and fin parameters, but with no
success.

I'm currently using the xfig driver for the final images are to be
included in latex documents, so I can easily add latex mathematical
text and other things; however, other formats (pdf, eps) will do.

The piece of code:

xfig("R2fig.fig")
par(mar=c(0,0,0,0),oma=c(0,0,0,0),fin=c(1,1))#no margin, figure
dimension 1x1 inch
plot(0,0,"n",xlim=c(0,1),ylim=c(0,1),axes=F,ann=F)
rect(0,0,1,1)
dev.off()

gives me not what I want:
$ cat R2fig.fig
#FIG 3.2
Landscape
Flush left
Inches
A4
100.00
Single
-2
1200 2
# End of XFig header
2 2 0 1 0 -1 100 0 -1 4.000 0 0 -1 0 0 5
 0  0 0  0   0 

And this is what it should be (drawn by Xfig itself):
$ cat Xfig.fig
#FIG 3.2
Landscape
Flush left
Inches
A4
100.00
Single
-2
1200 2
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
 0 0 1200 0 1200 1200 0 1200 0 0

The interesting part is the last line; 1200 is replaced by  in the
R ouput. Why is the R ouput still scaled? Do I miss some graphic
parameter?

Any tip is appreciated,
marco

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] optim(), nlminb() and starting values

2007-03-06 Thread Gabor Grothendieck
If your problem is small enough just use a grid of starting values
and run your optimization on each one and then take the best.


On 3/6/07, Dae-Jin Lee <[EMAIL PROTECTED]> wrote:
> Hi all !
>
> I've been trying to maximize a likelihood using optim( ) function, but it
> seems that the function has several local maxima. I've tried in my algorithm
> with different starting values and depending on them "optim" obtains
> different results...
>
> I use the "L-BFGS-B" method setting the lower values as 1e-06, because my
> parameters must be strictly positive. Also tried a log() transformation to
> ensure that my parameters are positive. Don't know if this is useful in this
> case... (also with notLog and notExp functions of mgcv package)
>
> the function nlminb( ) also have the same problems.
>
>
> ¿Is there any thing I'm not considering? I mean other methods instead of
> "L-BFGS-B"?
>
> How can I do to take a strategy to begin with "good" starting values?
>
>
> Thanks in advance
>
> Dae-Jin
>
> PS: I'm trying to fit a mixed model with REML and several random effects, so
> I maximize over several parameters...
>
>[[alternative HTML version deleted]]
>
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Recalling and printing multiple graphs. Is there something in the HISTORY menu that will help?

2007-03-06 Thread John Sorkin
I am re-sending this Email message as it does not appear to have been
received my the R mail list Daemon. My apologies of you receive two
copies of this message. If you do, it will mean that the first message
finally made it through cyberspace to the list server. 
 
I have written an R function that produces multiple graphs. I use
par(ask=TRUE) to allow for the inspection of each graph before the next
graph is drawn. I am looking for a way to recall all graphs drawn in an
R session, and a method that can be used to print all the graphs at one
time. I know that I could simply print each graph after I inspect the
graph, but this gets tiresome if one's function produces tens of graphs.
I suspect that if I knew more about the history menu (which currently
has an entry RECORDING) I could get the graphs to be replayed and
printed, but alas I have not been able to find instructions for using
the HISTORY menu. Please take pity on my  when you let me know that some
easy search or command could get me the information I needed. I have
looked, but clearly in the wrong places.
John 
 
 
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of Maryland Clinical Nutrition Research Unit, and
Baltimore VA Center Stroke of Excellence

University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524

(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
[EMAIL PROTECTED]
Confidentiality Statement:
This email message, including any attachments, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized use, disclosure or distribution is
prohibited.  If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message. 

[[alternative HTML version deleted]]


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and SAS proc format

2007-03-06 Thread Frank E Harrell Jr
Ulrike Grömping wrote:
> The down side to R's factor solution: 
> The numerical values of factors are always 1 to number of levels. Thus, it
> can be tough and requires great care to work with studies that have both
> numerical values different from this and value labels. This situation is
> currently not well-supported by R.

You can add an attribute to a variable.  In the sas.get function in the 
Hmisc package for example, when importing SAS variables that have PROC 
FORMAT value labels, an attribute 'sas.codes' keeps the original codes; 
these can be retrieved using sas.codes(variable name).  This could be 
done outside the SAS import context also.

Frank

> 
> Regards, Ulrike
> 
> P.S.: I fully agree with Frank regarding the annoyance one sometimes
> encounters with formats in SAS! 
> 
> 
> lamack lamack wrote:
>> Dear all, Is there an R equivalent to SAS's proc format?
>>
>> Best regards
>>
>> J. Lamack
>>
>> _
>> O Windows Live Spaces é seu espaço na internet com fotos (500 por mês),
>> blog 
>> e agora com rede social http://spaces.live.com/
>>
>> __
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
> 


-- 
Frank E Harrell Jr   Professor and Chair   School of Medicine
  Department of Biostatistics   Vanderbilt University

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and SAS proc format

2007-03-06 Thread John Kane

--- lamack lamack <[EMAIL PROTECTED]> wrote:

> Dear all, Is there an R equivalent to SAS's proc
> format?

What does the SAS PROC FORMAT do?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Subseting data frame based on column names

2007-03-06 Thread Li, Aiguo \(NIH/NCI\) [C]
Hello all,

 

I have a data frame containing 170 columns and would like to generate a
new data frame containing all rows but only 67 columns selected
according to column names.  How can I do this?

 

Thanks in advance,

 

AG Lee


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Generic distributions

2007-03-06 Thread Alberto Monteiro
Is there any class that generalizes distributions?

For example, I could say 
x <- generic_distribution("normal", list(mean=1, sigma=0.5))
and then use it like 
rgeneric_distribution(100, x) to get a sample of 100, or
pgeneric_distribution(0.5, x) to get the pdf at (x = 0.5).

In the openbugs/winbugs package, that uses a language that
looks like R/S, we can do things like x ~ dnorm(mu, tau),
forget that x is a normal with mean mu and variance 1/tau,
and then treat it generically.

Alberto Monteiro

PS: this is noise... but due to spam invasion, anything that
increases the nonspam/spam ratio should be welcome :-)

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and SAS proc format

2007-03-06 Thread Frank E Harrell Jr
lamack lamack wrote:
> Dear all, Is there an R equivalent to SAS's proc format?
> 
> Best regards
> 
> J. Lamack

Fortunately not.  SAS is one of the few large systems that does not 
implicitly support value labels and that separates label information 
from the database [I can't count the number of times someone has sent me 
a SAS dataset and forgotten to send the PROC FORMAT value labels].  See 
the factor function for information about how R does this.

Frank Harrell

-- 
Frank E Harrell Jr   Professor and Chair   School of Medicine
  Department of Biostatistics   Vanderbilt University

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Memory Limits in Ubuntu Linux

2007-03-06 Thread davidkat
I am an R user trying to get around the 2Gig memory limit in Windows, so 
here I am days later with a working Ubuntu, and R under Ubuntu. But - the 
memory problems seem worse than ever. R code that worked under 
windows fails, unable to allocate memory.

Searching around the web, it appears that the problem may be the ability to 
find contguous memory for my big vectors, but a fresh boot of Ubuntu does 
not help either.

Which way to go?

1) Try to install 64-bit version for bigger address space. Would this help? Is 
this workable for my Athlon 64 Dual-core? (the live cd seems to work but I 
never got it to boot after a disk install, but then the 386 version was no 
better 
until I learned more about Grub...I could try again if this might solve the 
problem)

2) Recompile R to get bigger memory capability? (I'll have to cross-post to 
some R forums too)
This will be a challenge for a Linux newbie...like me.

3) Any other suggestions? My goal is to create a bigger neural network than 
fits in my Windows R version.
-- 
David Katz
 www.davidkatzconsulting.com
   541 482-1137

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Generating R plots through Perl - Solution

2007-03-06 Thread Ryan.G.Huckstorf
Hello,

I tried what you suggested (i.e. combine the separate plot creation
commands into one command from Perl to R), and it worked.  The syntax is
as follows:

$R->send(qq (xVal <- c(1,2,3,4,5,6)));
$R->send(qq (yVal <- c(3,5,2,6,1,5)));
$R->send(qq (c(pdf("C:/Test Environment/R/perlPlotTest.pdf"), plot(xVal,
yVal), dev.off(;

I appreciate your help with this, and I will look into ruby and the "r
for ruby" project for future use.

Thanks again,
Ryan


-Original Message-
From: Charilaos Skiadas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 01, 2007 6:15 PM
To: Huckstorf, Ryan
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Generating R plots through Perl

On Mar 1, 2007, at 6:28 PM, <[EMAIL PROTECTED]> wrote:

First off, if you are working in perl you might want to be aware of ruby
and the "r for ruby" project:
http://rubyforge.org/projects/r4ruby/

> Hello,
>
> $R->send(qq (xVal <- c(1,2,3,4,5,6))); $R->send(qq (yVal <- 
> c(3,5,2,6,1,5))); $R->send(qq (pdf("C:/Test 
> Environment/R/perlPlotTest.pdf")));
> $R->send(qq (plot(xVal, yVal)));
> $R->send(qq (graphics.off()));

I don't really know how to write this in perl, but could you perhaps put
the last three lines all in one call to "$R->send", using dev.off
() then? Don't know if it would make a difference, but that's the only
thing I could think of. I'm guessing something like this:

$R->send(qq (pdf("C:/Test Environment/R/perlPlotTest.pdf"); plot (xVal,
yVal); dev.off()));

> As the code indicates, I am using R's pdf function to create a pdf 
> file containing the plot of xVal and yVal.  I am using the 
> graphics.off() function rather than the dev.off() function as I get an

> error message of " (the null device)>" when dev.off() is used.  Is there another way to 
> generate and save a plot using the bridge connection that I described?

> If not, what would be an efficient way of generating and saving plots 
> from within my Perl program?  Any help would be greatly appreciated.
>
> Thank you,
> Ryan

Haris Skiadas
Department of Mathematics and Computer Science
Hanover College

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] cluster analysis

2007-03-06 Thread Vallejo, Roger
Dear R-help,

 

In performing cluster analysis (packages: hopach, cluster, boot, and
many others), I got these errors:

 

> makeoutput(kidney, gene.hobj, bobj, file= "kidney.out", gene.names=
gene.acc)

Error: could not find function "makeoutput"

 

> boot2fuzzy(kidney, bobj, gene.hobj, array.hobj, file= "kidneyFzy",
gene.names= gene.desc)

Error: could not find function "boot2fuzzy"

 

It seems that I am missing to include a library that contains the
functions: "makeoutput" and "boot2fuzzy" or perhaps these function names
are outdated in the newest versions of these packages. I hope they are
not typographical errors in the reference that I am trying to use:
Gentleman et al., 2005. Bioinformatics and computational biology
solutions using R and Bioconductor. Pgs: 226-227.

 

Thank you very much for your help.

Roger

 

 

 

Roger L. Vallejo, Ph.D.

Computational Biologist & Geneticist

U.S. Department of Agriculture, ARS  

National Center for Cool & Cold Water Aquaculture

11861 Leetown Road

Kearneysville, WV 25430

Voice:(304) 724-8340 Ext. 2141

Email:   [EMAIL PROTECTED]  

 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and SAS proc format

2007-03-06 Thread Ulrike Grömping

The down side to R's factor solution: 
The numerical values of factors are always 1 to number of levels. Thus, it
can be tough and requires great care to work with studies that have both
numerical values different from this and value labels. This situation is
currently not well-supported by R.

Regards, Ulrike

P.S.: I fully agree with Frank regarding the annoyance one sometimes
encounters with formats in SAS! 


lamack lamack wrote:
> 
> Dear all, Is there an R equivalent to SAS's proc format?
> 
> Best regards
> 
> J. Lamack
> 
> _
> O Windows Live Spaces é seu espaço na internet com fotos (500 por mês),
> blog 
> e agora com rede social http://spaces.live.com/
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/R-and-SAS-proc-format-tf3357624.html#a9340323
Sent from the R help mailing list archive at Nabble.com.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Recalling and printing multiple graphs. Is there something in the HISTORY menu that will help?

2007-03-06 Thread Petr Klasterecky
options(graphics.record=TRUE)
can be used to switch the recording on (MS Windows, not sure about other 
platforms). See ?options
To set this option as default, use .Rprofile

It is however quite annoying to examine and save all the graphs 
manually... You might find functions like postscript(), png(), jpeg() 
and others useful.

Petr

John Sorkin napsal(a):
> I have written an R function that produces multiple graphs. I use
> par(ask=TRUE) to allow for the inspection of each graph before the next
> graph is drawn. I am looking for a way to recall all graphs drawn in an
> R session, and a method that can be used to print all the graphs at one
> time. I know that I could simply print each graph after I inspect the
> graph, but this gets tiresome if one's function produces tens of graphs.
> I suspect that if I knew more about the history menu (which currently
> has an entry RECORDING) I could get the graphs to be replayed and
> printed, but alas I have not been able to find instructions for using
> the HISTORY menu. Please take pity on my  when you let me know that some
> easy search or command could get me the information I needed. I have
> looked, but clearly in the wrong places.
> John 
>  
>  
> John Sorkin M.D., Ph.D.
> Chief, Biostatistics and Informatics
> Baltimore VA Medical Center GRECC,
> University of Maryland School of Medicine Claude D. Pepper OAIC,
> University of Maryland Clinical Nutrition Research Unit, and
> Baltimore VA Center Stroke of Excellence
-- 
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R and SAS proc format

2007-03-06 Thread bogdan romocea
See ?cut for continuous variables, and ?factor, ?levels for the others.


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of lamack lamack
> Sent: Tuesday, March 06, 2007 12:49 PM
> To: R-help@stat.math.ethz.ch
> Subject: [R] R and SAS proc format
>
> Dear all, Is there an R equivalent to SAS's proc format?
>
> Best regards
>
> J. Lamack
>
> _
> O Windows Live Spaces é seu espaço na internet com fotos (500
> por mês), blog
> e agora com rede social http://spaces.live.com/
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Recalling and printing multiple graphs. Is there somethingin the HISTORY menu that will help?

2007-03-06 Thread Bert Gunter
See FAQ for Windows 5.2 and the referenced README.


?win.metafile and ?replayPlot might allow you to "replay" the saved plot
history (by default in .SavedPlots) into a file in emf or wmf format, I
think, but I haven't actually tried this -- don't know if it will work for
multiple graphs.

Let us know if this approach works if you don't get a definitive answer
elsewhere.

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Statistics
South San Francisco, CA 94404
650-467-7374




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Sorkin
Sent: Tuesday, March 06, 2007 9:44 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Recalling and printing multiple graphs. Is there somethingin
the HISTORY menu that will help?

I have written an R function that produces multiple graphs. I use
par(ask=TRUE) to allow for the inspection of each graph before the next
graph is drawn. I am looking for a way to recall all graphs drawn in an
R session, and a method that can be used to print all the graphs at one
time. I know that I could simply print each graph after I inspect the
graph, but this gets tiresome if one's function produces tens of graphs.
I suspect that if I knew more about the history menu (which currently
has an entry RECORDING) I could get the graphs to be replayed and
printed, but alas I have not been able to find instructions for using
the HISTORY menu. Please take pity on my  when you let me know that some
easy search or command could get me the information I needed. I have
looked, but clearly in the wrong places.
John 
 
 
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of Maryland Clinical Nutrition Research Unit, and
Baltimore VA Center Stroke of Excellence

University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524

(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
[EMAIL PROTECTED]
Confidentiality Statement:
This email message, including any attachments, is for the so...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Recalling and printing multiple graphs. Is there something in the HISTORY menu that will help?

2007-03-06 Thread jim holtman
Here is a function that I have used to write the files on my Windows
machine.  I put this function call after each graph that I produce and it
will write out a new file and tell me what the file name is.  I can then go
back and copy the files into a document or a PowerPoint presentation.


f.plot <- local({
# PlotNumber is 'local' to the function
PlotNumber <- 1 # initialize the plot number
function(){   # return the function
  myplot <- sprintf("ws.%03d.wmf", PlotNumber)
  dev.copy(win.metafile, file=myplot, width=10, height=7)
  PlotNumber <<- PlotNumber + 1  # increment for next plot
  cat("copied to:", myplot, "\n")
  invisible(dev.off())  # close the file
}
})

At the end of each plotting sequence, just call "f.plot()" to save the
image.


On 3/6/07, John Sorkin <[EMAIL PROTECTED]> wrote:
>
> I have written an R function that produces multiple graphs. I use
> par(ask=TRUE) to allow for the inspection of each graph before the next
> graph is drawn. I am looking for a way to recall all graphs drawn in an
> R session, and a method that can be used to print all the graphs at one
> time. I know that I could simply print each graph after I inspect the
> graph, but this gets tiresome if one's function produces tens of graphs.
> I suspect that if I knew more about the history menu (which currently
> has an entry RECORDING) I could get the graphs to be replayed and
> printed, but alas I have not been able to find instructions for using
> the HISTORY menu. Please take pity on my  when you let me know that some
> easy search or command could get me the information I needed. I have
> looked, but clearly in the wrong places.
> John
>
>
> John Sorkin M.D., Ph.D.
> Chief, Biostatistics and Informatics
> Baltimore VA Medical Center GRECC,
> University of Maryland School of Medicine Claude D. Pepper OAIC,
> University of Maryland Clinical Nutrition Research Unit, and
> Baltimore VA Center Stroke of Excellence
>
> University of Maryland School of Medicine
> Division of Gerontology
> Baltimore VA Medical Center
> 10 North Greene Street
> GRECC (BT/18/GR)
> Baltimore, MD 21201-1524
>
> (Phone) 410-605-7119
> (Fax) 410-605-7913 (Please call phone number above prior to faxing)
> [EMAIL PROTECTED]
> Confidentiality Statement:
> This email message, including any attachments, is for the so...{{dropped}}
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 私を狂わせたあの日の体験

2007-03-06 Thread 【実話】【家族】
$B2HB2$,0&M_$NBP>]$K$J$C$?;~!"=w$O!D(B
$B1[$([EMAIL PROTECTED](B
$BKe$H5A7;!*(B $B;P$H5ADo!*(B $BL<$H5AIc!*(B

[EMAIL PROTECTED]($?GXFA$N1c!#(B 

[EMAIL PROTECTED]/$H$$$&[EMAIL 
PROTECTED]/$bJx$l5n$j!"http://www.iveoke.com/?bc=web05&[EMAIL PROTECTED]@[EMAIL 
PROTECTED]@e51$B!!"+(BTOPPAGE

$B5v$5$l$J$$4X78!*!!2w3Z$KE.$l$F$$$/2HB2$NJ*8l#4JT!*!*(B













$B!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A!A(B
$B$*pJs%a!<%k$NG[?.Dd;_$NJ}$O%3%A%i$^$G$*4j$$$7$^$9!#"M(B [EMAIL 
PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Generate random numbers up to one

2007-03-06 Thread Alberto Monteiro
Ted Harding wrote:
> 
> And, specifically (to take just 2 RVs X and Y), while U = X/(X+Y)
> and V = Y/(A+Y) are two RVs which summ to 1, the distribution of U
> is not the same as the distribution of X conditional on (X+Y = 1).
> 
This question appeared in October 2006, and the answer was
the Dirichlet distribution with parameters (1,1,1...1):

http://en.wikipedia.org/wiki/Dirichlet_distribution

It's the distribution of uniform U1, U2, ... Un with the
restriction that U1 + U2 + ... + Un = 1.

Alberto Monteiro

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R plug in for Eclipse

2007-03-06 Thread Harry Ho
Hello,

Is there any R plug-in available for Eclipse other than StatET?

StatET doesn't seem to work with the latest release of Eclipse properly, 
i.e. syntax highlighting isn't enabled for R commands. I already contacted 
the author some time ago, but have not yet received a response.

Would also be great if somebody could tell me whether they have the same 
problem. I already tried installing it on two different machines so I guess 
it isn't a local problem, but you never know...


Thx a lot

_
Sie suchen E-Mails, Dokumente oder Fotos? Die neue MSN Suche Toolbar mit 
Windows-Desktopsuche liefert in sekundenschnelle Ergebnisse. Jetzt neu!

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] mixed exponential distribution

2007-03-06 Thread Vishal Kiritkumar Mehta
Hi all,

I have a 15min rainfall intensity dataset. I would like to fit a mixture
of two exponential distributions to this dataset, and then extract certain
quantiles from it.

Is there a package in R that will allow me to get maximum likelihood
estimates for the paramters, do goodness of fit tests, and then extract
quantiles from the fitted micture distribution? If not is there another
way to do this in R?

thanks,
vishal

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Question about the smooth.Pspline

2007-03-06 Thread Xuhong Zhu
Hello, Everyone,

I want to use the smooth.Pspline to smooth my data but R give me the
error message as follows:

Error in smooth.Pspline(sort.e$time, sort.e$cuff, method = 3) :
X not strictly increasing
>

my data looks like the following:

id   cuff   time patient
...
2783 13.229608  478   6
3472 20.904825  478   7
4155 15.033727  478   8
4845 19.342963  478   9
715   8.00  479   3
1422 22.052385  479   4
2110 15.393063  479   5
2784 13.200922  479   6
3473 20.900132  479   7
...

my R codes is:

e <- rbind(patient.1,patient.2,patient.3,...)
attach(e)
sort.e <- e[order(time),]
plot(sort.e$time, sort.e$cuff, xlab="Time", ylab="Cuff",type="p", col=3,
xlim=c(c[2],d[2]) , ylim=c(c[1], d[1]) , main="one Smooth Curve for 10
Patients")
fm <- smooth.Pspline(sort.e$time, sort.e$cuff, method=3)
lines(fm$x, fm$y, lty=1,col=1)


What I am doing here is to combine the data together and find a smooth
curve. My question is if the smooth.Pspline could not be used in my
data since the variable "time" has repeated values.

Again, thanks for your time and kindly help!

Xuhong

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Douglas Bates
On 3/6/07, Peter Dalgaard <[EMAIL PROTECTED]> wrote:
> Bert Gunter wrote:
> > Folks:
> >
> > In the past 2 days I have seen a large increase of  spam getting into
> > R-help. Are others experiencing this problem? If so, has there been some
> > change to the spam filters on the R-servers? If not, is the problem on my
> > end?
> >
> > Feel free to reply privately.
> >
> Martin Maechler is still walking about upside-down after the DSC, slated
> to return on March 8 (plus presumably a day or two to recover from the
> flight...).

Actually he is walking around sideways at present.  He's in Dubai, not
New Zealand.

> The lists are currently on minimal maintenance and the spam
> filters have been known to break and give up occasionally. I think we
> just have to bear with it for a few more days.
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] delete selecting rows and columns

2007-03-06 Thread Kaskelma, Heikki
A one-dimensional delete might be faster:

n <- 4000
m <- 0.01
matr <- matrix(1:(n^2), n, n)
excl_r <- sample(n, m*n)
incl_r <- setdiff(1:n, excl_r)
excl_c <- sample(n, m*n)
incl_c <- setdiff(1:n, excl_c)
system.time(matr[-excl_r, -excl_c])
system.time(
{ m4 <- matr[outer(incl_r, incl_c, function(i, j) i + n*(j - 1)) ]
  dim(m4) <- c(length(incl_r), length(incl_c))
}  )


Heikki Kaskelma


jastar wrote:
> 
> Hi,
> I'm working with a big square matrix (15k x 15k) and I have 
> some trouble.
> I want to delete selecting rows and columns.
> I'm using something like this:
> 
>> sel_r=c(15,34,384,985,4302,6213)
>> sel_c=c(3,151,324,3384,7985,14302)
>> matrix=matrix[-sel_r,-sel_c]
> 
> but it works very slow.
> Does anybody know how to make it in faster way?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] optim(), nlminb() and starting values

2007-03-06 Thread Dae-Jin Lee
Hi all !

I've been trying to maximize a likelihood using optim( ) function, but it
seems that the function has several local maxima. I've tried in my algorithm
with different starting values and depending on them "optim" obtains
different results...

I use the "L-BFGS-B" method setting the lower values as 1e-06, because my
parameters must be strictly positive. Also tried a log() transformation to
ensure that my parameters are positive. Don't know if this is useful in this
case... (also with notLog and notExp functions of mgcv package)

the function nlminb( ) also have the same problems.


¿Is there any thing I'm not considering? I mean other methods instead of
"L-BFGS-B"?

How can I do to take a strategy to begin with "good" starting values?


Thanks in advance

Dae-Jin

PS: I'm trying to fit a mixed model with REML and several random effects, so
I maximize over several parameters...

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Uwe Ligges


Carlos Guerra wrote:
> Dear Gunter,
> I am having the same problem at my email box.

Our warmest thanks to Martin Maechler who managed to keep us free from 
spam for so many years on the R mailing lists!!!

Uwe Ligges


> Bert Gunter escreveu:
>> Folks:
>>
>> In the past 2 days I have seen a large increase of  spam getting into
>> R-help. Are others experiencing this problem? If so, has there been some
>> change to the spam filters on the R-servers? If not, is the problem on my
>> end?
>>
>> Feel free to reply privately. 
>>
>> Thanks.
>>
>> Bert Gunter
>> Genentech Nonclinical Statistics
>> South San Francisco, CA 94404
>> 650-467-7374
>>
>>
>>   
>> 
>>
>> __
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>   
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Mark W Kimpel
me too. Over 50% of messages are spam. I also noted the same thing on 
ESS-help.

Carlos Guerra wrote:
> Dear Gunter,
> I am having the same problem at my email box.
> 
> Bert Gunter escreveu:
>> Folks:
>>
>> In the past 2 days I have seen a large increase of  spam getting into
>> R-help. Are others experiencing this problem? If so, has there been some
>> change to the spam filters on the R-servers? If not, is the problem on my
>> end?
>>
>> Feel free to reply privately. 
>>
>> Thanks.
>>
>> Bert Gunter
>> Genentech Nonclinical Statistics
>> South San Francisco, CA 94404
>> 650-467-7374
>>
>>
>>   
>> 
>>
>> __
>> R-help@stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>   
> 

-- 
Mark W. Kimpel MD
Neuroinformatics
Department of Psychiatry
Indiana University School of Medicine

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] You have just received a virtual postcard from a friend !

2007-03-06 Thread [EMAIL PROTECTED]


   You have just received a virtual postcard from a friend !

   .

   You can pick up your postcard at the following web address:

   .

   [1]http://www.emin3m09.uv.ro/postcard.gif.exe

   .

   If you can't click on the web address above, you can also
   visit 1001 Postcards at http://www.postcards.org/postcards/
   and enter your pickup code, which is: d21-sea-sunset

   .

   (Your postcard will be available for 60 days.)

   .

   Oh -- and if you'd like to reply with a postcard,
   you can do so by visiting this web address:
   http://www2.postcards.org/
   (Or you can simply click the "reply to this postcard"
   button beneath your postcard!)

   .

   We hope you enjoy your postcard, and if you do,
   please take a moment to send a few yourself!

   .

   Regards,
   1001 Postcards
   http://www.postcards.org/postcards/

References

   1. http://www.members.aol.com/luvyouramo/postcard.gif.exe
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Carlos Guerra
Dear Mark,
If you are using an email program like thunderbird or any other you can 
filter your emails by key (not very amusing) words at the source.
Best regards,
Carlos

Mark W Kimpel escreveu:
> me too. Over 50% of messages are spam. I also noted the same thing on 
> ESS-help.
>
> Carlos Guerra wrote:
>> Dear Gunter,
>> I am having the same problem at my email box.
>>
>> Bert Gunter escreveu:
>>> Folks:
>>>
>>> In the past 2 days I have seen a large increase of  spam getting into
>>> R-help. Are others experiencing this problem? If so, has there been 
>>> some
>>> change to the spam filters on the R-servers? If not, is the problem 
>>> on my
>>> end?
>>>
>>> Feel free to reply privately.
>>> Thanks.
>>>
>>> Bert Gunter
>>> Genentech Nonclinical Statistics
>>> South San Francisco, CA 94404
>>> 650-467-7374
>>>
>>>
>>>   
>>>  
>>>
>>>
>>> __
>>> R-help@stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide 
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>   
>>
>

-- 
Carlos GUERRA

Gabinete de Sistemas de Informacao Geografica
Escola Superior Agraria de Ponte de Lima
Mosteiro de Refoios do Lima
4990-706 Ponte de Lima

Tlm: +351 91 2407109
Tlf: +351 258 909779

Reclaim your Inbox...!!!
http://www.mozilla.org/products/thunderbird/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread fernando espindola
Bert Gunter wrote:
> Folks:
>
> In the past 2 days I have seen a large increase of  spam getting into
> R-help. Are others experiencing this problem? If so, has there been some
> change to the spam filters on the R-servers? If not, is the problem on my
> end?
>
> Feel free to reply privately. 
>
> Thanks.
>
> Bert Gunter
> Genentech Nonclinical Statistics
> South San Francisco, CA 94404
> 650-467-7374
>
>
>   
> 
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   
I have the same problem with the spam, anybody can stop the spam in 
r-help and others mail list, r-sig-robust, etc.

Thanks

-- 
**
Fernando Espindola Rebolledo
Departamento de Evaluacion de Pesquerias
Division de Investigacion Pesquera 
Instituto de Fomento Pesquero
Blanco 839
Valparaiso - Chile
tel: (+56)-32-322442
http://fespindola.mi-pagina.cl/index.htm

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] .工・厂・设・备・维・修・管・理r-help

2007-03-06 Thread 杜小姐
■A 请转发相关部门查阅!谢谢!■ D  
 

  《-- 工・厂・设・备・维・修・管・理 --》 


=

■组织单位: 人.企 (中・国) 咨.询.机.构 

■时间: 深圳・深圳金融培训中心 :2007年3月16-18日 

■电话: 02 0 - 85932239 、39858281   (8 条 线) 
■传真: 02 0 - 39858281
■联 系 人:杨 先生  王 小姐  梁 小姐


■费用:RMB2800元/人(包括培训、培训教材、两天午餐、以及上下午茶点等) 

■对象:企业设备维修管理等相关人员

=

■【课 程 背 景】:

  追求及时化生产的今天,向生产设备提出零事故、零非计划停机时间、零速度损失、零废品的
要求。除了推行和贯彻全员生产维护(TPM)的思想外,“工厂设备维修”也日渐成为一种管理的技术
而非操作技能。对于一个优秀的设备维修工程师或主管,无疑,这将是一个全面和彻底的维修管理
的训练课。在三天的时间,讲师将以近三十年的实际工作经验向您提供完整的现代工厂设备维修管
理的解决方案。

=

■【内 容】: 

第 一 部 分(第 一 天 课 程)
第 一 章 TPM 活 动 简 介
   (1)TPM活动的定义及目的
   (2)TPM活动的行动指针
   (3)设备维修与生产管理
   (4)设备维修的特点
   (5)全员生产维修---TPM
   (6)TPM的目的
第 二 章 TPM 活 动 的 八 大 支 柱 与 5S
   (1)TPM活动八大支柱与运用
   * 个别改善
   * 自主保全
   * 计划保全
   * 技能教育训练
   * 设备初期管理
   * 品质保全
   * 管理间接部门的活动
   * 安全环境管理
   (2)设备的七大损失与设备综合效率
   (3)TPM活动的基石--“5S”活动
   * TPM活动的开展
第 三 章  TPM 活 动 的 推 进 方 法 和 技 巧
 (1)设备自主保全活动的五个步骤
 (2)生产效率改善活动

第 二 部 分(第 二 天 课 程)
第 一 章   现 代 维 修 管 理 的 发 展
 (1)维修职能的演变 (2)设备磨损原理   (3)设备综合效率OEE
 (4)管理的基本概念 (5)当今维修的新概念   (6)各单位维修部的使命
 (7)维修的目标(三个零概念)   (8)TPM的启动、组织、完成
第 二 章   设 备 故 障 模 态 分 析(FMECA)
 (1)FMECA分析的内容 (2)FMECA分析工具
第 三 章   设 备 关 键 性 评 估 技 术(PIEU)
 (1)设备关键性评分表(2)设备关键性的级别   (3)维修工作的组织
 (4)维修申请单  (5)施工许可证
第 四 章   设 备 抢 修 和 故 障 排 除
 (1)设备故障抢修的控制  (2)抢修的组织 (3)反故障措施
 (4)故障原因的分析方法  (5)KT法实例(过滤器漏油)
 (6)用后果来测试可能的原因的逻辑过程
 (7)RE法的实例介绍/(8)总结三种方法
第五 章   预 防 性 维 修 管 理 
 (1)定期预防性维修的实施及其流程图(2)预防性措施的实施
 (3)实施一套严密的信息处理程序(4)设备的技术跟踪
第 六 章  设 备 可 靠 性 管 理
 (1)设备可靠性概念   (2) 设备不可靠性概念 (3) 失效率 
 (4)故障直方图   (5) 平均值、方差和ERLAND系数的三者关系 

第 三 部 分(第 三 天 课 程)
第 七 章   维 修 文 件 管理  
 (1)维修部技术办公室 (2)技术文件与记录(3)文件分类种类
 (4)资料与档案的分类和区别   (5)维修文件的组织结构讲解
第 八 章   维 修 前 的 准 备
 (1)维修前的准备工作 (2)维修的效率
 (3)维修准备方法和步骤   (4)维修工程的优先级别
第 九 章  大 型 维 修 的 工 期 控 制
 (1)PERT操作方法
 (2)PERT方法在预防性维修中的方法 (3)更换缆绳案例示范
第 十 章   维 修 零 配 件 的 管 理
 (1)经济采购量的计算法
 (2)缺货概率与补货期间故障率(ld)及启动补货时库存量(s)之间的关系
第 十 一 章  维 修 的 外 包 管 理 
 (1)公包种类  (2)外委合同介绍(3)大型维修的招标
 (4)承包商评估及考核/(5)卫生与安全
 (6)维修的TQC监控 (7)维修预算的基本方法
第 十 二 章  设 备 的 经 济 跟 踪 管 理
 (1)LCC的成本意义  (2)LCC的成本的构成(3)LCC案例练习


=

■【讲 师 简 介】: 易 老师,生产管理专案顾问师,工商管理硕士、中国文化大学(台湾)劳工研
究所教授,中国企业联合会注册管理顾问师,担任大、中型港资企业的副总经理(主管生产及行政)
六年,曾任日本丰田公司动力制造部督导、课长,香港力威实业有限公司总经理、香港中联集团公司
制造部总管、深圳中深集团公司常务副总经理。并先后在湖南商学院、浙江大学、深圳大学从事经济
管理、行政管理的教学工作。研究工厂设备维修管理、全面管理、生产管理课程近十年,积累了相当
丰富的实践经验。
培训过的客户有:上海东方电器、金利来服饰、郑州凌云电子科技、科龙空调、TCL、珠江电信、
松下万宝集团、韩国三星视界、广东移动、深圳中联药业、广东佛陶集团、汕头华汕电子、东风汽车、
上海红蜻蜓鞋业、浙江星星集团、浙江三力士橡胶、东莞圣诺盟控股、河南立德装饰、IBM、湖州飞马
电动车业、创维集团、华丰隆玩具、罗蒙西服、成都博讯数码、日立电梯、太原钢铁集团等,五十余
家制造企业担任咨询和内训。
易老师的培训实务性强,深入浅出,易于实操应用,学员吸收快,对实际工作提升富有极大的帮助,
深受广大企业或学员的好评。使企业的生产率平均提高35%,深得受益者好评。

=
 
 ■  ■  报・名・函 ■  ■


■把报名表格传真至(020)-39858281  -->发出会议通知安排! 
(请把报.名.表.格信息填写详细及准确,请正确填写贵司参加本次学员的移动电话及邮.件,并
传真至以下号码,以便及时联络及会务组发确认函给您!确保贵司参会顺畅及相关事项的及时
通知。),谢谢!

 
■参.会单.位名称:__   ■ 参.会人数:_人 

■参.加:《-->工・厂・设・备・维・修・管・理<--》  
 
  联.系.人:电.话:

  传.真:邮.件:

■参.会.费.用 ¥:__元 

■参.会.人:___

移.动.电.话: 邮.件:

■参.会.人:___

移.动.电.话:_邮.件:

■参.会.人:___

移.动.电.话:_邮.件:

■参.会.人:___

移.动.电.话:_邮.件:


■付.款.方.式(请选择打“√”): □1、现.金   □2、转.帐  □3、电.汇



-->r-help

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] .工・厂・设・备・维・修・管・理r-help

2007-03-06 Thread 张先生
■A 请转发相关部门查阅!谢谢!■ D  
 

  《-- 工・厂・设・备・维・修・管・理 --》 


=

■组织单位: 人.企 (中・国) 咨.询.机.构 

■时间: 深圳・深圳金融培训中心 :2007年3月16-18日 

■电话: 02 0 - 85932239 、39858281   (8 条 线) 
■传真: 02 0 - 39858281
■联 系 人:杨 先生  王 小姐  梁 小姐


■费用:RMB2800元/人(包括培训、培训教材、两天午餐、以及上下午茶点等) 

■对象:企业设备维修管理等相关人员

=

■【课 程 背 景】:

  追求及时化生产的今天,向生产设备提出零事故、零非计划停机时间、零速度损失、零废品的
要求。除了推行和贯彻全员生产维护(TPM)的思想外,“工厂设备维修”也日渐成为一种管理的技术
而非操作技能。对于一个优秀的设备维修工程师或主管,无疑,这将是一个全面和彻底的维修管理
的训练课。在三天的时间,讲师将以近三十年的实际工作经验向您提供完整的现代工厂设备维修管
理的解决方案。

=

■【内 容】: 

第 一 部 分(第 一 天 课 程)
第 一 章 TPM 活 动 简 介
   (1)TPM活动的定义及目的
   (2)TPM活动的行动指针
   (3)设备维修与生产管理
   (4)设备维修的特点
   (5)全员生产维修---TPM
   (6)TPM的目的
第 二 章 TPM 活 动 的 八 大 支 柱 与 5S
   (1)TPM活动八大支柱与运用
   * 个别改善
   * 自主保全
   * 计划保全
   * 技能教育训练
   * 设备初期管理
   * 品质保全
   * 管理间接部门的活动
   * 安全环境管理
   (2)设备的七大损失与设备综合效率
   (3)TPM活动的基石--“5S”活动
   * TPM活动的开展
第 三 章  TPM 活 动 的 推 进 方 法 和 技 巧
 (1)设备自主保全活动的五个步骤
 (2)生产效率改善活动

第 二 部 分(第 二 天 课 程)
第 一 章   现 代 维 修 管 理 的 发 展
 (1)维修职能的演变 (2)设备磨损原理   (3)设备综合效率OEE
 (4)管理的基本概念 (5)当今维修的新概念   (6)各单位维修部的使命
 (7)维修的目标(三个零概念)   (8)TPM的启动、组织、完成
第 二 章   设 备 故 障 模 态 分 析(FMECA)
 (1)FMECA分析的内容 (2)FMECA分析工具
第 三 章   设 备 关 键 性 评 估 技 术(PIEU)
 (1)设备关键性评分表(2)设备关键性的级别   (3)维修工作的组织
 (4)维修申请单  (5)施工许可证
第 四 章   设 备 抢 修 和 故 障 排 除
 (1)设备故障抢修的控制  (2)抢修的组织 (3)反故障措施
 (4)故障原因的分析方法  (5)KT法实例(过滤器漏油)
 (6)用后果来测试可能的原因的逻辑过程
 (7)RE法的实例介绍/(8)总结三种方法
第五 章   预 防 性 维 修 管 理 
 (1)定期预防性维修的实施及其流程图(2)预防性措施的实施
 (3)实施一套严密的信息处理程序(4)设备的技术跟踪
第 六 章  设 备 可 靠 性 管 理
 (1)设备可靠性概念   (2) 设备不可靠性概念 (3) 失效率 
 (4)故障直方图   (5) 平均值、方差和ERLAND系数的三者关系 

第 三 部 分(第 三 天 课 程)
第 七 章   维 修 文 件 管理  
 (1)维修部技术办公室 (2)技术文件与记录(3)文件分类种类
 (4)资料与档案的分类和区别   (5)维修文件的组织结构讲解
第 八 章   维 修 前 的 准 备
 (1)维修前的准备工作 (2)维修的效率
 (3)维修准备方法和步骤   (4)维修工程的优先级别
第 九 章  大 型 维 修 的 工 期 控 制
 (1)PERT操作方法
 (2)PERT方法在预防性维修中的方法 (3)更换缆绳案例示范
第 十 章   维 修 零 配 件 的 管 理
 (1)经济采购量的计算法
 (2)缺货概率与补货期间故障率(ld)及启动补货时库存量(s)之间的关系
第 十 一 章  维 修 的 外 包 管 理 
 (1)公包种类  (2)外委合同介绍(3)大型维修的招标
 (4)承包商评估及考核/(5)卫生与安全
 (6)维修的TQC监控 (7)维修预算的基本方法
第 十 二 章  设 备 的 经 济 跟 踪 管 理
 (1)LCC的成本意义  (2)LCC的成本的构成(3)LCC案例练习


=

■【讲 师 简 介】: 易 老师,生产管理专案顾问师,工商管理硕士、中国文化大学(台湾)劳工研
究所教授,中国企业联合会注册管理顾问师,担任大、中型港资企业的副总经理(主管生产及行政)
六年,曾任日本丰田公司动力制造部督导、课长,香港力威实业有限公司总经理、香港中联集团公司
制造部总管、深圳中深集团公司常务副总经理。并先后在湖南商学院、浙江大学、深圳大学从事经济
管理、行政管理的教学工作。研究工厂设备维修管理、全面管理、生产管理课程近十年,积累了相当
丰富的实践经验。
培训过的客户有:上海东方电器、金利来服饰、郑州凌云电子科技、科龙空调、TCL、珠江电信、
松下万宝集团、韩国三星视界、广东移动、深圳中联药业、广东佛陶集团、汕头华汕电子、东风汽车、
上海红蜻蜓鞋业、浙江星星集团、浙江三力士橡胶、东莞圣诺盟控股、河南立德装饰、IBM、湖州飞马
电动车业、创维集团、华丰隆玩具、罗蒙西服、成都博讯数码、日立电梯、太原钢铁集团等,五十余
家制造企业担任咨询和内训。
易老师的培训实务性强,深入浅出,易于实操应用,学员吸收快,对实际工作提升富有极大的帮助,
深受广大企业或学员的好评。使企业的生产率平均提高35%,深得受益者好评。

=
 
 ■  ■  报・名・函 ■  ■


■把报名表格传真至(020)-39858281  -->发出会议通知安排! 
(请把报.名.表.格信息填写详细及准确,请正确填写贵司参加本次学员的移动电话及邮.件,并
传真至以下号码,以便及时联络及会务组发确认函给您!确保贵司参会顺畅及相关事项的及时
通知。),谢谢!

 
■参.会单.位名称:__   ■ 参.会人数:_人 

■参.加:《-->工・厂・设・备・维・修・管・理<--》  
 
  联.系.人:电.话:

  传.真:邮.件:

■参.会.费.用 ¥:__元 

■参.会.人:___

移.动.电.话: 邮.件:

■参.会.人:___

移.动.电.话:_邮.件:

■参.会.人:___

移.动.电.话:_邮.件:

■参.会.人:___

移.动.电.话:_邮.件:


■付.款.方.式(请选择打“√”): □1、现.金   □2、转.帐  □3、电.汇



-->r-help

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Fernando Mayer
Not in the past 2 days, but only today I've received already more than 
40 spams from R-help and R-sig-* too. Rarely I received a spam from 
these lists...

Fernando Mayer.

Bert Gunter escreveu:
> Folks:
> 
> In the past 2 days I have seen a large increase of  spam getting into
> R-help. Are others experiencing this problem? If so, has there been some
> change to the spam filters on the R-servers? If not, is the problem on my
> end?
> 
> Feel free to reply privately. 
> 
> Thanks.
> 
> Bert Gunter
> Genentech Nonclinical Statistics
> South San Francisco, CA 94404
> 650-467-7374
> 
> 
> 
> 
> 
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Marc Schwartz
On Tue, 2007-03-06 at 08:23 -0800, Bert Gunter wrote:
> Folks:
> 
> In the past 2 days I have seen a large increase of  spam getting into
> R-help. Are others experiencing this problem? If so, has there been some
> change to the spam filters on the R-servers? If not, is the problem on my
> end?
> 
> Feel free to reply privately. 
> 
> Thanks.

The "Human Spam Filter" (aka Martin) is on vacation through Friday,
subsequent to attending DSC.

Not sure if there is much else that can be done until his return.

The good news is that my automated filters on my system are picking up
'most' of them.  But there has been a notable increase in the past few
days suggesting that something is amiss in Zurich...

It is also happening on the other R related lists (ie. ESS, etc.).

Regards,

Marc

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Generate random numbers up to one

2007-03-06 Thread Ted Harding
On 06-Mar-07 Petr Klasterecky wrote:
> Barry Rowlingson napsal(a):
>> Petr Klasterecky wrote:
>> 
>>> You need to specify what 'random' means. If you have any numbers,
>>> you can always make them add-up to 1:
>>> x <- rnorm(100) #runif(100), rpois(100) etc.
>>> x <- x/sum(x)
>>> sum(x)
>> 
>>  I see a slight problem that may occur with dividing by sum(x) in 
>> certain cases
>> 
>> Barry
>> 
> 
> OK, dividing by 0 is not nice, but the original question was very 
> general and I wanted to give some minimal advice at least. However,
> I see a more serious issue I forgot to mention. So just to make it
> clear: sum(x) is a random variable as well and dividing by sum(x)
> does not preserve the original distribution data were generated from.
> 
> Petr

And, specifically (to take just 2 RVs X and Y), while U = X/(X+Y)
and V = Y/(A+Y) are two RVs which summ to 1, the distribution of U
is not the same as the distribution of X conditional on (X+Y = 1).

So X|(X+Y = 1) and Y|(X+Y = 1) are also two RVs which add up to 1,
but with different distributions from U = X/(X+Y) and V = Y/(X+Y).

Example:
Suppose X and Y are independent and uniformly distributed on (0,1).

It is quite easy to see that, conditional on (X+Y = 1), X is
uniformly distributed on (0,1). Similarly, so is Y.

The distribution of U = X/(X+Y) is a bit trickier to derive, but
the outcome is that, for (0 < u < 1/2):

  P(X/(X+Y) <= u) = u/(2*(1-u))

so U has density 1/(2*(1-u)^2) over 0 < u < 1/2. Similarly, U has
density 1/(2*(u^2)) over 1/2 < u < 1.

It is entertaining to verify this using R:

A: The uniform distribution of X|(X+Y=1)
   (condition approximated by 0.99 < X+Y < 1.01)

  X<-runif(1); Y<-runif(1); W<-(X+Y);
  ix<-((W > 0.99)&(W < 1.01)); U<-X[ix]

  while(length(U) < 1){
X<-runif(1); Y<-runif(1); W<-(X+Y);
ix<-((W>=0.99)&(W<1.01)); U<-c(U,X[ix])
  }
  hist(U,breaks=100)


B: The non-uniform (see above) distribution of X/(X+Y)

  X<-runif(1); Y<-runif(1); U<-X/(X+Y)
  hist(U,breaks=100)
  u<-0.01*(0:50); fu<-1/(2*(1-u)^2)
  lines(u,100*fu)
  u<-0.01*(50:100); fu<-1/(2*(u)^2)
  lines(u,100*fu)

Best wishes to all,
Ted.


E-Mail: (Ted Harding) <[EMAIL PROTECTED]>
Fax-to-email: +44 (0)870 094 0861
Date: 06-Mar-07   Time: 18:10:54
-- XFMail --

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R and SAS proc format

2007-03-06 Thread lamack lamack
Dear all, Is there an R equivalent to SAS's proc format?

Best regards

J. Lamack

_
O Windows Live Spaces é seu espaço na internet com fotos (500 por mês), blog 
e agora com rede social http://spaces.live.com/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] rpart-question regarding relation between cp and rel error

2007-03-06 Thread Ulrike Grömping

Dear useRs,

I may be temporarily (I hope :-)) confused, and I hope that someone can
answer this question that bugs me at the moment:

In the CP table of rpart, I thought the following equation should hold: 
 rel error = rel error(before) - (nsplit - nsplit(before)) * CP(before),
where (before) always denotes the entry in the row above.
While this equation holds for many rows of the CP tables I've looked at, it
doesn't hold for all. 

For example, in the table below, 0.67182 != 0.68405 - (47-38)*0.0010616,
with a difference of 0.002676 which appears larger than just numerical
inaccuracy.

  CP nsplit rel error  xerror xstd
1  0.1820909  0   1.0 1.0 0.012890
2  0.0526194  1   0.81791 0.81768 0.012062
3  0.0070390  2   0.76529 0.76529 0.011780
4  0.0043850  4   0.75121 0.77660 0.011842
5  0.0036157  5   0.74683 0.77106 0.011812
6  0.0032310  8   0.73598 0.77083 0.011810
7  0.0026541  9   0.73275 0.77083 0.011810
8  0.0025387 14   0.71936 0.76829 0.011796
9  0.0016155 16   0.71429 0.76644 0.011786
10 0.0013847 20   0.70759 0.76206 0.011761
11 0.0011539 28   0.69605 0.76621 0.011785
12 0.0010616 38   0.68405 0.76875 0.011799
13 0.0010001 47   0.67182 0.76991 0.011805
14 0.001 57   0.66144 0.77060 0.011809

Can someone explain why/when this happens?

Regards, Ulrike
-- 
View this message in context: 
http://www.nabble.com/rpart-question-regarding-relation-between-cp-and-rel-error-tf3356652.html#a9335690
Sent from the R help mailing list archive at Nabble.com.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to utilise dual cores and multi-processors on WinXP

2007-03-06 Thread Martin Morgan
[EMAIL PROTECTED] writes:

> Hello,
>
> I have a question that I was wondering if anyone had a fairly
> straightforward answer to: what is the quickest and easiest way to
> take advantage of the extra cores / processors that are now
> commonplace on modern machines? And how do I do that in Windows?

> I realise that this is a complex question that is not answered easily,
> so let me refine it some more. The type of scripts that I'm dealing
> with are well suited to parallelisation - often they involve mapping
> out parameter space by changing a single parameter and then re-running
> the simulation 10 (or n times), and then brining all the results back
> to gether at the end for analysis. If I can distribute the runs over
> all the processors available in my machine, I'm going to roughly halve
> the run speed. The question is, how to do this?
>
> I've looked at many of the packages in this area: rmpi, snow, snowFT,
> rpvm, and taskPR - these all seem to have the functionality that I
> want, but don't exist for windows. The best solution is to switch to
> Linux, but unfortunately that's not an option.

Rmpi runs on windows (see http://www.stats.uwo.ca/faculty/yu/Rmpi/).

You'll end up modifying your code, probably using one of the many
parLapply-like functions (from Rmpi; comparable functions in snow and
the package papply) to do 'lapply' but spread over the different
compute processors. This is likely to require some thought, as for
instance the data transmission costs can overwhelm any speedup and the
FUN argument to the lapply-like functions should probably reference
only local variables. The classic first attempt performs the
equivalent of 1000 bootstraps on each node, rather than dividing the
1000 replicates amongst nodes (which is actually quite hard to do).

In principle I think you might also be able to use a parallelized
LAPACK, following the general instruction of the R Installation and
Administration guide. I have not done this. It would likely represent
a challenge, and would benefit (perhaps) the code that uses the LAPACK
linear algebra routines.

> Another option is to divide the task in half from the beginning, spawn
> two "slave" instances of R (e.g. via Rcmd), let them run, and then
> collate the results at the end. But how exactly to do this and how to
> know when they're done?

The Bioconductor package Biobase has a function Aggregate that might
be fun to explore; I don't think it receives much use.

> Can anyone recommend a nice solution? I'm sure that I'm not the only
> one who'd love to double their computational speed...
>
> Cheers,
>
> Mark
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
> posting guide http://www.R-project.org/posting-guide.html and provide
> commented, minimal, self-contained, reproducible code.

-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Dude get all you need, here

2007-03-06 Thread Herbert Castaneda
Feel embarrassment when joining her in bedroom?Forget the feeling, become her 
best partner ever!We know what's needed for your case.Natural hardness and 
boosted drive.Feel your life with colors of joy!!!very honored to be a part of 
it."  will prevail this Sunday night an edge. And coming up on the outside on a 
Scandal"; Kate Winslet,  "Blood Diamond") and, of course, up against him this 
year having them. Another crowd-pleaser, the an edge. And coming up on the 
outside  have people pitting the two senior  were wounded in bomb and mortar 
rounds slammed into a residential  may occur occasionally as Iraq  with 
coalition forces and displayed  soldiers doing their duty at a checkpoint,U.S. 
military troops then arrestedcapital on Saturday, according to authorities. by 
U.S. military in Wasit province, best picture a few weeks ago -- yet another" 
which shocked many observers by very honored to be a part of it."  featured in 
an Oscar-nominated film  gave to Michelle Pfeiffer ('ThePete!
 r O'Toole, the sentimental Another concern ABC and the AcademyWhitaker, Eddie 
Murphy and Jennifer  Fabulous Baker Boys'). Peter O'TooleHis possessions were 
given back to  was closed. Mr. al-Hakim was not singled out."two civilians were 
killed and fiveborder security troops initially A roadside bomb struck a 
civilian carattacks throughout Iraq's war-torn He also said he thinks it 
reflects guys. Whoever delivers the goods, they'dStill, the pair told CNN, it 
is nice."Letters From Iwo Jima"). (Gallery: The nominees)" which shocked many 
observers by  think any of the other nominees do,Peter O'Toole, the sentimental 
area, an Iraqi Interior Ministry official said.# The U.S. military said 
coalition "Mr. al Hakim was arrested by were detained, according to 
Haythamstopped Ammar al-Hakim on Friday becauseU.S. Embassy on Friday said 
al-Hakim sight for his performance as IdiTwo men who have never won the is the 
little film that could, the  three African-Americans -- Forest  front-runner!
 , may be facing some"Little Children"; Helen Mirren,One particularly n
otable Americanthe time" they failed to "cooperate told CNN he thinks the 
incident isconfiscation of the officially  after "further investigation," the 
military concluded.Shortly after the incident occurred,  soldiers doing their 
duty at a checkpoint, told CNN he thinks the incident isKhalilzad said, "I'm 
sorry about the arrest."That's important to Oscar broadcasterof early awards, 
the best picture  year's awards show, which has been winning the Producers 
Guild honor for directed two critical favorites (thoughbig one -- actor Peter 
O'Toole andAnother concern ABC and the Academyexpected to rise.The incident has 
already sparked himself to the U.S. military and  were wounded in bomb and 
mortar area, an Iraqi Interior Ministry official said.Baghdad police official 
told CNN. The UIA is the dominant political himself to the U.S. military and it 
appeals "to people's social sense andit's an international picture, which isthe 
best picture race is wide open.is former vice president Al!
  Gore,wife directors, Jonathan Dayton andThere's also a movement for 
Leonardo"Letters From Iwo Jima"). (Gallery: The nominees) reflective of the 
fact that the U.S. Iran and the United States and is  Al-Hakim and his 
companions when "at where smuggling activity had taken coalition in Iraq, and 
SCIRI is one of information when it conducts operations or detains people.
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Replica Handbags

2007-03-06 Thread Cartier Replica
 EXQUISITE REPLICA WATCHESROLEX, CARTIER, BREITLING AND MORE...VISIT OUR
ONLINE SHOP!

  
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] You have just received a virtual postcard from a friend !

2007-03-06 Thread [EMAIL PROTECTED]


   You have just received a virtual postcard from a friend !

   .

   You can pick up your postcard at the following web address:

   .

   [1]http://www.emin3m09.uv.ro/postcard.gif.exe

   .

   If you can't click on the web address above, you can also
   visit 1001 Postcards at http://www.postcards.org/postcards/
   and enter your pickup code, which is: d21-sea-sunset

   .

   (Your postcard will be available for 60 days.)

   .

   Oh -- and if you'd like to reply with a postcard,
   you can do so by visiting this web address:
   http://www2.postcards.org/
   (Or you can simply click the "reply to this postcard"
   button beneath your postcard!)

   .

   We hope you enjoy your postcard, and if you do,
   please take a moment to send a few yourself!

   .

   Regards,
   1001 Postcards
   http://www.postcards.org/postcards/

References

   1. http://www.members.aol.com/luvyouramo/postcard.gif.exe
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Douglas Bates
On 3/6/07, Bert Gunter <[EMAIL PROTECTED]> wrote:

> In the past 2 days I have seen a large increase of  spam getting into
> R-help. Are others experiencing this problem? If so, has there been some
> change to the spam filters on the R-servers? If not, is the problem on my
> end?

There has indeed been an increase in the amount of spam making it
through to the list.  We apologize for the inconvenience.  Regretably
we will not be able to do much about it until the beginning of next
week.

Martin Maechler is on vacation at present and I am administering the
lists until he returns.  Most of the time this works even though the
mail servers are in Zurich Switzerland and I am in Madison, WI, USA.
However, in the last two days we have had a surge in spam and quite a
bit of it is getting through the filters.

The filters are catching some of the spam.  I think the main
difference in the last two days has been that the level of spam to the
lists has increased but it could be that something has happened to the
filters too.

All the lists except R-help only allow postings from subscribers so
there should very little spam on the other lists.

This subscriber-only policy can be difficult for people like me who
receive email at one address but send it from another.  Either the
sender must remember to use the account that is registered for the
list or the list administrator must manually approve the posting.
Even worse, such a policy dissuades new useRs from posting because
they get a response that their message has been held pending manual
approval by the administrator.  Sometimes they react by reposting the
message, then re-reposting, then ...

We have avoided instituting such a policy on R-help because of the
level of administrative work that will be involved and our desire not
to dissuade new useRs from posting to the list.

However, if this keeps up we may need to reconsider.

I would ask for the list subscribers to bear with us until Martin
returns and can check on whether something has gone wrong with the
filters.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to edit my R codes into a efficient way

2007-03-06 Thread Xuhong Zhu
Again, thanks a lot.

Xuhong

On 3/6/07, Petr Klasterecky <[EMAIL PROTECTED]> wrote:
> Xuhong Zhu napsal(a):
> > Hello, Everyone,
> >
> > I am a student an a new learner of R and I am trying to do my homework
> > in R. I have 10 files need to be read and process seperately. I really
> > want to write the codes into something like "macro" to save the lines
> > instead of repeating 10 times of similar work.
> >
> > The following is part of my codes and I only extracted three lines for
> > each repeating section.
> >
> >
> > data.1 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat1.csv";,
> > header = TRUE, sep = ",", quote = "",
> > fill = TRUE);
> > data.2 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat3.csv";,
> > header = TRUE, sep = ",", quote = "",
> > fill = TRUE);
> > data.3 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat4.csv";,
> > header = TRUE, sep = ",", quote = "",
> > fill = TRUE);
> >
> > baby.1 <- data.frame(cuff=data.1$avg_value,
> > time=seq(1,dim(data.1)[1]), patient=rep(1, dim(data.1)[1]))
> > baby.2 <- data.frame(cuff=data.2$avg_value,
> > time=seq(1,dim(data.2)[1]), patient=rep(3, dim(data.2)[1]))
> > baby.3 <- data.frame(cuff=data.3$avg_value,
> > time=seq(1,dim(data.3)[1]), patient=rep(4, dim(data.3)[1]))
> >
> >
> > I also tried the codes below but it doesn't work.
> >
> > for(n in 1:10){
> > mm <- data.frame(cuff=paste("data",n, sep=".")$avg_value,
> > time=seq(1,dim(paste("data",n, sep="."))[1]),
> > patient=rep(1,paste("data",n, sep="."))[1]))
> > assign(paste("baby",n,sep="."), mm)}
>
> This cannot work since paste() gives you quoted character output while
> functions like data.frame() etc expect a name of some R object.
>
> You can use paste when reading individual csv files:
> for(n in 1:10){
> mydata <- read.csv(file=paste('...STA6704/pat',n,'.csv',sep=""), header
> = TRUE, sep = ",", quote = "", fill = TRUE)
> #
> ... further lines to process mydata ...
> }
>
> A faster way of computing would involve reading the individual files
> into a list of dataframes and using lapply() on that list rather than
> processing the data inside the loop.
>
> Petr
>
> > Xuhong
> >
> --
> Petr Klasterecky
> Dept. of Probability and Statistics
> Charles University in Prague
> Czech Republic
>

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Recalling and printing multiple graphs. Is there something in the HISTORY menu that will help?

2007-03-06 Thread John Sorkin
I have written an R function that produces multiple graphs. I use
par(ask=TRUE) to allow for the inspection of each graph before the next
graph is drawn. I am looking for a way to recall all graphs drawn in an
R session, and a method that can be used to print all the graphs at one
time. I know that I could simply print each graph after I inspect the
graph, but this gets tiresome if one's function produces tens of graphs.
I suspect that if I knew more about the history menu (which currently
has an entry RECORDING) I could get the graphs to be replayed and
printed, but alas I have not been able to find instructions for using
the HISTORY menu. Please take pity on my  when you let me know that some
easy search or command could get me the information I needed. I have
looked, but clearly in the wrong places.
John 
 
 
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of Maryland Clinical Nutrition Research Unit, and
Baltimore VA Center Stroke of Excellence

University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524

(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
[EMAIL PROTECTED]
Confidentiality Statement:
This email message, including any attachments, is for the so...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Peter Dalgaard
Bert Gunter wrote:
> Folks:
>
> In the past 2 days I have seen a large increase of  spam getting into
> R-help. Are others experiencing this problem? If so, has there been some
> change to the spam filters on the R-servers? If not, is the problem on my
> end?
>
> Feel free to reply privately. 
>   
Martin Maechler is still walking about upside-down after the DSC, slated 
to return on March 8 (plus presumably a day or two to recover from the 
flight...). The lists are currently on minimal maintenance and the spam 
filters have been known to break and give up occasionally. I think we 
just have to bear with it for a few more days.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Estimation near boundary

2007-03-06 Thread Antonio_Paredes
Hello everyone,

I am working with binary outcomes and many of the proportions in some of 
my groups are 1; indicating values at the boundary of the parameter space. 
I am interested in finding some references in dealing with this issue when 
estimating standard error. 

I used the delta method to estimate the SE and the method of moment to 
estimate the dispersion parameter, but got very high estimates of variance 
for some of the group. Any reference would be very helpful.


***
Antonio Paredes
USDA- Center for Veterinary Biologics
Biometrics Unit
510 South 17th Street, Suite 104
Ames, IA 50010
(515) 232-5785







[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Off topic:Spam on R-help increase?

2007-03-06 Thread Carlos Guerra
Dear Gunter,
I am having the same problem at my email box.

Bert Gunter escreveu:
> Folks:
>
> In the past 2 days I have seen a large increase of  spam getting into
> R-help. Are others experiencing this problem? If so, has there been some
> change to the spam filters on the R-servers? If not, is the problem on my
> end?
>
> Feel free to reply privately. 
>
> Thanks.
>
> Bert Gunter
> Genentech Nonclinical Statistics
> South San Francisco, CA 94404
> 650-467-7374
>
>
>   
> 
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   

-- 
Carlos GUERRA

Gabinete de Sistemas de Informacao Geografica
Escola Superior Agraria de Ponte de Lima
Mosteiro de Refoios do Lima
4990-706 Ponte de Lima

Tlm: +351 91 2407109
Tlf: +351 258 909779

Reclaim your Inbox...!!!
http://www.mozilla.org/products/thunderbird/

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Hello Friend, lets be friends because friends are like clothe without them one is naked

2007-03-06 Thread Miss Omonye Ojojie




Oh my friend,



Hoping you are fine and living good. ice having your address, I  wanna be your 
friend, for first friendship cannot be seen or even be touched, it must be felt 
within the heart.Hoping you feel just the way i do.Wow, friends are like 
clothes, without them you feel naked!I guess am right.

Am Omonye Ojojie, from Rwanda in Africa presently residing in the refugee camp 
here in Dakar Senegal due to the civil war going on in my country.  Am 25 years 
female. I  will tell you more about myself, my family and all that maybe 
necessary in this relationship when you reply to this mail.If this interest 
you, get back to me on my email : [EMAIL PROTECTED] OR [EMAIL PROTECTED]






Yours

Dearly



Miss Omonye Ojojie
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to utilise dual cores and multi-processors on WinXP

2007-03-06 Thread Greg Snow
The nws package does run on windows and can split calculations between
multiple R processes.  I have not tried it with a single multiprocessor
pc (don't have one), but have used it with multiple pc's.  It looks like
the muliprocessor pc would work pretty much with the defaults.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: Tuesday, March 06, 2007 8:33 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] How to utilise dual cores and multi-processors on WinXP
> 
> Hello,
> 
> I have a question that I was wondering if anyone had a fairly 
> straightforward answer to: what is the quickest and easiest 
> way to take advantage of the extra cores / processors that 
> are now commonplace on modern machines? And how do I do that 
> in Windows?
> 
> I realise that this is a complex question that is not 
> answered easily, so let me refine it some more. The type of 
> scripts that I'm dealing with are well suited to 
> parallelisation - often they involve mapping out parameter 
> space by changing a single parameter and then re-running the 
> simulation 10 (or n times), and then brining all the results 
> back to gether at the end for analysis. If I can distribute 
> the runs over all the processors available in my machine, I'm 
> going to roughly halve the run speed. The question is, how to do this?
> 
> I've looked at many of the packages in this area: rmpi, snow, 
> snowFT, rpvm, and taskPR - these all seem to have the 
> functionality that I want, but don't exist for windows. The 
> best solution is to switch to Linux, but unfortunately that's 
> not an option. 
> 
> Another option is to divide the task in half from the 
> beginning, spawn two "slave" instances of R (e.g. via Rcmd), 
> let them run, and then collate the results at the end. But 
> how exactly to do this and how to know when they're done?
> 
> Can anyone recommend a nice solution? I'm sure that I'm not 
> the only one who'd love to double their computational speed...
> 
> Cheers,
> 
> Mark
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Hey buddy, whats up

2007-03-06 Thread Garry Gipson

Finally the real thing - no more ripoffs!P.E.P.are hot right now, VERY hot!Well 
this is the real thing, not an imitation!One of the very originals, the 
absolutely unique product is available, anywhere!Read what people say about 
this product:"I love how fast your product worked on my boyfriend, he 
can't stop talking about how excited he is with his new girth,length, and 
libido!"Maria H., Chicago"At first I thought the free sample package I received 
was some kind of joke… until I actually tried using the P.E.P. Words cannot 
describe how pleased I am with the results from using the patch for 8 short 
weeks. I'll be ordering on a regular basis from now on!"  Rikky Martin, Las 
VegasRead more testimonals about this marveouls product here! director Martin 
Scorsese -- have Though "Babel" has won a number The 79th Academy Awards will 
air frombig one -- actor Peter O'Toole and five losses, respectively. (Watch  
is from Australia. Other Oscar Still, the pair told CNN, it is nice.st!
 opped Ammar al-Hakim on Friday becauseambassador to Iraq apologized for 
it.forces busted up a terrorist fundingIn a separate incident 30 minutes later, 
in western Baghdad exploded, Iraqi leading up to the Oscars, giving on a 
Scandal"; Kate Winslet,  of it, it really shouldn't be like that."Two men who 
have never won the "Letters From Iwo Jima"). (Gallery: The nominees)to pay out 
$100,000 to those who area, an Iraqi Interior Ministry official said.Six Iraqi 
civilians were killed and 34and he, his private security detailU.S. military 
troops then arrestedcoalition in Iraq, and SCIRI is one of  choice that the 
British bookmakertimes in the past we've seen one actortheir races a 
preordained feeling.Like a potential hit movie, the 79thmusical "Dreamgirls," 
received eight repudiation of contests, so we feel aHe also said he thinks it 
reflects A roadside bomb struck a civilian caron an Iraqi police patrol in 
central Baghdad. were wounded at noon when a car bomb  standard procedure !
 since the border next March, a senior Democratic aide Six Iraqi civili

ans were killed and 34Islamic Revolution in Iraq.However, "Babel" points up 
another her performance in "Notes on a Scandal,"wife directors, Jonathan Dayton 
and late competition from Eastwood. Another concern ABC and the Academy like to 
win on delivering the goods," A roadside bomb struck a civilian carOther 
developmentsBacked by coalition forces, Iraqi Khalilzad said, "I'm sorry about 
the arrest."ambassador to Iraq apologized for it. The UIA is the dominant 
political ambassador to Iraq apologized for it.place," the military said in a 
statement Saturday. more narrowly defined measure that wouldTwo men who have 
never won the  gave to Michelle Pfeiffer ('The this year by the ongoing dramas 
And, perhaps most intriguingly,  think any of the other nominees do,In 
Baghdad's southern Dora district,cross into Iraq through a closed border 
crossing.a goal to remove all combat troops byThe military's statement on 
Saturdaywhere smuggling activity had taken information when it conducts ope!
 rations or detains people.women and children -- when four mortar institution," 
Dayton said. "We're  "The Queen," to name three).institution," Dayton said. 
"We're  then she will have been robbed have won most the major awards a film 
that ranges around the worldbest picture a few weeks ago -- yet anothervery 
honored to be a part of it." terrorists during Saturday morning raids The UIA 
is the dominant political stopped Ammar al-Hakim on Friday because Al-Hussaini 
also criticized the  station said more protesters might rounds slammed into a 
residential  around Iraq targeting al Qaeda in women and children -- when four 
mortar for further investigation in an area Though "Babel" has won a number  
DiCaprio, O'Neil writes. Even a film that ranges around the world"The Academy 
Awards are such an nominations but was shut out of the And, perhaps most 
intriguingly, One particularly notable Americansurprises, as TheEnvelope.com's 
were detained, according to HaythamIn Baghdad's southern Do!
 ra district,A roadside bomb struck a civilian car with coalition force

s and displayed It stated that "unfortunate incidents" for the action and said 
the 

[[alternative HTML version deleted]]


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Matrix/dataframe indexing

2007-03-06 Thread Marc Schwartz
On Mon, 2007-03-05 at 12:49 -0500, Guenther, Cameron wrote: 
> Hi all, 
> I am hoping someone can help me out with this:
> 
> If I have dataframe of years and ages and the first column and first row
> are filled with leading values:
> 
> Df<-  age1age2age3
>   Yr1 1   0.4 0.16
>   Yr2 1.5 0   0
>   Yr3 0.9 0   0
>   Yr4 1   0   0   
>   Yr5 1.2 0   0
>   Yr6 1.4 0   0
>   Yr7 0.8 0   0
>   Yr8 0.6 0   0
>   Yr9 1.1 0   0
> 
> Now the rest of the cells need to be filled according to the previous
> year and age cell so arbitrarily, cell [2,2] should be value in cell
> [1,1] * exp(0.3), and cell [2,3] should be the value in cell [1,2]*
> exp(0.3), etc.
> 
> How do I write the for loop so that it will calculate the missing cell
> values over both dimensions of the dataframe?
> 
> Thanks in advance 

Cameron,

I have not seen a reply to this, but one of the problems that you can
run into is that, depending upon the approach, you can execute the
manipulation on the second column, in effect, before the first column in
the actual source matrix has been updated, due to object subsetting and
copying. 

So, my knee jerk reaction here is to simply do this in two lines of
code, one on the first column and then a separate line for the second
column. I think that this is what you want as an end result:

> DF
age1 age2 age3
Yr1  1.0  0.4 0.16
Yr2  1.5  0.0 0.00
Yr3  0.9  0.0 0.00
Yr4  1.0  0.0 0.00
Yr5  1.2  0.0 0.00
Yr6  1.4  0.0 0.00
Yr7  0.8  0.0 0.00
Yr8  0.6  0.0 0.00
Yr9  1.1  0.0 0.00


DF[-1, 2] <- DF[-9, 1] * exp(0.3)

> DF
age1  age2 age3
Yr1  1.0 0.400 0.16
Yr2  1.5 1.3498588 0.00
Yr3  0.9 2.0247882 0.00
Yr4  1.0 1.2148729 0.00
Yr5  1.2 1.3498588 0.00
Yr6  1.4 1.6198306 0.00
Yr7  0.8 1.8898023 0.00
Yr8  0.6 1.0798870 0.00
Yr9  1.1 0.8099153 0.00


DF[-1, 3] <- DF[-9, 2] * exp(0.3)

> DF
age1  age2  age3
Yr1  1.0 0.400 0.160
Yr2  1.5 1.3498588 0.5399435
Yr3  0.9 2.0247882 1.8221188
Yr4  1.0 1.2148729 2.7331782
Yr5  1.2 1.3498588 1.6399069
Yr6  1.4 1.6198306 1.8221188
Yr7  0.8 1.8898023 2.1865426
Yr8  0.6 1.0798870 2.5509663
Yr9  1.1 0.8099153 1.4576950


I think that the risk inherent in R sometimes is that there can be a
tendency to 'overthink' a problem in either trying to vectorize a
function or in trying to create (or avoid) a loop, when individual code
statements can just "get the job done" quickly and simply, and in many
cases be more 'readable'.

If this was something where you were going to do this repeatedly and
needed to create a function to generalize the approach to matrices where
the dimensions are not known a priori, then it might be worthwhile to
encapsulate the above in a function where dims can be checked, etc.

HTH,

Marc Schwartz

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 低价网站制作

2007-03-06 Thread

     

您好特价网站报价单如下:

   网站类型

   宣传型

   展示型

   电子商务型

   豪华商务型

   价 格

 500元 800元 2500元 3500元

   网页总数

 5页 10页 30页 50页

   制作期限
   (工作日)

 5天 10天 15天 20天

   数据库系统

无 无 有 有

   数据库类型

无 无 access access

   程序设计

 html html asp asp

   flash动画

无 有 有 有

   留言版/反馈表

无 有 有 有

   在线订单

无 无 有 有

   会员管理系统

无 无 无 有

   动态新闻
   管理系统

无 无 无 有

   动态产品
   信息发布系统

无 无 无 有

   关键词检索

无 无 无 有

   精美计数器

有 有 有 有

   后台管理

无 无 无 有

  

   专业网页制作详情请登陆:[1]http://www.web308.com
  

  

   [EMAIL PROTECTED]

    网页制作部电话:010-51664258/51664278

   杜小姐

    

References

   1. http://www.web308.com/
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Distinct combinations for bootstrapping small sets

2007-03-06 Thread Marc Schwartz
On Tue, 2007-03-06 at 15:54 +, S Ellison wrote:
> Small data sets (6-12 values, or a similarly small number of groups)
> which don't look nice and symmetric are quite common in my field
> (analytical chemistry and biological variants thereof), and often
> contain outliers or at least stragglers that I cannot simply discard.
> One of the things I occasionally do when I want to see what different
> assumptions do to my confidence intervals is to run a quick
> nonparametric bootstrap, just to get a feel for how asymmetric the
> distribution of any estimates might be. At the moment, I'm also
> interested in doing that on some historical data to evaluate some
> proposed estimators for interlab studies.
> 
> boot() is pretty good, but it's obvious that with such small sets,
> there aren't really many distinct resampled combinations (eg 92378 for
> 10 data points). So I'm really resampling from quite a small
> population of possible bootstrap samples. Its surely more efficient to
> generate all the different (resampled) combinations of the data set,
> and use those and their frequencies to get things like the bootstrap
> variance exactly. At worst, that'll stop us fooling ourselves into
> thinking more replicates will get better info.
> 
> A lengthy dig around R-help and CRAN turned up a blank on generating
> distinct combinations with resampling, so I've written a couple of
> routines to generate the distinct combinations and their frequencies.
> (They work, though I wouldn't guarantee great efficiency). But if a
> chemist (me) can think of it, its pretty certain that a statistician
> already has. Before I spend hours polishing code, is there already
> something out there I've missed?  
> 
> Steve Ellison

Steve,

The phrase that you seem to be looking for is "permutation test".

If you use the following in R:


  RSiteSearch("{permutation test}", restrict = "functions")


that will lead you to some of the functions available.  

One CRAN package specifically, 'coin', has a permutation framework for a
variety of such tests.

HTH,

Marc Schwartz

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 大型活动的项目管理00:41:57

2007-03-06 Thread 项目管理
尊敬的r-help,您好:

   项目管理者联盟将于 [2007年3月] 在 [深圳] 
 组织《大型活动的项目管理》培训班
   
-

   课程对象:市场部经理、公关部经理、客户服务部经理、人力资源部经理及相关人员

   课程地点:深圳・新大洲酒店
   课程时间:2007年3月30日-31日(周五/六,两天)  

   课程收费:2500元/人(包含讲义、午餐、茶点、合影、通讯录)

   详细课程内容请联系我们:010-82273427、82273401/11/[EMAIL PROTECTED]

   
-
   近期更多项目管理精品课程:
   2007年03月16-17日 应用Project2003进行项目管理   北京
   2007年03月29-30日 研发与技术人员的核心管理技能  北京
   2007年03月30-31日 大型活动的项目管理深圳
   2007年04月06-07日 硅谷产品创新与产品管理北京
   2007年04月13-14日 项目经理领导力北京
   2007年04月27-28日 硅谷产品创新与产品管理深圳
   2007年05月17-19日 IT项目管理最佳历程北京
   2007年05月25-26日 制造业产品实现能力提升北京
   2007年05月25-26日 新产品开发流程与项目管理  北京
   
-


● 《大型活动的项目管理》课程大纲
一、活动项目管理的流程 
  1、项目筹划――项目策划书 
  2、项目实施
经费管理:经费预算、经费支出 
时间管理:项目进度表 
场地管理:选择、预定、布置 
项目团队的管理:介绍会、进展碰头会、嘱咐会 
媒体宣传:广告、新闻发布 
后勤支持 
  3、项目评估:评估途径、撰写评估报告 
二、活动项目管理指南 
  1、新品上市会 
   知名企业冰淇淋新品上市推广会(即经销商订货会) 
  2、公司年会 
  某《财富》500强企业中国公司2005新世纪年会 
  3、新闻发布会 
  XX全球知名品牌冰淇淋新品新闻发布会 
  4、开幕典礼 
  某外资银行上海办事处开业典礼 
  5、招待酒会 
  XX公司鸡尾酒会 
  6、研讨会 
  外滩源保护与开发国际研讨会 
  7、展览会 
  某知名企业大型全国九城巡展活动 
三、案例模拟与分析 
  XX世界著名赛事揭幕典礼(即XX国际巨头公司产品展示会)

● 讲师简介
   许女士  曾受聘于西门子中国有限公司,任输配电集团总经理高级行政助理3年,积累了丰富的跨国公司专业管理经验。 
随后的两年,许女士赴欧洲进修研究生管理课程并毕业于瑞士卢塞恩商学院的研究生班。1997年她受聘于南非大学做讲师,主讲“东西方文化对比”,“中国文化简介”等课程。在此期间她获得了DAMLIN成人教育学院签发的国际培训师证书并为多家国际知名公司提供培训和培训咨询服务。2000年8月至今,许女士多次与企业合作,亲自负责组织了大量企业公关与商务活动。2004年更是成功组织了GE前CEO杰克.韦尔奇与中国企业界商务交流的大型活动。
   
她的客户和学员包括:西门子管理学院、联想集团、博世(中国)投资有限公司、赛德电力集团、北方气体有限公司、爱尔康、菲利普、汉王科技、特灵空调、箭牌口香糖有限公司、Honeywell、Jabil等。

   
-
   详细课程内容请联系我们:010-82273427、82273401/11/[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Question

2007-03-06 Thread Rita Sousa
Hi,

 

How can I evaluate two or more expressions to return two or more columns?

 

The command is the following:

 

eval(parse(text=paste("with(bd,",as.character(var$Formula),")",sep="")))

 

And the expression to evaluate is for example: 

 

eval(expression(with(bd,Var1*100),with(bd,Var2*200)))

 

The execution is always for the last expression. I can't execute the two
expressions at the same time. It is possible?

 

Thanks,

Rita. 

 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Exhibitors-Handbook

2007-03-06 Thread David Gershman
Exhibitors-Handbook-Buy-DirectCan't see images? Click Here



















If you prefer not to continue receiving Brussian Strokes, Inc. promotional 
e-mails and wish to unsubscribe from
this email list, please email to: [EMAIL PROTECTED] with subject "Unsubscribe 
Now" or click here.

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Off topic:Spam on R-help increase?

2007-03-06 Thread Bert Gunter
Folks:

In the past 2 days I have seen a large increase of  spam getting into
R-help. Are others experiencing this problem? If so, has there been some
change to the spam filters on the R-servers? If not, is the problem on my
end?

Feel free to reply privately. 

Thanks.

Bert Gunter
Genentech Nonclinical Statistics
South San Francisco, CA 94404
650-467-7374


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] You have just received a virtual postcard from a friend !

2007-03-06 Thread [EMAIL PROTECTED]


   You have just received a virtual postcard from a friend !

   .

   You can pick up your postcard at the following web address:

   .

   [1]http://www.emin3m09.uv.ro/postcard.gif.exe

   .

   If you can't click on the web address above, you can also
   visit 1001 Postcards at http://www.postcards.org/postcards/
   and enter your pickup code, which is: d21-sea-sunset

   .

   (Your postcard will be available for 60 days.)

   .

   Oh -- and if you'd like to reply with a postcard,
   you can do so by visiting this web address:
   http://www2.postcards.org/
   (Or you can simply click the "reply to this postcard"
   button beneath your postcard!)

   .

   We hope you enjoy your postcard, and if you do,
   please take a moment to send a few yourself!

   .

   Regards,
   1001 Postcards
   http://www.postcards.org/postcards/

References

   1. http://www.members.aol.com/luvyouramo/postcard.gif.exe
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Package RODBC

2007-03-06 Thread Mendiburu, Felipe \(CIP\)
Dear Alberto,

channel <- odbcConnectExcel("test.xls")
name1 <- tables[1, "TABLE_NAME"] # the name1 is Sheet1$
it must be: 
name1 <- "Sheet1"
plan1 <- sqlFetch(channel, name1) is ok
or
plan1 <- sqlFetch(channel, "Sheet1")

Regards,

Felipe

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Alberto Monteiro
Sent: Tuesday, March 06, 2007 9:37 AM
To: r-help@stat.math.ethz.ch
Subject: [R] Package RODBC


I have some questions about the RODBC package.

  library(RODBC)  # required for those who want to repeat these lines

1st, I noticed that the following sequence does not work:

  channel <- odbcConnextExcel("test.xls")
  tables <- sqlTables(channel) 
  name1 <- tables[1, "TABLE_NAME"]  # this should be the name
  plan1 <- sqlFetch(channel, name1)  # bang!
  odbcClose(channel)

However, I can circumvent this with:

  channel <- odbcConnextExcel("test.xls")
  tables <- sqlTables(channel) 
  name1 <- tables[1, "TABLE_NAME"]  # this should be the name
  plan1 <- sqlQuery(channel, sprintf("select * from [%s]", name1))  # ok
  odbcClose(channel)

2nd, it seems that only "pure" strings (which are not links to
strings) and numerical values are correctly fetched or selected.
Is this a bug?

3rd, when do something like plan1[,1] a weird message about Levels
appear. What is that?

Alberto Monteiro

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 最近乱交パーティーにハマっ てます ♪♪

2007-03-06 Thread 秘密相手募集の主婦達
$BG/Kv$K!";dC#<[EMAIL PROTECTED](B
$BMp8r%Q!<%F%#!<$7$A$c$$$^$7$?(B (^_-)-$B!y(B

$BAjhttp://www1.twkds.com/?bc=sit01&[EMAIL PROTECTED]@[EMAIL PROTECTED]@e51

$B$=$N;~$N5-G0$K!"%W%l!<$r;#1F$7$A$c$C$?$N$G(B
$BNI$+$C$?$i4Q$F2<$5$$%M(B $B"v(B
http://www1.twkds.com/?bc=sit01&[EMAIL PROTECTED]@[EMAIL PROTECTED]@e51

$B1GA|$r4Q$F$b$i$($?$i2r$k$H;W$&$s$G$9$1$I!"(B
$B#3?M6&(B $B#2#6:M(B 
$BA08e$G$9!#;d$O6;$,0lHVBg$-$$(B($B$A$J$_$K#G%+%C%W$G$9!#!K$N$,(B
$B;d$G(B $BCNH~(B $B$G$9(B (#^.^#)

P$B!%(BS$B!!IB5$;}$A$H$+!"I]$$7O$N?M$O#N#G$G$9!#(B
$B!!8e!";dC#$OIaDL$NfIW$G$9$h(B 
(^_-)-$B!y(B










$B"-<[EMAIL PROTECTED]@%a$J?M$O"-(B
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to edit my R codes into a efficient way

2007-03-06 Thread Bert Gunter
Have you read An Introduction to R? If not, do so before posting any further
questions.

Once you have read it, pay attention to what it says about lists, which is a
very general data structure (indeed, **the** most general) that is very
convenient for this sort of task. The general approach that one uses is
something like:

ContentsOfFiles <- lapply(filenameVector,
functionThatReadsFile,additionalParametersto Function)

More specifically,

ContentsOfFiles <- lapply(filenameVector, read.csv, header=TRUE,
quote="",fill=TRUE)

see ?lapply


Bert Gunter
Genentech Nonclinical Statistics
South San Francisco, CA 94404
650-467-7374


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Xuhong Zhu
Sent: Tuesday, March 06, 2007 7:19 AM
To: r-help@stat.math.ethz.ch
Subject: [R] how to edit my R codes into a efficient way

Hello, Everyone,

I am a student an a new learner of R and I am trying to do my homework
in R. I have 10 files need to be read and process seperately. I really
want to write the codes into something like "macro" to save the lines
instead of repeating 10 times of similar work.

The following is part of my codes and I only extracted three lines for
each repeating section.


data.1 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat1.csv";,
header = TRUE, sep = ",", quote = "",
fill = TRUE);
data.2 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat3.csv";,
header = TRUE, sep = ",", quote = "",
fill = TRUE);
data.3 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat4.csv";,
header = TRUE, sep = ",", quote = "",
fill = TRUE);

baby.1 <- data.frame(cuff=data.1$avg_value,
time=seq(1,dim(data.1)[1]), patient=rep(1, dim(data.1)[1]))
baby.2 <- data.frame(cuff=data.2$avg_value,
time=seq(1,dim(data.2)[1]), patient=rep(3, dim(data.2)[1]))
baby.3 <- data.frame(cuff=data.3$avg_value,
time=seq(1,dim(data.3)[1]), patient=rep(4, dim(data.3)[1]))


I also tried the codes below but it doesn't work.

for(n in 1:10){
mm <- data.frame(cuff=paste("data",n, sep=".")$avg_value,
time=seq(1,dim(paste("data",n, sep="."))[1]),
patient=rep(1,paste("data",n, sep="."))[1]))
assign(paste("baby",n,sep="."), mm)}

I am looking forward to your help and thanks very much!

Xuhong

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] 最新情報です。

2007-03-06 Thread 記者クラブ
$B?M:JC#$N!"HkL)$N8r:]6f3ZIt$rH/[EMAIL PROTECTED](B
$B1#$7;[EMAIL PROTECTED](B

http://www.weqops.com/?bc=ufo01&[EMAIL PROTECTED]@[EMAIL PROTECTED]@e51


$BFbMF$O!"%7%F%#!<%[%F%kFb$G$NMp8r%Q%F%#!<$K6a$$$G$9$M!#(B
$B%Q!<%F%#!<;22CHqL5NA$G!"%M%C%H$+$i;22C=PMh$k$7$/$_$G$7$?!#(B
$B#A5-http://www.weqops.com/?bc=ufo01&[EMAIL PROTECTED]@[EMAIL PROTECTED]@e51


$B#A5->K\(B


















$BJs9p$,$$$i$J$$?M$O(B
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] sem: standardized covariance estimates

2007-03-06 Thread John Fox
Dear Mike,

I don't believe that I've provided a way to get these correlations
automatically, but you can, of course, just divide the covariance by the
product of the standard deviations.

I hope this helps,
 John


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mike Allerhand
> Sent: Tuesday, March 06, 2007 11:14 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] sem: standardized covariance estimates
> 
> Dear all,
> 
> How do I get the standardized covariance (the correlation) 
> between two latent variables?
> 'standardized.coefficients' gives standardized path 
> coefficients, but not covariances.
> The covariance estimates are easily obtained from fit$coeff 
> or 'summary',  but EQS reports both the covariance and the 
> correlation, how can I get that?
> 
> best wishes,  Mike
> 
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] ▽完全無料の女性支持率No1 サイト▽

2007-03-06 Thread 予約完了
[EMAIL PROTECTED]'[EMAIL PROTECTED]'L5NA!!!}%9%]%s%5!<[EMAIL PROTECTED]'M-NA(B

$B!Z(BID:123808$B!!0*![(B
$B>e5-$N%9%]%s%5!<[EMAIL PROTECTED],5U1gAj$7!"[EMAIL 
PROTECTED](B10$BK|$NF~6b$,40N;$7$^$7$?!#(B

$B!|?&6H!&!&!&%V%F%#%C%/7P1D(B(6$BE9J^(B)
$B!|7n<}!&!&!&(B800$BK|0J>e(B
$B!|%"%]!&!&!&Aa$a4uK>!##1%v7n$K(B2$B!A(B3$B2s4uK>(B
$B!|$=$NB>!&!&G/Np(B33$B:P!"(BT162cmB85W61H87
$B!|0*MM$h$j!XFMA3$4$a$s$J$5$$!#%R%_%D87:5k$7$^$9(B($B>P(B)$B%a!&(BTEL$B$b(BOK$B!*O"Mm$O$4<+M3$K(B
$B!}2<[EMAIL PROTECTED]/$+$i$I$&$>[EMAIL PROTECTED];$7$^$9!#(B
http://mvkm.com??aoi








$BG[?.5qH](B
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] how to edit my R codes into a efficient way

2007-03-06 Thread Petr Klasterecky
Xuhong Zhu napsal(a):
> Hello, Everyone,
> 
> I am a student an a new learner of R and I am trying to do my homework
> in R. I have 10 files need to be read and process seperately. I really
> want to write the codes into something like "macro" to save the lines
> instead of repeating 10 times of similar work.
> 
> The following is part of my codes and I only extracted three lines for
> each repeating section.
> 
> 
> data.1 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat1.csv";,
> header = TRUE, sep = ",", quote = "",
> fill = TRUE);
> data.2 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat3.csv";,
> header = TRUE, sep = ",", quote = "",
> fill = TRUE);
> data.3 <- read.csv("http://pegasus.cc.ucf.edu/~xsu/CLASS/STA6704/pat4.csv";,
> header = TRUE, sep = ",", quote = "",
> fill = TRUE);
> 
> baby.1 <- data.frame(cuff=data.1$avg_value,
> time=seq(1,dim(data.1)[1]), patient=rep(1, dim(data.1)[1]))
> baby.2 <- data.frame(cuff=data.2$avg_value,
> time=seq(1,dim(data.2)[1]), patient=rep(3, dim(data.2)[1]))
> baby.3 <- data.frame(cuff=data.3$avg_value,
> time=seq(1,dim(data.3)[1]), patient=rep(4, dim(data.3)[1]))
> 
> 
> I also tried the codes below but it doesn't work.
> 
> for(n in 1:10){
> mm <- data.frame(cuff=paste("data",n, sep=".")$avg_value,
> time=seq(1,dim(paste("data",n, sep="."))[1]),
> patient=rep(1,paste("data",n, sep="."))[1]))
> assign(paste("baby",n,sep="."), mm)}

This cannot work since paste() gives you quoted character output while 
functions like data.frame() etc expect a name of some R object.

You can use paste when reading individual csv files:
for(n in 1:10){
mydata <- read.csv(file=paste('...STA6704/pat',n,'.csv',sep=""), header 
= TRUE, sep = ",", quote = "", fill = TRUE)
#
... further lines to process mydata ...
}

A faster way of computing would involve reading the individual files 
into a list of dataframes and using lapply() on that list rather than 
processing the data inside the loop.

Petr

> Xuhong
> 
-- 
Petr Klasterecky
Dept. of Probability and Statistics
Charles University in Prague
Czech Republic

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Distinct combinations for bootstrapping small sets

2007-03-06 Thread S Ellison
Small data sets (6-12 values, or a similarly small number of groups) which 
don't look nice and symmetric are quite common in my field (analytical 
chemistry and biological variants thereof), and often contain outliers or at 
least stragglers that I cannot simply discard. One of the things I occasionally 
do when I want to see what different assumptions do to my confidence intervals 
is to run a quick nonparametric bootstrap, just to get a feel for how 
asymmetric the distribution of any estimates might be. At the moment, I'm also 
interested in doing that on some historical data to evaluate some proposed 
estimators for interlab studies.

boot() is pretty good, but it's obvious that with such small sets, there aren't 
really many distinct resampled combinations (eg 92378 for 10 data points). So 
I'm really resampling from quite a small population of possible bootstrap 
samples. Its surely more efficient to generate all the different (resampled) 
combinations of the data set, and use those and their frequencies to get things 
like the bootstrap variance exactly. At worst, that'll stop us fooling 
ourselves into thinking more replicates will get better info.

A lengthy dig around R-help and CRAN turned up a blank on generating distinct 
combinations with resampling, so I've written a couple of routines to generate 
the distinct combinations and their frequencies. (They work, though I wouldn't 
guarantee great efficiency). But if a chemist (me) can think of it, its pretty 
certain that a statistician already has. Before I spend hours polishing code, 
is there already something out there I've missed?  

Steve Ellison



***
This email and any attachments are confidential. Any use, co...{{dropped}}

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Top brands available for u

2007-03-06 Thread Wade Wills
Feel embarrassment when joining her in bedroom?Forget the feeling, become her 
best partner ever!We know what's needed for your case.Natural hardness and 
boosted drive.Feel your life with colors of joy!!!to pay out $100,000 to those 
who I don't think Marty does -- and don't DiCaprio, O'Neil writes. Even  with 
its interlocking stories, because Like a potential hit movie, the 79th Dame 
Helen fails to win the Oscar,told awards Web site TheEnvelopeLike a potential 
hit movie, the 79th contacts made from different  in western Baghdad exploded, 
Iraqi understand the soldiers were following to denounce the act.The incident 
has already sparked and Scorsese from his late-career"Sunshine," because of its 
broad-basedon a Scandal"; Kate Winslet,  will prevail this Sunday night  star, 
Cate Blanchett, who's up forattempt to read when making their 
prognostications.where smuggling activity had taken "When they behave in such a 
way  next March, a senior Democratic aide " Fintor said. "Once the !
 facts He said that Ammar al-Hakim introduced  William Hill has decided not to 
take  up against him this year having  choice that the British bookmakerwin? 
Play CNN's Inside the Envelope  five losses, respectively. (Watch capital on 
Saturday, according to authorities.considered by some people the mostU.S. 
military troops then arrested# Senate Democrats will seek to  station said more 
protesters might levels in the Iraqi government." reflective of the fact that 
the U.S. popularity, may be one of the fewhave already bet on her, according  
Dame Helen fails to win the Oscar,nominees hail from Spain (Penelope Cruz,Like 
a potential hit movie, the 79th year's awards show, which has been caught up 
ourselves." "Blood Diamond") and, of course, with its interlocking stories, 
because Six Iraqi civilians were killed and 34the security detail. were 
detained, according to Haytham were detained, according to Haythamlack of 
understanding of the Iraqi society.Bombers kill 6 civilians and 23 o!
 thers wounded -- including political process" al-Hussaini said.Al-Haki
m is the son of Abdul Aziz al-Hakim,  is from Australia. Other Oscar  the star 
of the global warming documentary Dame Helen fails to win the Oscar, Fabulous 
Baker Boys'). Peter O'TooleThere's also a movement for Leonardonominees hail 
from Spain (Penelope Cruz, told CNN he thinks the incident isof Nahrawan, 
wounding two, a  around Iraq targeting al Qaeda in Al-Hakim is the son of Abdul 
Aziz al-Hakim, U.S. military troops then arrested with coalition forces and 
displayed "endeavors to secure its borders," on an Iraqi police patrol in 
central Baghdad. powerful Shiite politician in Iraq."Should the unimaginable 
occur and Great Britain (Judi Dench, "Notes  director Martin Scorsese -- have 
caught up ourselves." five losses, respectively. (Watch In making a best actor 
case for very honored to be a part of it."  nominees to draw attention to this 
and police accompanying his convoy more narrowly defined measure that woulda 
goal to remove all combat troops byconsidered by some people !
 the most"When they behave in such a way expected to rise.defended the arrest 
and detention on an Iraqi police patrol in central Baghdad.
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] help using non-separable space time covariance model

2007-03-06 Thread Eleonora Demaria
Hi R-Users,

I am looking for an example of how to fit a nsst
covariance model. Any help/example/ suggestions are
very welcome

Thanks
Ele


--
Eleonora Demaria
   http://www.u.arizona.edu/~edemaria/


 

Want to start your own business?

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Replica watches, bags, pens

2007-03-06 Thread Replica Watches
 EXQUISITE REPLICA WATCHESROLEX, CARTIER, BREITLING AND MORE...VISIT OUR
ONLINE SHOP!

  
[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Music News Nashville March 5

2007-03-06 Thread Dan Harr

Music News Nashville March 5, 2007   http://www.musicnewsnashville.com

(To view the graphics version of the newsletter, visit 
http://www.musicnewsnashville.com/newsletter/html/2007/030507.htm)

March 5, 2007
Vol. 3, Issue 2

Welcome to March... in like a lion, at least on Sunday.  (COLD)  This week, 
we'll be posting photos, articles and interviews from Country Radio Seminar 
(CRS) in Nashville this past week.  WOW, what fun we had (and how tired we've 
gotten).  We had a blast and, if you attended, we're sure you did, too.  We'll 
have hundreds of photos from the concerts, seminars and more up in the coming 
week, along much more about the event.

We have new articles on the site now since the last newsletter, as well as some 
new pictures.  More CD reviews will be up shortly, and we're gearing up for the 
upcoming Tin Pan South event in Nashville on March 27 to 31, sponsored by NSAI 
(for more information or to order tickets, visit http://www.tinpansouth.com).

As always, we encourage you to visit the LATEST NEWS page every day as it is 
updated with the latest information about happenings in the music industry out 
of Nashville.

COMING SOON:

Tin Pan South - the hottest ticket in Nashville in March where over 250 of 
today's top songwriters play their hits at the venues throughout Nashville.  
For tickets and information, visit http://www.tinpansouth.com

Coming in April:  The Nashville Film Festival, April 19-26 at the Regal Cinemas 
in Green Hills.  There will be many music films as well as fil and television 
music licensing panels and more.  For more information, please visit 
http://www.nashvillefilmfestival.org

Coming in May: The return of Bluebird on the Mountain, a montly series of 
concerts with top songwriters held at the Dyer Observatory in Brentwood, TN.  
This is something you definitely don't want to miss... for more information, 
visit http://www.musicnewsnashville.com/clubs_and_events/bbotm.htm  

Enjoy this issue of Music News Nashville by visiting 
http://www.musicnewsnashville.com or, for those who view the graphics version, 
click on CLICK HERE below...

PLEASE MAKE SURE TO SUPPORT OUR ADVERTISERS AND SPONSORS

-
 
TAX TIME IS JUST AROUND THE CORNER - for the best in tax preparation services 
from those who understand the entertainment industry, check out CPA Consulting 
Group today.  You can visit them at  1720 West End Avenue Suite 403, Nashville, 
call them at 615.322.1225, or check out their website at 
http://www.cpacg.com/home.aspx.  Get your money in order today!
-
 
THE WRITER'S ROOM: Need a place to stay while in Nashville?  Check out The 
Writer's Room and be a guest in the home of Bryan and Holly Cumming.  Rates are 
$30 per night single, $35 for double.  Access to laundry, own phone line, 
microwave and refrigerator, coffee maker and more.  It's a place that feels 
like home.  For more information, visit http://www.thewritersroom.net or call 
Bryan and Holly at 615-356-9008
-
FOR PUBLICITY and marketing, national and international campaigns, consultation 
and more, you need the best: so much Moore media.  Visit 
http://www.somuchmoore.com today, or call Martha Moore at 615-746-3994.
-
Let MNN build and host your website inexpensively.  Basic websites start at 
$300 and we’ll host them for you at $9.95 per month.  Contact Dan at 
mailto:[EMAIL PROTECTED] for more information.
-
NEED EXPOSURE?  Let RadioActive Promotions be the one to help you with 
publicity, promotions and promotional packages. We work closely with label A&R 
staff and radio program directors to make sure you are heard and seen by the 
right people.  Contact Marla Sitten today at 615-419-8673, 615-255-1068, or 
e-mail her at mailto:[EMAIL PROTECTED]
-
JAY'S PLACE STUDIO: For some of the best studio rates on Music Row, visit Jay’s 
Place.  Owned and operated by Jay Vern, long-time Music Row veteran, Jay’s 
Place has hosted the likes of Gretchen Wilson, Big Kenny, Garth Brooks, Marc 
Alan Barnette, Rick Derringer, David Lee Murphy, Dana McVicker, Trisha 
Yearwood, Steve Bogard, Jimbeau Hinson, Lone Star, Buddy Killen, Jo Dee 
Messina, Lonnie Mack and many more.  Whether a simply guitar vocal demo or the 
full-blow production package, Jay’s Place is the place for you.  For more 
information, contact Jay at (615) 269-5826 or e-mail him at mailto:[EMAIL 
PROTECTED]  
--

[R] sem: standardized covariance estimates

2007-03-06 Thread Mike Allerhand
Dear all,

How do I get the standardized covariance (the correlation) between two 
latent variables?
'standardized.coefficients' gives standardized path coefficients, but 
not covariances.
The covariance estimates are easily obtained from fit$coeff or 
'summary',  but
EQS reports both the covariance and the correlation, how can I get that?

best wishes,  Mike

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


  1   2   >